Showing Highest and Lowest Karma Rating in Stats Page

Started by Tristan Perry, October 24, 2004, 05:05:33 AM

Previous topic - Next topic

LHW

My SMF version is 1.1.3, and MySQL is at 5.0.27-standard.  For the most part, it works great...until someone goes into Negative Karma.

Right now, there's one person at my board with a negative karma, and he's listed at the top of the "Highest Karma" list.  Shouldn't he be at the bottom of the "Lowest Karma" list??

In the hopes that I mistyped something, I re-edited the files, and the results are the same.  Any idea on how to correct this?

Thanks!


ディン1031

Because MySQL have a bug there on some Versions. You need to use trick for this that it work.

Replace the FLOOR(karmaGood-karmaBad) with FLOOR(1000000+karmaGood-karmaBad) than it should work correct ;). I used this in my SSI Karma mod that it work correct. Why 1000000 because the maximum Karma is 999999 more is not allowed in the table so it would never go under 0 ;).

Bye
DIN1031
Support only via MOD Thread! NO PM Support!
My Forum: ayu][kult Forum
My Mods: My Small Mod Collection
My Parser: DIN1031's ModParser
Current Info: More away the next days, because i've to much work to do :x

LHW

Thanks, DIN!  That worked perfectly!  ;D

Kudos to you!!  :)


Neorics

possible to show those stats in the board index? at the bottom
[For Hire] I can help you with anything regarding Simple Machines Forum  ~ My Portfolio

metallica48423

it should be, but tbh i have no idea what to put where.  You'd have to modify the Sources/BoardIndex.php and the Boardindex.template.php
Justin O'Leary
Ex-Project Manager
Ex-Lead Support Specialist

QuoteMicrosoft wants us to "Imagine life without walls"...
I say, "If there are no walls, who needs Windows?"


Useful Links:
Online Manual!
How to Help us Help you
Search
Settings Repair Tool

Neorics

nah... i added the highest karma SSI mod and used that...
[For Hire] I can help you with anything regarding Simple Machines Forum  ~ My Portfolio

metallica48423

Justin O'Leary
Ex-Project Manager
Ex-Lead Support Specialist

QuoteMicrosoft wants us to "Imagine life without walls"...
I say, "If there are no walls, who needs Windows?"


Useful Links:
Online Manual!
How to Help us Help you
Search
Settings Repair Tool

steve51184

does this work on smf 2.0 rc2 or is there an alternative hack/mod for something like this?


steve51184


Advertisement: