View Full Version : Don't know if....
Chris Gwynne
01-27-2003, 03:13 AM
... this has been done already or if there is a default variable for it.
But, how would I be able to show what usergroup a member is in, in the postbit.
As I said, I'm not sure whether this would be a hack.. or if this is a default variable.
Thanks. :)
Logician
01-27-2003, 09:14 AM
2 ways:
1- Enter a userstatus for that usergroup in Admin CP
2- Requires a hack:
edit function.php find:
$post[posttime]=vbdate($timeformat,$post[dateline]);
after that add:
if ($post[usergroupid]==6) {$post[usergroupname]='<img src=images/adminav.gif>';}
elseif ($post[usergroupid]==5) {$post[usergroupname]='<img src=images/modav.gif>';}
(You have to add all usergroups in this format)
Then add $post[usergroupname] into postbit template
Chris Gwynne
01-27-2003, 05:14 PM
Originally posted by Logician
edit global.php at the end of file before ?> add:
if ($bbuserinfo[usergroupid]==6) {$bbuserinfo[usergroupname]='Administrator';}
elseif ($bbuserinfo[usergroupid]==5) {$bbuserinfo[usergroupname]='Moderator';}
elseif ($bbuserinfo[usergroupid]==2) {$bbuserinfo[usergroupname]='Registered Member';}
(You have to add all usergroups in this format)
Then add $bbuserinfo[usergroupname] into postbit template
I'll do the hack, it seems best.
So I just add each usergroup status to the bottom of the global file?
Say if I made up a new usergroup bean man :p, for example.. I'd add
elseif ($bbuserinfo[usergroupid]==10) {$bbuserinfo[usergroupname]='Bean Man';}
then place $bbuserinfo[usergroupname]... in the postbit and it'll show? :) Just to make sure....
Logician
01-27-2003, 06:24 PM
yep
Chris Gwynne
01-27-2003, 09:50 PM
Thanks a lot :D.
Logik
01-27-2003, 09:51 PM
Nice Logician.. ;)
Logician
01-28-2003, 10:17 AM
ty ;)
Chris Gwynne
02-01-2003, 09:46 PM
if ($bbuserinfo[usergroupid]==6) {$bbuserinfo[usergroupname]='<img src=images/adminav.gif>';}
elseif ($bbuserinfo[usergroupid]==5) {$bbuserinfo[usergroupname]='<img src=images/modav.gif>';}
This is the code I have, and I've inserted the variable into the postbit. But It's showing the admin image for every user... Any help?
Logician
02-01-2003, 10:01 PM
my bad.. postbit needs a different approach.. my post updated, try again..
Chris Gwynne
02-01-2003, 10:10 PM
edit function.php find:
"function.php" being admin/functions.php ? because I've just tried this and it isn't working.
Chris Gwynne
02-01-2003, 10:13 PM
Ooops, forgot to change the variable in the postbit. Thanks a lot for the help Logician. :)
vBulletin® v3.8.12 by vBS, Copyright ©2000-2024, vBulletin Solutions Inc.