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

XF 1.5 conditional for posts in node or thread

Discussion in 'Styling and Customization Questions' started by Nudaii, Sep 11, 2015.

  1. Nudaii

    Nudaii Well-Known Member

    hello is there a conditional for number of posts by a user in x thread or x node?

    if example user y has at least x posts in node z then i could display a certain image in their postbit :)
  2. Brogan

    Brogan XenForo Moderator Staff Member

    In a thread you can use $thread.user_post_count.
    Although you will need to check if that is available in the thread_view template.

    There is no equivalent for nodes.
  3. Nudaii

    Nudaii Well-Known Member

    thanks :)
  4. Brogan

    Brogan XenForo Moderator Staff Member

    In case you weren't aware, you can use this in the template to check if it's available:
    {xen:helper dump, $variable}

    So in this case it would be:
    {xen:helper dump, $thread.user_post_count}

    If NULL is returned then it's not available.

Share This Page