PDA

View Full Version : Stars Ahck (again...)


06-24-2000, 01:53 PM
Not being happy with placing the stars beside the users title in the control panel because it doesn't apply to custom titles that Admin's and Moderators have (and any other users you give titles to) I have made my own stars hack. I know you can add the stars to the custom title but then they don't auto-update according to posts, you have to do it manually. There have been others posted but they didn't seem to work right. Can someone tell me what usergroupid's different groups have so I can make options for different stars for different levels (admin, moderator, etc)


// --- Stars Hack by rangersfan - This will add stars for every user based
// on the number of posts they have.
// Edit showthread.php and place this code right after "$userpostcount=$userinfo[posts];"
// ABout line 232 in v1.1.3beta2
// Add $stars in the 'postbit' template where you want the stars to appear - usually after
// the $usertitle line.

$stars = "";
$starsgif = "<img src=\"images/star.gif\" border=0>";
if ($userpostcount > 1999)
{ $stars .= $starsgif . $starsgif . $starsgif . $starsgif . $starsgif; }
elseif ($userpostcount > 999)
{ $stars .= $starsgif . $starsgif . $starsgif . $starsgif; }
elseif ($userpostcount > 399)
{ $stars .= $starsgif . $starsgif . $starsgif; }
elseif ($userpostcount > 99)
{ $stars .= $starsgif . $starsgif; }
elseif ($userpostcount > 19)
{ $stars .= $starsgif; }

// End Stars Hack


[Edited by rangersfan on 06-24-2000 at 10:59 PM]