PDA

View Full Version : stars hack for vbb2.0.3


Twizted 12
08-02-2001, 06:39 PM
does neone have a good stars hack for vbulletin version 2.0.3? if so, either post a url or something at least!!!:D

Twizted 12
08-05-2001, 08:08 PM
well? i know someone out there can help me pleaz?

Dennis Wrenn
08-05-2001, 08:42 PM
It was right on the front page of vBulletin.org:

http://www.vbulletin.org/hacks/hacks.php?action=gethack&id=38

tubedogg
08-05-2001, 08:47 PM
Actually that hack was for vB1.1.4. However try taking a look in the releases forum here...

Dennis Wrenn
08-05-2001, 09:49 PM
I modified the starhack 1.1.4 code to work with vB 2.0.3
Insert the bold code starting at line 164 of functions.php in the admin/directory (this code should be inside getpostbit())


if ($post[customtitle]==2) {
$post[usertitle] = htmlspecialchars($post[usertitle]);
}

//START STARHACK!
if ($post[usertitle]=="Administrator") {
$post[usertitle]="$post[usertitle]<br><img src=\"images/star1.gif\" border=0><img src=\"images/star2.gif\" border=0><img src=\"images/star3.gif\" border=0><img src=\"images/star4.gif\" border=0><img src=\"images/star5.gif\" border=0>";
}
elseif ($post[usertitle]=="Super Moderator") {
$post[usertitle]="$post[usertitle]<br><img src=\"images/star1.gif\" border=0><img src=\"images/star2.gif\" border=0><img src=\"images/star3.gif\" border=0><img src=\"images/star4.gif\" border=0><img src=\"images/star5.gif\" border=0>";
}
elseif ($post[posts]>300) {
$post[usertitle]="$post[usertitle]<br><img src=\"images/star1.gif\" border=0><img src=\"images/star2.gif\" border=0><img src=\"images/star3.gif\" border=0><img src=\"images/star4.gif\" border=0>";
}
elseif ($post[posts]>150) {
$post[usertitle]="$post[usertitle]<br><img src=\"images/star1.gif\" border=0><img src=\"images/star2.gif\" border=0><img src=\"images/star3.gif\" border=0>";
}
elseif ($post[posts]>75) {
$post[usertitle]="$post[usertitle]<br><img src=\"images/star1.gif\" border=0><img src=\"images/star2.gif\" border=0>";
}
elseif ($post[posts]>37) {
$post[usertitle]="$post[usertitle]<br><img src=\"images/star1.gif\" border=0>";
}
else {
$post[usertitle] = $post[usertitle];
}
//END STARHACK!

$jointime = (time() - $post[joindate]) / 86400; // Days Joined
if ($jointime < 1) { // User has been a member for less than one day.
$postsperday = "$post[posts]";
} else {
$postsperday = sprintf("%.2f",($post[posts] / $jointime));
}



You have to download starhack from the link I posted to get the images...

-Dennis

Twizted 12
08-05-2001, 11:49 PM
thnx dude it works perfect!!! you rule... now i just need some non blinkin stars >.< http://forums.twistedanime.net to see it!!

thnx again ^_^

toLT
08-08-2001, 02:51 PM
Hmzz don't work good .. at my forum some admins have 4 stars .. but some super moderators having 5 stars .. .LOL that is ****ty ..

Dennis Wrenn
08-08-2001, 04:08 PM
Do they have the appropriate user titles? If not, then just change the code.

toLT
08-08-2001, 04:12 PM
Hmzz don't know I just put that code that U have written UP THERE :)


if ($post[customtitle]==2) {
$post[usertitle] = htmlspecialchars($post[usertitle]);
}

//START STARHACK!
if ($post[usertitle]=="Administrator") {
$post[usertitle]="$post[usertitle]<br><img src=\"images/star1.gif\" border=0><img src=\"images/star2.gif\" border=0><img src=\"images/star3.gif\" border=0><img src=\"images/star4.gif\" border=0><img src=\"images/star5.gif\" border=0>";
}
elseif ($post[usertitle]=="Super Moderator") {
$post[usertitle]="$post[usertitle]<br><img src=\"images/star1.gif\" border=0><img src=\"images/star2.gif\" border=0><img src=\"images/star3.gif\" border=0><img src=\"images/star4.gif\" border=0><img src=\"images/star5.gif\" border=0>";
}
elseif ($post[posts]>300) {
$post[usertitle]="$post[usertitle]<br><img src=\"images/star1.gif\" border=0><img src=\"images/star2.gif\" border=0><img src=\"images/star3.gif\" border=0><img src=\"images/star4.gif\" border=0>";
}
elseif ($post[posts]>150) {
$post[usertitle]="$post[usertitle]<br><img src=\"images/star1.gif\" border=0><img src=\"images/star2.gif\" border=0><img src=\"images/star3.gif\" border=0>";
}
elseif ($post[posts]>75) {
$post[usertitle]="$post[usertitle]<br><img src=\"images/star1.gif\" border=0><img src=\"images/star2.gif\" border=0>";
}
elseif ($post[posts]>37) {
$post[usertitle]="$post[usertitle]<br><img src=\"images/star1.gif\" border=0>";
}
else {
$post[usertitle] = $post[usertitle];
}
//END STARHACK!

$jointime = (time() - $post[joindate]) / 86400; // Days Joined
if ($jointime < 1) { // User has been a member for less than one day.
$postsperday = "$post[posts]";
} else {
$postsperday = sprintf("%.2f",($post[posts] / $jointime));
}

Dennis Wrenn
08-08-2001, 04:16 PM
I meant, are the administrators labeled "Administrator" or are they like "Boss man"(or whatever)?

toLT
08-08-2001, 06:03 PM
They are Main administirator .. and mods put their status .... something like Crazy mod or just like that :))

Hehe

Dennis Wrenn
08-08-2001, 10:40 PM
In that case, you will have to check the usergroupid rather than the usertitle.

Admin = 6
Mod = 7
Super Mod = 5

Change the first seven lines(starting with //start starhack) to this

//START STARHACK!
if ($post[usergroupid]==6) {
$post[usertitle]="$post[usertitle]<br><img src=\"images/star1.gif\" border=0><img src=\"images/star2.gif\" border=0><img src=\"images/star3.gif\" border=0><img src=\"images/star4.gif\" border=0><img src=\"images/star5.gif\" border=0>";
}
elseif ($post[usergroupid]==5) {
$post[usertitle]="$post[usertitle]<br><img src=\"images/star1.gif\" border=0><img src=\"images/star2.gif\" border=0><img src=\"images/star3.gif\" border=0><img src=\"images/star4.gif\" border=0><img src=\"images/star5.gif\" border=0>";
}

Afterburner
08-18-2001, 04:23 PM
works great :)

toLT
08-18-2001, 04:32 PM
Yep .. tnx man :)

maverick1236
08-18-2001, 05:01 PM
i upgraded to 2.03 and found the stars hack for 2.01 didnt work-so i just borrowed showthread.php from 2.01 and replaced it-works great now :)

Afterburner
08-18-2001, 05:30 PM
@ Maverick1236

If you use the showthread.php from 2.01 you havn´t any nav bars in a multiple sites thread to navigate between the different sites.

maverick1236
08-18-2001, 07:01 PM
thanks for pointing that out-i tried putting the code before the pm link in functions.php rather than after-and it worked-go figure ;):)

Kehfera
08-20-2001, 03:03 AM
I added the lines for the Admins and moderators and added 6 different customized titles. (just to play)

I had to adjust the information according to the post by Dennis when the USERGROUPID was needed for the title to work with the stars.

I also used a different group of stars with different colors for the ADMINS and Moderators.

Admin Stars = pend1.gif to pend5.gif
Super Mod Stars = pend6.gif to pend10.gif
Moderator Stars = pend11.gif to pend15.gif

The stars were made with Fireworks at 13 x 13 pixels. The backbround is transparent. After getting the star centered I adjusted the canvas size to 15 X 17 pixels to accomodate some spacing requirement. I exported the file as a gif.

All stars are in a zip file attached to this posting. I have also included the original Fireworks graphics for people who wish to change the color.

My titles for users are:

Seeker (Minimum Posts: 0) [edit] [remove]
Novice (Minimum Posts: 25) [edit] [remove]
Initiate (Minimum Posts: 50) [edit] [remove]
Member (Minimum Posts: 100) [edit] [remove]
Guide (Minimum Posts: 200) [edit] [remove]
Guru (Minimum Posts: 400) [edit] [remove]

These titles use all the same group of stars....pend16.gif, pend17.gif, pend18.gif, pend19.gif, pend20.gif

All total are the 3 indications for my groups and 6 user titles.

NOTES from TXT file ----------------------------------------------------------

Made by Wombag for all board in vbb :)

I modified the starhack 1.1.4 code to work with vB 2.0.3

1. Upload the file star.gif in your images directory.

2. Make a backup of functions.php in admin directory.

3. Open your functions.php file.


Insert the code starting //START STARHACK! at line 164 of functions.php.

This code should be inside getpostbit()

- Dennis

My additional notes ----------------------------------------------------------

I have 6 different user titles besides Administrator and Super Moderator

Admin = 6
Mod = 7
Super Mod = 5

I used a set of stars for each group.

1 - Red = Administrator - 7 point star.
2 - Green = Moderator - 5 point star
3 - Blue = Super Moderator - 7 point star.
4 - Yellow = User - 5 point star.

find the following code:------------------------------------------------------

if ($post[customtitle]==2) {
$post[usertitle] = htmlspecialchars($post[usertitle]);
}
add code:----------------------------------------------------------------------
//START STARHACK!
if ($post[usergroupid]==6) {
$post[usertitle]="$post[usertitle]<br><img src=\"images/pend1.gif\" border=0><img
src=\"images/pend2.gif\" border=0><img src=\"images/pend3.gif\" border=0><img src=\"images/pend4.gif\" border=0><img src=\"images/pend5.gif\" border=0>";
}
elseif ($post[usergroupid]==5) {
$post[usertitle]="$post[usertitle]<br><img src=\"images/pend6.gif\" border=0><img
src=\"images/pend7.gif\" border=0><img src=\"images/pend8.gif\" border=0><img src=\"images/pend9.gif\" border=0><img src=\"images/pend10.gif\" border=0>";
}
elseif ($post[usergroupid]==7) {
$post[usertitle]="$post[usertitle]<br><img src=\"images/pend11.gif\" border=0><img
src=\"images/pend12.gif\" border=0><img src=\"images/pend13.gif\" border=0><img src=\"images/pend14.gif\" border=0><img src=\"images/pend15.gif\" border=0>";
}
elseif ($post[posts]>400) {
$post[usertitle]="$post[usertitle]<br><img src=\"images/pend16.gif\" border=0><img
src=\"images/pend17.gif\" border=0><img src=\"images/pend18.gif\" border=0><img src=\"images/pend19.gif\" border=0><img src=\"images/pend20.gif\" border=0>";
}
elseif ($post[posts]>200) {
$post[usertitle]="$post[usertitle]<br><img src=\"images/pend16.gif\" border=0><img
src=\"images/pend17.gif\" border=0><img src=\"images/pend18.gif\" border=0><img src=\"images/pend19.gif\" border=0>";
}
elseif ($post[posts]>100) {
$post[usertitle]="$post[usertitle]<br><img src=\"images/pend16.gif\" border=0><img
src=\"images/pend17.gif\" border=0><img src=\"images/pend18.gif\" border=0>";
}
elseif ($post[posts]>50) {
$post[usertitle]="$post[usertitle]<br><img src=\"images/pend16.gif\" border=0><img
src=\"images/pend17.gif\" border=0>";
}
elseif ($post[posts]>25) {
$post[usertitle]="$post[usertitle]<br><img src=\"images/pend16.gif\" border=0>";
}
else {
$post[usertitle] = $post[usertitle];
}
//END STARHACK!

continued file code :----------------------------------------------------------

$jointime = (time() - $post[joindate]) / 86400; // Days Joined
if ($jointime < 1) { // User has been a member for less than one day.
$postsperday = "$post[posts]";
} else {
$postsperday = sprintf("%.2f",($post[posts] / $jointime));
}

Kehfera
08-20-2001, 03:13 AM
The last post would not let me attach the stars file. Too large. I had to delete two of the original graphics. They are duplicates anyway - just different colors.

LuBi
08-20-2001, 05:21 PM
My stars are apearing below my userid's how can I move it below the posts.

Here is a link to my demo forum (http://www.suprascene.com/forums/showthread.php?threadid=1)

Thing is, in my postbit it has $post[stars] below Posts so I mean it should work but for some reason it doesn't any help would be great.

Kehfera
08-21-2001, 12:00 AM
Sorry Lubi. I don't see your stars anywhere. But your buttons are good. What program did you use?

What version are you running?? Of course I am not a moderator but after investigating this star thing for a bit, I found several items of interest and combined them to the information you see above. I am running version 2.0.3 - and this was a very easy hack. I am not a programmer and was able to manipulate the code easily.

See Ya!

Bane
08-21-2001, 12:14 AM
Go here for the buttons: http://www.vbulletin.com/forum/showthread.php?threadid=25156

Valk did a good job :)

Pie'oh'pah
08-21-2001, 12:29 AM
Originally posted by Maverick1236
a trick
i upgraded to 2.03 and found the stars hack for 2.01 didnt work-so i just borrowed showthread.php from 2.01 and replaced it-works great now


dude it would have been a good idea to mention you'd 'borrow' the showthread.php from another version.

That's what has been confusing me as i said, there is no such code in 2.0.3....

Confusion now gone by accidently reading this thread :D

You may straighten that out in the other thread to not let people do harakiri while trying to find the replacement strings in showthread of 2.0.3

-Alex

PS: The other stars hack is workin perfectly with 2.0.3 when doing the appropriate adjustments mentioned in this thread (http://www.vbulletin.com/forum/showthread.php?s=&threadid=19081)