1. 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

Discussion in 'XenForo Questions and Support' started by Biarritz64, Nov 15, 2013.

  1. Biarritz64

    Biarritz64 Active Member


    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
  2. Brogan

    Brogan XenForo Moderator Staff Member

    Why would you want to return only 1 character?

    The ellipsis are added as part of the helper function.
  3. Biarritz64

    Biarritz64 Active Member


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

    <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}'}
    <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
  4. Brogan

    Brogan XenForo Moderator Staff Member

    You can't without an add-on.
    The ellipsis are part of the helper function.
  5. Biarritz64

    Biarritz64 Active Member

    thank for your answer, i have to find an other solution

Share This Page