A slightly different way, utilizing the options in the control panel is something I wrote a while back:
Add this in place of the hard coded ratings in the if( .. ) blocks.
Code:
/// Begin Star Generation
$stars = "";
$formulabits = explode( ";", $userstarformula );
for( $i = 0; $i < count( $formulabits ); $i++ ) {
if( $userpostcount >= $formulabits[ $i ] ) {
$stars .= $startext;
} // end if
} // end if
if( empty( $stars ) ) {
$stars = $startext;
} // end if
/// End Star Generation
Then some things in /admin/options.php:
Add this after the "Styles Options" in options.php -- should be right up at the top around line 68.
Code:
<li><a href=\"#stars\">Stars Options</a></li>
Add this after the "Text that means off. This is used to keep the code language independant.." in the options section.. Around line 600.
Code:
<!--/// Stars stuff-->
<tr><td colspan=2><p><hr></p></td></tr>
<tr>
<td><p><a name=\"stars\"></a><b>star character or image</b></p></td>
<td><p><input type=\"text\" size=\"35\" name=\"newoption[startext]\" value=\"$startext\"></p></td>
</tr>
<tr><td colspan=2><p>What should we use for stars? Can be a character (e.g. *) or an image (e.g. http://www.yourboard.com/forums/img/...</p></td></tr>
<!--// user star ratings-->
<tr>
<td><p><b>user star formula</b></p></td>
<td><p><input type=\"text\" size=\"35\" name=\"newoption[userstarformula]\" value=\"$userstarformula\"></p></td>
</tr>
<tr><td colspan=2><p>What kind of formula to use for user star generation?<br></p></td></tr>
<!--/// End Stars stuff-->
Ok, so you have the option of using a URL for the image, if you want make it an image, make sure to put in the entire image url.
Otherwise you can use text (I just use the star *).
Also, the formula is something like this:
0;19;99;399;1999
So users with more than one post but less than 19 will get one star, users in between 19 and 99 will get two, etc. And if you want to add another star level, just add another number to the end!
example:
0;19;99;399;1999;9999
But, if it seems harder to do, then don't worry about it -- I just thought I'd share it with people who are looking for this type of hack and might not want to mess with editing PHP files to find the right "formula" -- it took me a while to find a good balance, and if I had to keep uploading a PHP file I'd go crazy!