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

XF 1.5 Recent activity and what's new for guests question

Discussion in 'XenForo Questions and Support' started by kforo, Jun 14, 2016.

  1. kforo

    kforo Active Member

    I don't know if I'm not using the permission correctly, or maybe it's actually working as intended. I seem to recall vbulletin having an option that allowed guests to click the what's new button and it'd list all of the threads that were recent. So, guests could read the thread titles and whatnot, but if they clicked into those threads it'd give the alert that you needed to be registered.

    I've tried it at the usergroup level, and at the node permission level. I've been messing with it for hours and I've had no luck.

    guests -
    view threads by others - allow
    view thread content - revoke

    If a guest navigates to a specific forum category it's working as intended. It'll show the list of threads, but it blocks the actual thread content from being seen. That's fine.

    If you click "what's new", or "recent activity", it is always turning up zero results. The only way I can get it to show results is by putting view thread content to allow. That will show results when clicking recent activity or what's new. That is obviously also allowing guests to read the content.

    Is there a setting/permission setup that will actually show guests a list of "what's new"/"recent activity" threads, but then alert them to register if they try to access those threads?

    Alternatively, if that is the way it's intended to function, can someone provide me with info on how to just remove both "what's new"/"recent activity" for guests, or make it so clicking either gives them an alert or whatever that they need to register?
  2. Mike

    Mike XenForo Developer Staff Member

    This is the expected behavior. You'll need to use conditional statements to either hide links or change the output of pages to fit what you want. The concepts are covered here: https://xenforo.com/community/resources/conditional-statements.1604/ You may want to look at the find_new_posts, find_new_posts_none, and news_feed_page_global templates.
  3. kforo

    kforo Active Member

    Huge thank you to the user who took the time to send me this simple fix.

    So basically you want all guests to be asked to sign up instead of viewing thread content?

    I'm assuming you could do something like this in the template: thread_view

    Right after:
    <xen:require css="thread_view.css" />
    <xen:if is="{$visitor.user_id}">
    Then at the bottom of the template

    <xen:else />
    <h3>You must register to view this page</h3><xen:include template="register_form" /></xen:if>
    That should exclude the page from guests

    Works beautiful.

Share This Page