[Solved] Voting plugin : It shows -1 comments in every new discussion*
Hello I get -1 comment on every new discussion that I make.
http://madcraft.es/foro/
0
Hello I get -1 comment on every new discussion that I make.
http://madcraft.es/foro/
Comments
go to the dashboard then advanced and choose how many you want to show.
@pinguisl entre al dashboard y avanzado y escoja cuantos quiere mostrar
❌ ✊ ♥. ¸. ••. ¸♥¸. ••. ¸♥ ✊ ❌
That's not the problem is that it show -1 on the right. I don't know why.
The reason it shows '-1' in some of the discussions is that there are no comments yet on those discussions. I think it's something technical and I hope it's a plugin that shows those numbers, so it can be easily fixed.
The problem is : You need to do some digging in PHP code, are you ready for that?
There was an error rendering this rich post.
It's the Voting plugin, But I don't know how to fix it.
in the class.voting.plugin.php
/** * Insert sorting tabs after first comment. */ public function DiscussionController_BeforeCommentDisplay_Handler($Sender) { // if (!C('Plugins.Voting.Enabled')) // return; $AnswerCount = $Sender->Discussion->CountComments - 1; $Type = GetValue('Type', $Sender->EventArguments, 'Comment'); if ($Type == 'Comment' && !GetValue('VoteHeaderWritten', $Sender)) { //$Type != 'Comment' && $AnswerCount > 0) {Change the -1 to 0
❌ ✊ ♥. ¸. ••. ¸♥¸. ••. ¸♥ ✊ ❌
try looking class.voting.plugin.php
This is just an idea. It may work for you and it may not.
Gdn_Format::BigNumber($Discussion->CountComments - 1)
to
Gdn_Format::BigNumber($Discussion->CountComments)
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
Fixed Thanks to everybody
You know it is actually funny that there could be a negative number of comments, kind of like, "You have less than 0 comments. -1=Pathetic...." lol
❌ ✊ ♥. ¸. ••. ¸♥¸. ••. ¸♥ ✊ ❌