Enable Like-Button for not logged-in visitors

Would it be possible, to make Like-Button not to open Login-Form? It should work without log-in in my szenario…

No, that is not possible. We store the user who liked a post, and that information is used in a lot of places, so this isn’t something that could be easily changed.


Are there some concepts for alternative Controls like “stars” or an “ok”-Button to let not-logged-in-users interact?

None that relate to Discourse, everything relates to user accounts, if the user isn’t logged in there’s nothing to record against.


Can somebody describe the best practices, to customize the Like-Control? I am new in this tech-stack, my only knowledge regarding discourse are experiences with php, but not with the tech above

Could you elaborate on this?

I mean you can change the appearance of the button, beyond that there’s very little choice.

I meant a functional customizing: I want to change the logic, so the Like-Control will work without log-in. But i dont know the modular structure of discourse. Would you recommend a plug-in, or a direct change in php? And where could i make the change without breaking the integrity of the code? What happens with the changed code-snippet on Updates, etc?

Discourse core is not written in php.

You’ll have to make a very very custom plugin to get it to work but then, that would be violation of GDPR

Not to say, a feature as such is very easy to exploit as anyone with any sane knowledge of how to reverse engineer the browser cookies will be able to blast random posts with infinite likes.


Hello Bhanu, do you think, that i will learn very much from this answer, to solve the problem?

I’ve tried to answer the questions you raised in the above post. My suggestion is that you not try to mod the core functions unless you permanently want to brick your updates.


ok. Thanks, Bhanu. Now i know, what i should not do :wink:


I could see some value in a clone of the StackOverflow feature where anonymous clicks on the vote buttons are saved to the database but not directly published.

I’d want to see an extremely solid plan for how the data is supposed to be used before starting implementation (think GDPR “what are you going to do with this data about anonymous visitors?”). Directly publishing on the post is right out because it’s extremely easy to cheat wrt what anonymous visitors are doing.


Does someone know a way (best practices)
a) of functional customizing the Like-Button or
b) creating an additional control, that counts clicks on it (max 1 per IP-Adress), with click-count-sum may be displayed in the admin area?

if it only would be js, i wouldnt ask, but the solution needs persistence…

This isn’t really a support topic, nobody is doing this today. What you’re asking for is fairly complex and definitely not something we can easily assist you with.

Unless you’re conversant with javascript and Ruby what the solution more likely requires is money :money_with_wings:.

If you have a budget and the feature is really important to you maybe you could start a topic over on the #marketplace ?

Alternatively I would start over in #dev, because you’re going to be creating a plugin of some description.

1 Like

Ah, so the best pratices for changes in the logic in this case are plugins? ok. good to know. thx!

1 Like

If you plan to tackle this yourself see:

Beginner’s Guide to Creating Discourse Plugins (1) (2) (3) (4) (5) (6) (7)

And check out the guide in #dev-install to get yourself a development environment to start off.

1 Like

Trivia: @sam advocated for that feature back in the day and he was right!

The resulting data was very very interesting, if you compared anon votes to logged in votes, big discrepancies were usually indicative of a topic that needed some mod intervention.