PDA

View Full Version : Simple rank images hack


EvilLS1
25 Dec 2002, 21:06
The stars hack wasn't really what I was looking for, so I came up with this.

This is a simple way to show rank images (based on post count) under your member's usernames in the postbit.
Since its based on post counts rather than titles, it works no matter if your users have custom titles or not.

PS: Hopefully I'm not re-inventing the wheel here.. :laugh: If someone has already posted this, my appologies, and feel free to delete this.

Screenshot below. :)

{Edit}
Zip file updated.

EvilLS1
25 Dec 2002, 21:08
Screenshot

Chris M
25 Dec 2002, 22:22
Nice:)

Satan

Xenon
25 Dec 2002, 22:31
i think i've seen such thing very often ;)

just a question: why not just use html - img code in the usertitles?

also, is the zip-file ok, the txt file in, i can't open with ultraedit, just notepad, and it didn't show up well :)

Arabs Emperor
25 Dec 2002, 22:33
good hack i like it so much thanks

EvilLS1
25 Dec 2002, 22:41
Originally posted by Xenon
i think i've seen such thing very often ;)

just a question: why not just use html - img code in the usertitles?

Ah, my bad then. I didn't see anything similar in the hacks database. Whats the name of it?

Also, I'm not sure I understand what you mean by useing html -img code in the usertitles. What do ya mean? I don't think its possible to display ranks based on post counts with just html? How would it check the post count?


also, is the zip-file ok, the txt file in, i can't open with ultraedit, just notepad, and it didn't show up well :)

No idea.. Works OK for me (notepad). :confused:

Xenon
25 Dec 2002, 22:45
i think it's not released as hack, just moretimes in the requestforum :)

if i understand right what you try to do, no hacking at all is needed

in your ACP you can set up usertitles depending on postcount, and there you can also use html, also on the usergroup usertitles.

or did i get something wrong?
if yes, tell me and i'll move it back :)

EvilLS1
25 Dec 2002, 22:53
Originally posted by Xenon


in your ACP you can set up usertitles depending on postcount, and there you can also use html, also on the usergroup usertitles.

or did i get something wrong?
if yes, tell me and i'll move it back :)

Hehe, it won't work with custom titles that way (the ones that members set themselves).. And about 75% of my members have custom titles. ;)

It doesn't matter to me though.. I just thought someone else might find it useful. :)

Xenon
25 Dec 2002, 22:58
ok, for custom titles you are right :)

i've moved it back :)

can i give a suggestion: maybe add options to the acp, so you have a system like the usertitle, just with images :)

EvilLS1
25 Dec 2002, 23:05
Originally posted by Xenon


can i give a suggestion: maybe add options to the acp, so you have a system like the usertitle, just with images :)

Hmm.. Not sure how to do that so that it would still work with custom titles.. Do you know? Sounds like a good idea though. :)

Mystic Gohan
26 Dec 2002, 16:23
I have the same hack on my forum but its called the Pips and Stars hack and updated to perfection by TinTin and Guichi of PGamers. I like it its pretty nice addition to the forum.

EvilLS1
26 Dec 2002, 23:25
Originally posted by Xenon
is the zip-file ok, the txt file in, i can't open with ultraedit, just notepad, and it didn't show up well :)

You're right.. I opened the text file with my work compter and it looks all messed up.. Weird, it looked fine on my home computer. *shrugs*

Anyway, I updated the first post with readable instructions. :)

ULTIMATESSJ
27 Dec 2002, 01:29
open it in WordPad, it looks fine in that

Xenon
28 Dec 2002, 22:23
@Evil: ahh, ok, my comp is ok :)
Yes, i'd know how to code it to make a real similar functions than usertitles, but i don't have the time to do ;)

i'd say look into how the usertitle is updated at the users maybe you can find out how to do :)
see it as a quest, it's not needed, but why not ;)

Chris M
29 Dec 2002, 00:05
@EvilSL1 - I have an idea how to do this;)

PM me for details:)

Satan

Joe Page
29 Dec 2002, 16:53
This is a good hack, thanks :)

monstergamer
11 Mar 2003, 18:03
every little hack helps
and this is a great hack

N9ne
11 Mar 2003, 18:21
I'm actually working on a hack right now (well it's not for this purpose but ok ill release it for this purpose lol)

Poeple might be interested in it.

EvilLS1
12 Mar 2003, 04:16
I'm sure there's a way integrate this with the CP like the stars hack, but thats something that I don't think I'd really need since this works fine for me and I'll probably never change rank images anyway. But if someone wants to make a more advanced version, go for it! :)

BTW, if anyone wants to give mods, admins and supermods the highest rank or a special rank no matter what their post count is, you could just add something like this:

if (($post[usergroupid] ==5) || ($post[usergroupid] ==6) || ($post[usergroupid] ==7)) {
$rank = "<img src=\"http://www.yoursite.com/forums/images/specialrank.gif\">";
}

ogden2k
06 May 2003, 23:01
This does't work if I go above 1500 posts?
if ($post[posts]<=19) {
$rank="<img src=\"http://www.binarydreams.us/forums/images/ranks/rank0.gif\">";
}
else if ($post[posts]<=149) {
$rank="<img src=\"http://www.binarydreams.us/forums/images/ranks/rank1.gif\">";
}
else if ($post[posts]<=599) {
$rank="<img src=\"http://www.binarydreams.us/forums/images/ranks/rank2.gif\">";
}
else if ($post[posts]<=1499) {
$rank="<img src=\"http://www.binarydreams.us/forums/images/ranks/rank3.gif\">";
}
else if ($post[posts]>=2599) {
$rank="<img src=\"http://www.binarydreams.us/forums/images/ranks/rank4.gif\">";
}
else if ($post[posts]>=9999) {
$rank="<img src=\"http://www.binarydreams.us/forums/images/ranks/rank5.gif\">";
}
else if ($post[posts]>=10001) {
$rank="<img src=\"http://www.binarydreams.us/forums/images/ranks/rank6.gif\">";
}

EvilLS1
07 May 2003, 00:23
Today at 12:01 AM ogden2k said this in Post #20 (http://www.vbulletin.org/forum/showthread.php?postid=392493#post392493)
This does't work if I go above 1500 posts?



Use this instead and it'll work.


if ($post[posts]<=19) {
$rank="<img src=\"http://www.binarydreams.us/forums/images/ranks/rank0.gif\">";
}
else if ($post[posts]<=149) {
$rank="<img src=\"http://www.binarydreams.us/forums/images/ranks/rank1.gif\">";
}
else if ($post[posts]<=599) {
$rank="<img src=\"http://www.binarydreams.us/forums/images/ranks/rank2.gif\">";
}
else if ($post[posts]<=1499) {
$rank="<img src=\"http://www.binarydreams.us/forums/images/ranks/rank3.gif\">";
}
else if ($post[posts]<=2599) {
$rank="<img src=\"http://www.binarydreams.us/forums/images/ranks/rank4.gif\">";
}
else if ($post[posts]<=9999) {
$rank="<img src=\"http://www.binarydreams.us/forums/images/ranks/rank5.gif\">";
}
else if ($post[posts]>=10000) {
$rank="<img src=\"http://www.binarydreams.us/forums/images/ranks/rank6.gif\">";
}

ogden2k
07 May 2003, 21:45
Works, thanks very much!

Any way to show the rank in a pm?

Oblivion Knight
08 May 2003, 20:41
Yesterday at 10:45 PM ogden2k said this in Post #22 (http://www.vbulletin.org/forum/showthread.php?postid=392863#post392863)
Works, thanks very much!

Any way to show the rank in a pm?


In the template "privmsg" find:
<smallfont>$fromuserinfo[usertitle]</smallfont><br>

Add after it:
$rank<br>

Not tested, but it should work.. :classic:

ogden2k
10 May 2003, 23:15
It doesn't work, I tried it in the tpl you suggested and in the annoucements tpl.