Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
like button / thankful people - how to make this plugin
Hi,
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 (http://vanillaforums.org/addon/voting-plugin) 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?
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 (http://vanillaforums.org/addon/voting-plugin) 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?
0
Comments
But another thing the Plugin has to have:
7) CSS-Stylesheet
Style the display of the "likes" - most stuff should be formated like everything else that has similar functions in vanilla
Can we see it in action?
There was an error rendering this rich post.