Any way to trigger a signup form when category below permission level?

(Carsten Pleiser) #1

Hey, I want to make certain categories view only for users that have signed up. I understand this can be achieved by category -> security settings and assigning permission levels.

At the moment, though, it shows an ugly “Access Denied :(” at the bottom when someone tries to click on the category.

How do I manage to display the login / signup form?

(Jeff Atwood) #2

Hmm, I wonder, is this a special case for that page? If the only security requirement is “be logged in”. What do you think @sam?

(Sam Saffron) #3

Maybe just a simple you must be logged on to see category for logged out users?

We expose that the category exists, but we do that anyway now

(Carsten Pleiser) #4

Sorry, I don’t quite understand how to show a more user friendly message when the category shouldn’t be accessed by non-members.

(Mittineague) #5

Are you looking for “trust_level_0” permissions instead of “everyone” ?

If someone does not have permission to a category, AFAIK that category should not show in any lists or menus. Where are they getting the link to the category?

(Carsten Pleiser) #6

Thank you @Mittineague - I would like to show that category as an incentive to sign up to the community and that’s where the problem lies.

(Mittineague) #7

To me that seems to be contradictory.

Discourse will let non-members read content but they will be prompted to register an account when they want to post a reply. And also after they have read a bit.

But this seems like you are looking for a way to let non-members read content so they will want to register an account, but not let them read content until they register an account. Sorry, but I can’t see how it can be both ways.

How do you imagine this working?

(Carsten Pleiser) #8

So I’m using Discourse as a Q&A site. I would like people to see the topic, but not the content of the topic
(see screenshot below)

They can see this, but when they try to click on the topic to see the content and the replies, I would like to trigger that they need to register for an account to see the content.

Would this be possible?

(Mittineague) #9

I think I understand want you’re after, please correct me if I’m wrong.

You would like to expose topic titles in lists, with those topics in categories that require a visitor to be a registered member to be able to see the topic posts.

Currently, other than messages, there are no topic level permissions. If a visitor has permissions for a category, they can see both the topic titles and the content of topics in that category. If they want to post a reply / read a bit, they will be prompted to register an account.

I have a feeling that changing Core code would be very involved if even possible and IMHO not worth the effort for a feature that has not had much demand, is of limited value and would likely have a negative impact on the site in terms of SEO. Search engines are not registered members and would not have permissions to see more than the topic titles.

I’m thinking that if any work in this direction were to be done a good approach would be to expose the topic titles of topics in restricted categories in some type of widget that pulls the titles from RSS or JSON and shows a “must be registered to access” message somewhere.

You said that your forum is really a QA site. If you want visitors to not see answers, there might be a way to allow access to only those topics that have no replies if that would work for you.

Both of those approaches would be plugin territory.

As for using what Discourse currently has without changes to Core code or using a plugin, there is something that might work.

I’m assuming the intent is to say something like “the answers you seek are here, but you need to register to see them.” (whether or not they would be convinced the answers do indeed exist based on topic titles alone and would be enough to elicit registering is questionable).

Anyway, Discourse has Banner topics, and the Top and Header can get custom HTML. Maybe putting a well crafted message in one of those would be good enough?