![]() |
Here is an update to my stars hack - this one allows you different colored stars for admins/moderators
edit showthread.php find: Code:
$userinfo=$DB_site->query_first("SELECT userid,email,username,usertitle,signature,showemail,homepage,icq,aim,yahoo,joindate,posts FROM user WHERE userid=$userid"); Edit that line listed above and add Code:
usergroupid, Code:
$userinfo=$DB_site->query_first("SELECT usergroupid,userid, (...) etc etr Code:
$userpostcount=$userinfo[posts]; Code:
// --- Stars Hack by rangersfan You need to supply your own stars names "star.gif" and "star2.gif". "star2.gif" is for admins/moderators. Put them in forums/images. To modify how many stars correspond to how many posts you will need to change the if ($userpostcount > ..) parts. If you don't want stars, but galagas or such, change the parts that say '$stars .= $starsgif . $starsgif . $starsgif . $starsgif . $starsgif;' to something like '$stars .= (path to my image for x number of posts);' Edit the postbit template and put $stars where you want them to appear. [Edited by freddie on 11-04-2000 at 04:56 PM] |
Why not just add the html into custom user titles from the control panel?
~Chris |
I think it is something that should be included by default with vB, with a toggle of course. |
OK i see now ;) I was just curious
~Chris |
Excellent! This is exactly what I was looking for! I was about to try making my own, but decided to take another look through the forums and see if somebody had already made one. Thanks, and well done :)
BTW, does anyone know where I can get some star images? Preferably gold and silver. I'm afraid of what might happen if I attempt to make my own... lol. -Tom |
Quote:
|
Good idea! hehe. That site has some gold stars... I don't really care for the red ones.. I'll try to change the color to blue or silver I guess :) Thanks!
-Tom |
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:
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> Code:
<!--/// Stars stuff--> Code:
<IMG SRC = "etc."> 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! :) |
For some reason, I can't get Rangersfan's code to work on my board. I followed the instructions exactly and didn't change any of the code except for the image names and image sizes. Has anyone else had any problems getting this working? or is there something I have to do after editing showthread.php? Here's what my code looks like after I add the hack:
Code:
$userinfo=$DB_site->query_first("SELECT usergroupid,userid,email,username,usertitle,signature,showemail,homepage,icq,aim,yahoo,joindate,posts FROM user WHERE userid=$userid"); |
Edit the postbit template and put $stars where you want them to appear.
|
All times are GMT. The time now is 10:52 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|