Any simple way to make the Topic List publicly viewable

… whilst preventing non-members from clicking into any of the Topics and seeing the posts? (and if they did, it would be nice to prompt them to join)

This would offer a slightly different approach to making the site completely private and hiding the Topic List completely.

I guess I can repurpose a script I used to get someone’s name:

<script type="text/discourse-plugin" version="0.8.18">
    api.onPageChange(() => {
        if(api.getCurrentUser() === null) {
      
        }
    });
</script>

To determine if someone’s logged in … but what to do in that case? Could I hack the click event with jQuery?

EDIT: not sure this approach will work in any case as Custom Theme elements are not applied when logged out?

Have you tried this?

The category page remains visible, but the posts themselves require you be a member of a particular group. I’ve not tinkered with it lately, but if you can add trust levels it may negate the need to write code.

4 Likes

Thanks Stephen I’ll take a look

Awesome, please let me know if it works out for you!

1 Like