Users running a non-download version of Vanilla (pulled from github), on branch release/2019.016 or master from the last 2 weeks should upgrade to release/2019.017 or latest master for security reasons. Downloaded official open sources releases are not affected.

Public Discussion Titles, private Discussion Content

Hi everyone,

sorry if this has been answered elsewhere, I swear I tried searching first. (Also sorry if this is the wrong place to ask.)

I'm trying to create a semi-public forum, where unregistered guests can see the titles of all discussions in the discussion list, but don't have access to the discussion page itself, i.e. the Discussion Content and comments.

Is there a way to achieve this or something similar in Vanilla? I'd also be more than happy with just being able to hide comments for unregistered users. I went through the complete plugin list and the closest thing I could find was this, which isn't really what I need.

(I am aware that I can set categories to private, which is probably what I'll do if this doesn't work out.)

Thanks so much in advance!

Edit: Vanilla Version is 3.2

Comments

  • So, you want the "Enable Private Communities" off, right?

    You want to block off only the Discussion area? Here is a simplistic method, but the logic is similar to what might go into standalone plugin.

    In a plugin you could go as far as redirecting the user to another page that has your message ...

    In your default.master.tpl try this

    //find {asset name="Content"} and replace with:
    
    {if inSection('Discussion')}
      {if $User.SignedIn}
        {asset name="Content"}
      {else}
        <div><h1>Sorry dudes nothing to see here,<br> ya'll need to be signed in to see this sweet king content</h1></div>
      {/if}
    {else}
      {asset name="Content"}
    {/if}
    

    For more smarty stuff

    https://docs.vanillaforums.com/developer/smarty/conditionals/

    timzwerg
  • R_JR_J Cheerleader & Troubleshooter Munich Moderator

    But that would leave search results and also comments in profiles visible.

    The only save way would be to revoke view rights for guests altogether and rebuild the recent discussions view with a plugin.

    Such a plugin should be quite easy to write if you ever have coded before. If you are interested, I can give some hints and support


Sign In or Register to comment.