View Full Version : Extra Team Avatar
waddy
09-08-2002, 10:48 PM
I am after a special extra team avatar for moderators, supermoderators and administrators, I think I have some rightish looking code but I am not sure where to put it:
unset($teamlogo);
if ($loggedin['usergroupid'] == 6 and $highlightadmin) {
$teamlogo = "<img src=\"team.gif\">";
} else if (($mod["$userid"] or $loggedin['usergroupid'] == 5) and $highlightadmin) {
$teamlogo = "<img src=\"team.gif\">";
I am hoping someone can help as I have tried to find a similar hack and think it would be agreat addition to my forum.
g-force2k2
09-08-2002, 11:28 PM
waddy are you looking for it on the postbit or where exactly do you want it to appear? regards...
g-force2k2
waddy
09-08-2002, 11:42 PM
Sorry, I want an extra avatar to appear under the current avatar, but only for moderators, supermoderators and administrators.
I had a look thru postbits, but was unsure as to whether I could put php in there, pretty sure I can't so have come to the un-experienced conclusion I need to write a function.
waddy
09-08-2002, 11:44 PM
Might add this avatar won't be customizable, but a single image for all or even a sperate one for mods, supermods and admins etc.
Thanks!
g-force2k2
09-09-2002, 01:43 AM
just add this coding to the admin/functions.php
find:
// do ip addresses
under it add:
if($bbuserinfo[usergroupid] == XX) { // admin usergroupid
$extraimg = "<img src='{img src here}' border=0>"; // img for administrators
} elseif($bbuserinfo[usergroupid] == XX) { // supermod usergroupid
$extraimg = "<img src='{img src here}' border=0>"; // img for smods
} elseif($bbuserinfo[usergroupid] == XX) { // moderator usergroupid
$extraimg = "<img src='{img src here}' border=0>"; // img for moderators
} else {
$extraimg = "";
}
then open the postbit template find:
$post[avatar]
under it add:
$extraimg
regards... hope that helps...
g-force2k2
waddy
09-09-2002, 10:55 AM
I think that might be it, will check it out shortly!
waddy
09-09-2002, 03:09 PM
ok I added that code and it works, but it shows for all users irrespective of whether they are in those particular groups!
g-force2k2
09-09-2002, 03:16 PM
oh waddy my bad ;) just change all of the instances of $bbuserinfo to $post... that should solve the problem ;) regards...
g-force2k2
waddy
09-09-2002, 03:31 PM
Thanks...
*rushes off to try it*
waddy
09-09-2002, 03:36 PM
Awesome, thanks alot :)
Once the server is working again you can see it in action, having some teething problems with our new server atm :)
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.