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.
Little help with Kudos?
BDHarrington7
New
So this plugin hasn't been maintained in years, and subsequently broke in 2.1 somewhere. I upgraded from 2.0.18 to 2.1.8p2, and the Kudos plugin (the only one of it's kind on this platform, amazingly) crashes when you view a thread. It crashes here:
23 Feb 2015 - 00:30:00 dev.cwak.us Garden Exception: DiscussionController->Options not found. in /var/www/kristy/applications/vanilla/controllers/class.discussioncontroller.php on 4423 Feb 2015 - 00:30:00 dev.cwak.us Garden #0 /var/www/kristy/plugins/Kudos/default.php(320): DiscussionController->__get('Options')23 Feb 2015 - 00:30:00 dev.cwak.us Garden #1 /var/www/kristy/library/core/class.pluginmanager.php(705): KudosPlugin->DiscussionController_CommentOptions_Handler(Object(DiscussionController), Array, 'discussioncontr...')23 Feb 2015 - 00:30:00 dev.cwak.us Garden #2 /var/www/kristy/library/core/class.pluginmanager.php(638): Gdn_PluginManager->CallEventHandler(Object(DiscussionController), 'DiscussionContr...', 'CommentOptions', 'Handler')23 Feb 2015 - 00:30:00 dev.cwak.us Garden #3 /var/www/kristy/library/core/class.pluggable.php(144): Gdn_PluginManager->CallEventHandlers(Object(DiscussionController), 'DiscussionContr...', 'CommentOptions')23 Feb 2015 - 00:30:00 dev.cwak.us Garden #4 /var/www/kristy/applications/vanilla/views/discussion/helper_functions.php(334): Gdn_Pluggable->FireEvent('CommentOptions')23 Feb 2015 - 00:30:00 dev.cwak.us Garden #5 /var/www/kristy/applications/vanilla/views/discussion/helper_functions.php(351): GetCommentOptions(Object(stdClass))23 Feb 2015 - 00:30:00 dev.cwak.us Garden #6 /var/www/kristy/applications/vanilla/views/discussion/helper_functions.php(88): WriteCommentOptions(Object(stdClass))23 Feb 2015 - 00:30:00 dev.cwak.us Garden #7 /var/www/kristy/applications/vanilla/views/discussion/comments.php(19): WriteComment(Object(stdClass), Object(DiscussionController), Object(Gdn_Session), 1)23 Feb 2015 - 00:30:00 dev.cwak.us Garden #8 /var/www/kristy/applications/vanilla/views/discussion/index.php(52): include('/var/www/kristy...')23 Feb 2015 - 00:30:00 dev.cwak.us Garden #9 /var/www/kristy/library/core/class.controller.php(779): include('/var/www/kristy...')23 Feb 2015 - 00:30:00 dev.cwak.us Garden #10 /var/www/kristy/library/core/class.controller.php(1245): Gdn_Controller->FetchView('', false, false)23 Feb 2015 - 00:30:00 dev.cwak.us Garden #11 /var/www/kristy/library/core/class.pluggable.php(210): Gdn_Controller->xRender()23 Feb 2015 - 00:30:00 dev.cwak.us Garden #12 /var/www/kristy/applications/vanilla/controllers/class.discussioncontroller.php(234): Gdn_Pluggable->__call('Render', Array)23 Feb 2015 - 00:30:00 dev.cwak.us Garden #13 /var/www/kristy/applications/vanilla/controllers/class.discussioncontroller.php(234): DiscussionController->Render()23 Feb 2015 - 00:30:00 dev.cwak.us Garden #14 [internal function]: DiscussionController->Index('211', 'kristy-s-new-wo...', '')23 Feb 2015 - 00:30:00 dev.cwak.us Garden #15 /var/www/kristy/library/core/class.dispatcher.php(350): call_user_func_array(Array, Array)23 Feb 2015 - 00:30:00 dev.cwak.us Garden #16 /var/www/kristy/index.php(46): Gdn_Dispatcher->Dispatch()23 Feb 2015 - 00:30:00 dev.cwak.us Garden #17 {main}
Here's the code it crashes on (line 2):
public function DiscussionController_CommentOptions_Handler($Sender) {
$Sender->Options .= '';
$Sender->Options .= $this->FormatKudos($Sender->EventArguments['Object']->DiscussionID, $Sender->EventArguments['Object']->CommentID);
$Sender->Options .= '';
}
I've looked through the plugin documentation, trying to figure out where the options field went, (some of which doesn't seem to have been updated since 2011), and I'm debugging the application to see if there's a comparable field to add this information to. Basically I'm just looking for the place to put these comment options code blocks.
Tagged:
0
Comments
Have you tried applying this to the plugin ?
http://vanillaforums.org/discussion/25534/how-to-modify-an-old-plugin-for-2-1
❌ ✊ ♥. ¸. ••. ¸♥¸. ••. ¸♥ ✊ ❌
Hi @vrijvlinder, I've looked at your tutorial and I've already done the suggestions you put in there, however I lost you where you were saying,
as it left off there.
I've moved the code to my Github where you can view the code in it's entirety and people can contribute fixes:
https://github.com/bdharrington7/Kudos
This also contains some tweaks I've added on my own (i.e. "Loves" and "hates" has been replaced with "Aye" and "Nay", etc. so any line numbers referencing the original may be slightly off.
Thanks for the tips so far!
Ok, so does this mean it now works for you ?
❌ ✊ ♥. ¸. ••. ¸♥¸. ••. ¸♥ ✊ ❌
No, it does not work. The Options object in the DiscussionController doesn't exist any more, and all the plugin documentation I've found so far indicates that it does.
Referencing here: http://vanillaforums.org/docs/pluginquickstart
Try reading the source instead of the documentation. Search for the name of the event inside the code and you might learn something
I made a PR where I deleted that whole options part and sent the Kudos +1/-1 to the Reactions. I'm quite surprised that it is only there for comments. Shouldn't it also be active for discussions?
I can give Kudos to my own comments, that's strange... KudosPlugin function AddPoint should check if Comments author is current user.
Any hope to fix this plugin? Is there anything similar?
I started out using this on my forum.
http://vanillaforums.org/addon/voting-plugin
Then i moved to reactions from this plugin kind of like what this forum is using.
http://vanillaforums.org/addon/yaga-application
Then you can set points up to give badges out, it is awesome.
@nikonrumors I have a currently working version hosted here: https://github.com/bdharrington7/Kudos