1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Lack of Interest Dropping <xen:username /> for good?

Discussion in 'Closed Suggestions' started by xfrocks, Aug 3, 2011.

  1. xfrocks

    xfrocks Well-Known Member

    Can you guys please consider dropping the tag username for good? The tag simply calls XenForo_Template_Helper_Core::userNameHtml and provide no additional features. Okie, it supports additional tags like "class" but that can achieve by using helper anyway.

    My suggestion is: dropping the tag completely and use {xen:helper username} or {xen:helper richusername} instead. I did a search for "<xen:username" in the templates and only a few templates made use of it. The replacement shouldn't be too complicated. By doing this, we can:
    1. Make the template system 1 tag easier to learn :D
    2. Allow customization to username by overriding XenForo_Template_Helper_Core::$helperCallbacks['username'] with something else. There will be no limit! A simple example: people can configure to display real name in posts instead of username (with the support of profile fields in XenForo 1.1.). And many other things!
    Please drop <xen:username />!
     
  2. Kier

    Kier XenForo Developer Staff Member

    I'd rather not drop <xen:username /> as named parameters are far friendly than having to remember the order of parameters using the curly syntax, but I'll certainly look into making it more pluggable.
     
    James likes this.
  3. xfrocks

    xfrocks Well-Known Member

    That would be great too. Thank you :)
     
  4. James

    James Well-Known Member

    Agreeing to this considering I'm having trouble overriding <xen:username /> with my add-on!
     
  5. Floris

    Floris Guest

    No, keep it!!

    *phew
     
  6. Kier

    Kier XenForo Developer Staff Member

    Lots of the tags, including xen:username now use XenForo_Template_Helper_Core::callHelper() in order to make them fully pluggable.
     
    xfrocks and James like this.
  7. James

    James Well-Known Member

    Thanks Kier! I should be able to rewrite my add-on when 1.1 comes out in this case.
     
  8. xfrocks

    xfrocks Well-Known Member

    Please tell me <xen:avatar /> is among those tags...? More specifically: XenForo_Template_Helper_Core::avatarHtml() should do this

    PHP:
    $src self::callHelper('avatar', array($user$size$forceType$canonical));
    Instead of

    PHP:
    $src self::helperAvatarUrl($user$size$forceType$canonical);
    That would be really sweet!
     
  9. Floris

    Floris Guest

    I had a chat with Jake about a solution, so I have a solution - that said - it would be nice since we can use href="" in <xen:avatar /> to have target="1" to load _blank or something like that.
     
  10. Kier

    Kier XenForo Developer Staff Member

    Yes, xen:avatar has been updated to use callHelper(), as have many of the other tags.
     
    xfrocks and Darkimmortal like this.

Share This Page