Grant Badge when user visits link

Still nothing, I tried visiting based on the URL directly, clicking on it from search, and clicking from the ‘Latest’ topics page.

Triggered this, and still nothing.

And you’re using the topic_id and not the post_id for this one?

https://meta.discourse.org/t/grant-badge-when-user-visits-link/276700/17

1 Like

There you go, this was the problem lol. Sorry about that. It’s working now.

Next question, can we upgrade a users trust level based on them being granted a badge?

And can we hide a topic entirely from public view and only make it visible via direct link?

There is a brand new ‘User Group Membership through Badge’ script for the automation plugin that may be suitable - though rather than adding them to a Trust Level group directly I think I would consider adding them to a custom group which granted a particular trust level (that way they shouldn’t be downgraded when the trust levels are periodically recalculated).

For this, I’m thinking Unlisting the topic is likely the best route. Unlisting does still send out notifications though for anyone Watching/Watching First Post a category, so you may also want to consider creating a brand new subcategory to put it in which nobody will have had a chance to start Watching yet.

1 Like

how do I add them to a custom group based on them being granted a badge, and then how do I grant them the trust level based on being in the group ?

where can I find this script

You would use the Automation script (see below). As part of creating a group, you can assign a trust level to be automatically granted with it:

It’s part of the Automation plugin:

3 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.