Log in

View Full Version : How do you added images next to User name


kau
07-28-2002, 04:09 PM
If a member is in a certain Group I created I want them to have a little image next to there name like this site:

http://www.pirate4x4.com/forum/showthread.php?s=&threadid=70173

Notice the little red star next to a few names?

How do I do this?

Dean C
07-28-2002, 08:09 PM
huh... that site has nothing special... its normal default vbulletin :)

kau
07-28-2002, 08:45 PM
See how the user DRM has a little star next to his name? I want to be able to do that to a certain group.

Xenon
07-28-2002, 09:02 PM
open functions.php

find:if ($post[showsignature] and $allowsignatures and trim($post[signature])!="" and ($bbuserinfo[userid]==0 or $bbuserinfo[showsignatures])) {
if (!isset($sigcache["$post[userid]"])) {
$post[signature]=bbcodeparse($post[signature],0,$allowsmilies);
eval("\$post[signature] = \"".gettemplate("postbit_signature")."\";");
$sigcache["$post[userid]"] = $post[signature];
} else {
$post[signature] = $sigcache["$post[userid]"];
}
} else {
$post[signature] = "";
}
in getpostbit fucntion

after it add:
if($post[usergroupid]==xx) $post[username]="<img src='...'>".$post[username];

kau
08-23-2002, 05:37 AM
That puts the image on the left of their name. How do I get it so it's:

Name <space> Image

g-force2k2
08-23-2002, 06:25 AM
just change Xenon's code around...

And swap the image and the $post[username] ;)

g-force2k2

kau
08-23-2002, 06:55 AM
Such as:

if($post[usergroupid]==9) $post[username].$post[username]="<img src=jeep.gif>";

That just adds the image and does not show the username.

g-force2k2
08-23-2002, 06:58 AM
try

$post[username]=$post[username]&nbsp;."<img src=jeep.gif>";

regards...

g-force2k2

Xenon
08-23-2002, 10:07 AM
you mean:

$post[username]=$post[username]."&nbsp;<img src=jeep.gif>";

GCPrez
01-15-2003, 05:11 AM
Newbie Q: How do I find the user group ID #?

GCPrez
01-15-2003, 05:48 AM
I can't get this to work....

if($post[usergroupid] = "6";) $post[username] = $post[username]."&nbsp;<BR><a title="Premium Member" href="http://www.glaciercomics.com/"><img src="http://www.glaciercomics.com/images/premium.gif" width="20" height="20"></a>";

Anything I try I get:

Parse error: parse error, unexpected ';' in /home/virtual/site116/fst/var/www/html/forums/admin/functions.php on line 226

Fatal error: Call to undefined function: getuserinfo() in /home/virtual/site116/fst/var/www/html/forums/admin/sessions.php on line 366

rY rY
01-15-2003, 05:50 AM
yo Prez can u help me with my problem

GCPrez
01-15-2003, 07:02 AM
Sorry, I'm lost on this one myself.

Xenon
01-15-2003, 11:00 AM
@Prez: this can't work, use this instead:
if($post[usergroupid] == 6) $post[username] = $post[username].'&nbsp;<BR><a title="Premium Member" href="http://www.glaciercomics.com/"><img src="http://www.glaciercomics.com/images/premium.gif" width="20" height="20"></a>';

the usergroupid you get in your acp, when you highlight the link to edit a usergroup

hurrican
04-27-2004, 09:21 PM
I'm trying to use this hack, but I can't get the icon where I would like it.

I want it to be like this:
USERNAME HERE
Usertitle Here(or Custom User title)
Donating Member Icon Here

How would I go about getting this done? I got it working where it puts it above the usertitle. Any help is greatly appreciated!!!

Thanks much!

Zachery
04-27-2004, 09:25 PM
This is over a year old start your own thread :P

hurrican
04-27-2004, 09:27 PM
it is, but it works :p ill start new thread. :)

Xenon
04-28-2004, 02:31 PM
i suggest to start it at vbulletintemplates.com as this is possible with an if condition in vb3 :)

kau
09-21-2004, 05:11 AM
Ok I lost the hack in my upgrade.

How do I hack this back in with vBulletin Version 3.0.3

Xenon
09-21-2004, 10:49 AM
as said in my post above, try a look at vbt, this is easy with templates :)