Please upgrade to 2.1.x here. The 2.0 branch is no longer being updated.
Current version is 2.1.11, released 12 June.

like button / thankful people - how to make this plugin

edited November 2010 in Vanilla 2.0 Help

I guess some of you are waiting for an addon like thankful people of vanilla 1 or like the facebook "like" button.

Vanilla 2 has allready an plugin to vote comments ( and you can save favorites - but that's different from a like button.

I don't think I am able to write such a plugin right now, but I would like to start a discussion about how such a plugin has to work - so it might be easier for someone or for me to build it.

== technic ==

1) Database
There must be a database save foreignID (comment or Discussion), and foreignType ("comment" or "discussion") (in Vanilla 2 the first post of a discussion is not a comment itself, right?).
It also has to save UserID, and may like/dislike (?!)

2) PHP 1
A script has to check, if every comment/discussion, that is printed was liked/disliked by anyone. Then show a little message like "liked by: name1, name2, name3" or "liked 3 times" (and if you click on it, shows the names)

3) PHP 2
A script has to write or delete "like" in the database if someone clicks the link to like or dislike

4) PHP 3
A script has to include a link "like" to a comment - and another link to "stop like", if the person likes that comment

5) PHP 4
A script has to check permissions

6) JavaScript / AJAX
A Script has to post "like" to the PHP 2 - and update the page via Ajax - there must also be a PHP fall back, to have it work without JavaScript

May there could be a function to define several attributs "link" "thank" "dislike"...

May there could be a count of how often people liked the comments of a person in his_her profil (like in thankfull people)

What else has to be codet?
Are there Plugins/extentions doing similar things - so one could take snippets of their code for the first release?

Is someone working on this?


Sign In or Register to comment.