HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Sharing some tweaks to make work with 2.1
Hiya,
I'm working with the 2.1 alpha at the moment and had to do some tweaks to get things working.
I thought I'd share so you don't have to figure them out when 2.1 comes out.
public function PostController_BeforeCommentRender_Handler(&$Sender)
changed to:
public function DiscussionController_BeforeCommentDisplay_Handler(&$Sender)
And
$Comments = $Sender->Data('CommentData');
changed to:
$Comments = $Sender->Data('Comments');
And
public function PostController_CommentInfo_Handler(&$Sender)
changed to:
public function DiscussionController_DiscussionInfo_Handler(&$Sender)
Hope that helps!
Kezz
5
Comments
THANK YOU. PostCounts have been broken for me for weeks! Thanks for finally getting them working!!!
You might change the &$Sender to $Sender - everywhere. you will probably be happier in the long run.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
Looks like this has solved the issue for me. Thanks!
The whole thing can be simplified to just
No need to query the databases again, when he data is freely available with he the author.
grep is your friend.
Hey all, I just tried installing this plugin, running Vanilla 2.1.9 and made the changes suggested by @KezzB and @peregrine, but when I try to enable the plugin, vanilla tells me the addon was unable to be enabled because it generated a fatal error: "Whoops: there was an error."
Am I doing something wrong?
Use the code x00 has posted.
... but you would like to add
@linc: Wouldn't it be good to update the current PostCount plugin with this code.
I would also add a postcount class, so it easier for designers to style it.
@phreak I suggest you use this one:
https://github.com/vanilla/addons/blob/master/plugins/PostCount/class.postcount.plugin.php
@linc @tim Can you update this plugin with the one from github?
The one that is currently in this repo is making a large number of additional queries where none are needed anymore.
My themes: pure | minusbaseline - My plugins: CSSedit | HTMLedit | InfiniteScroll | BirthdayModule | [all] - PM me about customizations
VanillaSkins.com - Plugins, Themes and Graphics for Vanillaforums OS
@Bleistivt done