1 (edited by Goober 2005-05-02 20:25)

Topic: Rank Image?

Hello, I was wondering if it were possible to add a ranking image. What I am trying to do is add a red star to right of an administrator name and a blue star for a moderator name.
Example:
Gooberhttp://img224.exs.cx/img224/1333/modstar7qr.gif = Administrator
Lizardhttp://ppsociety.com/img/icons/specialstar.gif = Moderator

Any suggestions about how to go about this? Thanks,
~Goober

Re: Rank Image?

Everywhere, or just a certain place?
And next to the name, or could it be in the tag?

Re: Rank Image?

Yes, everywhere and next to the name.

4

Re: Rank Image?

That would involve some messy edits to every single file where unsernames appear. Is it really worth the effort.

5 (edited by Dr.Jeckyl 2005-03-09 03:39)

Re: Rank Image?

can you use bbcode or basic html in the rank titles?

~James
FluxBB - Less is more

6 (edited by Goober 2005-03-09 04:39)

Re: Rank Image?

Then how would I go about using the custom title feature? sad
Then what would I have to add/change/delete inorder for it to work?

Re: Rank Image?

This might not be as difficult as it sounds. It should just be a matter of removing a call to pun_htmlspecialchars() in get_user_title(). I'm at work now though.

"Programming is like sex: one mistake and you have to support it for the rest of your life."

8

Re: Rank Image?

If its just the user title (or user name) in viewtopic thats not a problem. I thought what was being asked for was the ability to add a graphic to user names (not titles) everywhere they appear on the board

Re: Rank Image?

Hahaha, that is kinda what I am asking for... tongue

10 (edited by Goober 2005-04-03 13:26)

Re: Rank Image?

Heys, guys I tried to to do this myself but it doesn't work properly. I'm using punbb version 1.1.5 (Too lazy to upgrade...) and this is what I added to userlist.php on line 146, right beside <tr class="puncon2">

<?php
 //User image that goes right beside the name of a mod or admin
if ($cur_user['status'] == '2')  // admin image
    $user_images = '<img src="img/stuff/adminstar.gif">';
   else 
if ($cur_user['status'] == '1')  // mod image
    $user_images = '<img src="img/stuff/modstar.gif"';
?>

then on line 156 I added this to set the position of the rank image:

<?php echo $user_images ?>

This is what I get, http://vganda.com/userlist.php. It displays the admin star beside every user's name. Lol, my members would have a hard time determining who was and wasn't an administator. Basically I want a red star displayed beside an admin's name and a blue star beside a mod's name. Any help is appreciated. smile
Thanks,
~Goober

11

Re: Rank Image?

come on guys, I really need help with this...:(

Re: Rank Image?

I'm using punbb version 1.1.5 (Too lazy to upgrade...)

doesn't really make people want to help you, especially since it won't be of any use to anyone else

13

Re: Rank Image?

lol, Connorhd, you've got 1.1.5... tongue

Re: Rank Image?

well thats actually a dead site, and i'm not the one asking for favours

15

Re: Rank Image?

I'm only asking for some asistance...(is that too much to ask?)

Re: Rank Image?

Make sure you put a condition for non-admin / mod users too otherwise they'll take the previous value, which will be a admin/mod.

Digital photography news, reviews, discussions and more!
http://www.shuttertalk.com

The online bible for all
http://www.publicbible.com

Re: Rank Image?

<?php
 //User image that goes right beside the name of a mod or admin
if ($cur_user['status'] == PUN_ADMIN)  // admin image
    $user_images = '<img src="img/stuff/adminstar.gif">';
elseif ($cur_user['status'] == PUN_MOD)  // mod image
    $user_images = '<img src="img/stuff/modstar.gif">';
?>

what about that

18 (edited by Goober 2005-04-04 21:15)

Re: Rank Image?

Nope, Connorhd, that code doesn't work... sad
same result...

Re: Rank Image?

i only fixed your html erros and "1", $cur_user is wrong it always shows as admin as YOU are the $cur_user and you are an admin

20

Re: Rank Image?

well, what variable should I use in place of $cur_user? $pun_user?

Re: Rank Image?

why don't you just try it? and i think its actually $user_data['status'] but i'm not sure

Re: Rank Image?

$pun_user['g_id'] I think

Re: Rank Image?

no Smartys hes using 1.1.5