I run a vbulletin forum and I have the Karma hack.
I have created a display of everyone's points:
http://www.powwows.com/dance/karmatotals.php
Here is the script:
$query = "select uid, newthread+reply+view+admin_mod+morereply+totalpenalty as total from storepoint order by total desc";
$my_q = mysql_query($query) or die(mysql_error());
$row_count = mysql_num_rows($my_q);
for ($i=0; $i<$row_count; $i++) {
list($uid, $total) = mysql_fetch_row($my_q);
$my_q2 = mysql_query("select username from user where userid='$uid'") or die(mysql_error());
list($username) = mysql_fetch_row($my_q2);
print "<tr><td BGCOLOR=#ffffcc>$username</td><td BGCOLOR=#ffffcc align=center>$total</td></tr>";
mysql_free_result($my_q2);
Now, I also have a hack that updates a field called views in the user table. I would like to take the number in views and add it to the total from above.
How can I do that?
Thanks