1
   

explain this karma hack

 
 
Reply Fri 24 Dec, 2004 07:39 am
i want a karma point system for my forum and i download one hack from the net but i dont know what it does, can someone explainn it for me?

Quote:
Code://********* hack start **************
$karmaquery = $db->query("SELECT fid, point, judge FROM $table_posts WHERE pid='$pid'");
$karmatemp = $db->fetch_array($karmaquery);
$karmaquery = $db->query("SELECT status FROM $table_members WHERE username='$cdbuser'");
$membertemp = $db->fetch_array($karmaquery);
$karmaquery = $db->query("SELECT moderator FROM $table_forums WHERE fid='$karmatemp[fid]'");
$moderatortemp = $db->fetch_array($karmaquery);
if (($membertemp[status] != "ÂÛ̳¹ÜÀí?"±") && ($membertemp[status] != "³¬¼¶°æ?-÷") && (strstr($moderatortemp[moderator],$cdbuser) != $cdbuser)) {
$supercdb = 0;
$allowkarma = 0;
} else {
$supercdb = 1;
}

if($allowkarma && $maxkarmavote && ($karmatemp[point]=='0')) {
$offset = 1;
//$offset = ceil($maxkarmavote / 6);
$karmabox = " <select name=\\\"fid\\\" id=\\\"fid\\\" onchange=\\\"if(this.options[this.selectedIndex].value != '') {\n"
."window.location=('topicadmin.php?action=karma&tid=\$tid&username=\$encodename&score='+this.options[this.selectedIndex].value+'&sid=$sid&pid=$pid') }\\\" align=\\\"absmiddle\\\">\n"
."<option value=\\\"\\\">ÆÀ·?-</option>\n"
."<option value=\\\"\\\">----</option>\n";
for($vote = - $maxkarmavote; $vote <= $maxkarmavote; $vote += $offset) {
$votenum = $vote > 0 ? "+$vote" : $vote;
$karmabox .= $vote ? "<option value=\\\"$vote\\\">$votenum</option>\n" : NULL;
}
$karmabox .= "</select>\n";
eval("\$karma = \"$karmabox\";");
} else {
if ($supercdb == 1) {
$offset = 1;
$karmabox = " <select name=\\\"fid\\\" id=\\\"fid\\\" onchange=\\\"if(this.options[this.selectedIndex].value != '') {\n"
."window.location=('topicadmin.php?action=karma&tid=\$tid&username=\$encodename&score='+this.options[this.selectedIndex].value+'&sid=$sid&pid=$pid') }\\\" align=\\\"absmiddle\\\">\n"
."<option value=\\\"\\\">$karmatemp[point][$karmatemp[judge]]</option>\n"
."<option value=\\\"\\\">?-ØÐÂÆÀ·?-</option>\n"
."<option value=\\\"\\\">----</option>\n";
for($vote = - $maxkarmavote; $vote <= $maxkarmavote; $vote += $offset) {
$votenum = $vote > 0 ? "+$vote" : $vote;
//$karmabox .= $vote ? "<option value=\\\"$vote\\\">$votenum</option>\n" : NULL;
$karmabox .= "<option value=\\\"$vote\\\">$votenum</option>\n";
}
$karmabox .= "</select>\n";
eval("\$karma = \"$karmabox\";");
} else {
$karmabox = " <select><option>$karmatemp[point][$karmatemp[judge]]</option></select>\n";
eval("\$karma = \"$karmabox\";");
}
}
//********* hack end *****************



or if anybody can give me a good one

thanks
  • Topic Stats
  • Top Replies
  • Link to this Topic
Type: Discussion • Score: 1 • Views: 822 • Replies: 0
No top replies

 
 

Related Topics

Webdevelopment and hosting - Question by harisit2005
Showing an Ico File - Discussion by Brandon9000
how to earn money in internet - Discussion by rizwanaraj
The version 10 bug. Worse then Y2K! - Discussion by Nick Ashley
CSS Border style colors - Question by meesa
There is no Wisdom in Crowds - Discussion by ebrown p
THANK YOU CRAVEN AND NICK!!! - Discussion by dagmaraka
I'm the developer - Discussion by Nick Ashley
 
  1. Forums
  2. » explain this karma hack
Copyright © 2026 MadLab, LLC :: Terms of Service :: Privacy Policy :: Page generated in 0.03 seconds on 03/16/2026 at 12:16:53