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.
Who Liked...

Thanks for this plugin. I was trying to see if I could modify it so that it would add the names of all who liked it, like the Thankful People plugin. I haven't looked too much into it yet, but any advice where to start?
0
Comments
who liked what post is in the AllLikes table, listed by discussion, comment and userID
a little bit of fun with joins and you have your information.
Vanilla Wiki, Tastes Great! 31,000 viewers can't be wrong. || Plugin Development Explained
hi @ElatedMonk i think you might wanna try this : http://www.goodoldmemories.com/2012/02/zlike-comment-plugin-1-0-for-vanillaforums-2-0-18/
It's close, but it's still missing the like button vs just a like link & the total number of likes on each discussion.
modification wise @ElatedMonk i think zlike is nearest. if you purchase that plugin you can write an email to the developer and he might help. @Aolee
@hbf We added this function to the plugin on our site.
If your interested:
http://pastebin.com/NYZg6L7D
Somebody didn't see the expiration on put on the pastebin I sent them
http://pastebin.com/8HDE0vxs
The important parts are the functions at lines 73, and 275
sorry, i dont have time to run a diff right now. what function did you add?
Vanilla Wiki, Tastes Great! 31,000 viewers can't be wrong. || Plugin Development Explained
I think this is what they added
// This method gets called before the Render method gets called on the DiscussionsController object. $Discussion = $Args['Discussion']; $ID = $Discussion->DiscussionID; $Likes = $this->LikeModel->GetTotalDiscussionLikes($ID); $CountLikes = count($Likes); if($CountLikes){ $Userlist = ''; foreach ($Likes as $value) { $UserModel = new UserModel(); $User = $UserModel->GetID($value); $Userlist .= $User->Name . ', '; } $Src .= '' .$CountLikes. sprintf($CountLikes>1?T(' Likes'):T(' Like')).' '; echo $Src; } }
and
❌ ✊ ♥. ¸. ••. ¸♥¸. ••. ¸♥ ✊ ❌
ok, i'll test it out and determine if it's ready to go.
Vanilla Wiki, Tastes Great! 31,000 viewers can't be wrong. || Plugin Development Explained
If it's getting implemented On/Off option would be great to have i the backend.
Or you could also clone the plugin rename it Who Liked and then enable or disable either one from the dashboard when you want to. one version would have the who done it, and the other not.
❌ ✊ ♥. ¸. ••. ¸♥¸. ••. ¸♥ ✊ ❌
you could add this to default.php for photos of who liked in comments and discussions
kind of like the user reactions here. you could add a sprite overlay if you wanted.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
or in 2.1
public function DiscussionController_AfterReactions_Handler($Sender) { if ($Sender->EventArguments['Type'] == 'Discussion') { $DiscussionID = $Sender->EventArguments['Discussion']->DiscussionID; if ($Sender->Data['Comments'] instanceof Gdn_DataSet) $this->LikeModel->PreloadLikes($Sender->Data['Comments']); $ID = $DiscussionID; $Model = new DiscussionModel(); $Data = $Model->GetID($ID); $Likes = $this->LikeModel->GetDiscussionLikes($ID); } else { $DiscussionID = $Sender->EventArguments['Object']->DiscussionID; $ID = $Sender->EventArguments['Object']->CommentID; $Model = new CommentModel(); $Data = $Model->GetID($ID); $Likes = $this->LikeModel->GetCommentLikes($ID); $Url = $DiscussionID . '/comment/' . $ID; } foreach($Likes as $val) { $Reactor = Gdn::UserModel()->GetID($val); $photo = UserPhoto($Reactor,array('ImageClass' => 'ProfilePhotoSmall')); echo ''; if($photo) { echo $photo; } else { echo UserAnchor($Reactor); } echo ''; echo ''; } }
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
Super Coder P Strikes Again!!!
That is great @peregrine
❌ ✊ ♥. ¸. ••. ¸♥¸. ••. ¸♥ ✊ ❌
yes, having a setting would be the right way to go.
Vanilla Wiki, Tastes Great! 31,000 viewers can't be wrong. || Plugin Development Explained
the day i find one of my plugins forked without my express permission will be the last day you ever see me here.
Vanilla Wiki, Tastes Great! 31,000 viewers can't be wrong. || Plugin Development Explained
any idea how to make the plugin selectively choose the method depending on what version of the framework it's running in? I'd hate to maintain two separate branches.
Vanilla Wiki, Tastes Great! 31,000 viewers can't be wrong. || Plugin Development Explained
Naah, i hope you don't mean that serious. Remember my stolen plugins of VanillaSkins and the stupid situation they were in the official repository. This damn thing can happen in this situation here.
yes, i remember reading that discussion. I also remember V getting on a soap box in there on the subject. yet, i've seen her recommend forking my plugins or other such nonsense a couple times now.
i have a zero tolerance for that sort of thing. so if i believed this community supported that behavior, i'd be gone.
Vanilla Wiki, Tastes Great! 31,000 viewers can't be wrong. || Plugin Development Explained
You could compare against the
APPLICATION_VERSION
.You could also just use both hooks and don't execute in the thing has been executed once.
Search first
Check out the Documentation! We are always looking for new content and pull requests.
Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.