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

XF 1.5 Template condition (if visitor can read thread)

Discussion in 'XenForo Questions and Support' started by Ghostaunt, Nov 2, 2015.

  1. Ghostaunt

    Ghostaunt Active Member

    Hello.

    I'm trying to find if it's possible to get a condition for know if visitor can read the thread.
    If I want that, it's because I have added sharing buttons to the first post in thread, but I wan't to hide them if visitor can't read the thread.

    Thanks for your help
     
  2. Martok

    Martok Well-Known Member

  3. Ghostaunt

    Ghostaunt Active Member

    Not logged in. I'm talking about visitor if they can read/seee the thread. Like here if was not logged in, I could read this thread :)
     
  4. Martok

    Martok Well-Known Member

    The linked to resource covers guests. So you wrap the sharing buttons into a conditional that shows to those who aren't guests.

    **EDIT** D'oh! I just thought about this. If the guest can't read the thread, surely they won't see the sharing buttons anyway?
     
  5. Ghostaunt

    Ghostaunt Active Member

    No no it's not what I need.

    I just want to hide sharing button for my members IF GUESTS(visitor) can't read the thread.
    Because you don't have to share content that guest can't read. That why i need this condition ^^
     
  6. Martok

    Martok Well-Known Member

    In that case, the threads that guests can see will be in specific forums. You can use a conditional based on those forums. See the link in my previous post.
     
  7. Ghostaunt

    Ghostaunt Active Member

    I have too many multiple forums and multiple permissions I can't do this with forum id or something like that...
     
  8. Brogan

    Brogan XenForo Moderator Staff Member

    You can do it with an array of forum IDs.
    It's a single xen:if statement.
     

Share This Page