• 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?

xfrocks

Well-known member
#1
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 />!
 

Kier

XenForo Developer
Staff member
#2
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.
 

xfrocks

Well-known member
#3
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.
That would be great too. Thank you :)
 

James

Well-known member
#7
Lots of the tags, including xen:username now use XenForo_Template_Helper_Core::callHelper() in order to make them fully pluggable.
Thanks Kier! I should be able to rewrite my add-on when 1.1 comes out in this case.
 

xfrocks

Well-known member
#8
Lots of the tags, including xen:username now use XenForo_Template_Helper_Core::callHelper() in order to make them fully pluggable.
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!
 
F

Floris

Guest
#9
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.