PDA

View Full Version : Question about Stars Hack


06-20-2000, 08:14 AM
I want to install the stars hack on my board, but don't quite understand how to install it. I can do it manually 1 user at a time, but I was wondering if there is a way that once you register you have 1 star, and as you post more you will automatically get more stars. ( without me having to do it manually for every user). Any help is greatly appreciated.

Steven

06-20-2000, 08:18 AM
in your Control Panel, got to the User Titles and select "Modify"

after each title put:
<br><img src="images/star.gif">

just repeat the image source code for the number of starts you want for each title. Of course, you might have to adjust the path in the img code, too...

06-20-2000, 10:23 PM
Hi ya

I tried doing as you said, and it is fine for the User Titles, but in the User Groups section, I cannot add more than 3 stars to my Administrator group. :/

Any ideas?

--James

06-20-2000, 10:59 PM
Easy, just make a single image with the amount of stars in it you want to have, upload it to your webserver and use the IMG SRC thing to link to it.

06-21-2000, 12:19 PM
I didn't have time to do anything fancy but here's the code to do a simple star raiting system based on the number of posts.

First off, go to line 228 of showthread.php and add the following code:

if($userinfo[posts]>1){
$userstars_count=1;
}
if($userinfo[posts]>24){
$userstars_count=2;
}
if($userinfo[posts]>49){
$userstars_count=3;
}
if($userinfo[posts]>74){
$userstars_count=4;
}
if($userinfo[posts]>100){
$userstars_count=5;
}

for($i;,$i<$userstars_count;,$i++){
$userstars .= "<IMG SRC=\"images/star.gif\" BORDER=0>";
}

(you can easily change how many posts are required to advance a level by changing each if statement).

Upload this file and go to your admin. In the template editor, add the code <smallfont>$userstars</smallfont><br><br> to the postbit template (you probably will want to put this under the $usertitle line). Save the template and load up any thread, the stars will be there!

You can see this in use at www.scubaboard.com (the board is new so very few people have more than 1 star). you can also grab my star collection at www.scubaboard.com/hacks/stars.zip

[Edited by ExtremeFactor on 06-21-2000 at 09:25 PM]

06-21-2000, 04:38 PM
Hi ya

I can see what you done there, but I can get that part working.
I have no problem with the amount of stars to the amount of posts, but what I wanted was to have the Administrator on 10 stars, but it won't let me add more than 3 stars to his name :/

--WildWayz

06-21-2000, 04:59 PM
that's really strange. I didn't add them in the User Groups area, though. I added them to the User Titles. Of course, the Admins and Mods aren't included in the titles...

06-21-2000, 05:08 PM
Yeppers :)

Works fine for the User Titles, but not the User Groups. I think it is because of the string length in the entry field - 'cos it cuts it off.

--James

06-21-2000, 09:30 PM
Yep, agree with Martin, you should add the code to the User Titles section, then add the admins and mods code seperately... As has been said before, you'll need an image which shows the number of stars, you can't simply repeat the same image call like 10 times...

06-22-2000, 12:52 PM
Craig and others,
What I porivded was just a simple solution until the creator of vBulletin has time to do a full upgrade with this built in. You can easily change this hack to use single images for stars or seperate images for admins, whatever you like.

as for making it a field in the admin panel, that involved modifying the actual sql table, something I dnot wisht o do unless I knew the hack would remain in the script forever.