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

XF 1.2 xen:helper snippet problem

#1
Hi,

i have a little problem with helper snippet

{xen:helper snippet, $thread.lastPostInfo.user_id, 1}

return "1..." instead of "1" only.

How to remove "..."

Thank you
 

Brogan

XenForo moderator
Staff member
#2
Why would you want to return only 1 character?

The ellipsis are added as part of the helper function.
 
#3
@Brogan

For this, i want to had last poster avatar in xenportal,
i use this code to get the avatar

Code:
<xen:set var="$avatarGroup">
{xen:if '{$thread.lastPostInfo.user_id} < 1000', '0', '{xen:helper snippet, $thread.lastPostInfo.user_id, 1}'}
{xen:if '{$thread.lastPostInfo.user_id} > 9999', '{xen:helper snippet, $thread.lastPostInfo.user_id, 2}'}
</xen:set>
<img src="data/avatars/s/{$avatarGroup}/{$thread.lastPostInfo.user_id}.jpg" alt="{$thread.lastPostInfo.username}" />
My problem is that {avatargroup} return "1..." or "2..." i want to remove "..."

Thank for your help