Log in

View Full Version : $user[usergroupid] in showthread.php?


Isuldor
05-25-2001, 10:43 PM
I'm trying to write a condition in showthread.php that uses $user[usergroupid] to see what user group the user is in, and if the user is an admin it creates a $post[power] which I've put into the posbit template. Here's what I have so far:
if ($user[usergroupid]==6) {
eval("\$post[power] = \"".gettemplate("postbit_admin")."\";");
} it's right above
if ($post[showemail] and $displayemails) {
(postbit_admin is another template I created) I'm not seeing any results so I'm thinking that I can't use $user because it isn't read from the database in this script, which leaves me with the question: is there another way I can check the persons usergroup in showthread.php?
or am I just plain doing it wrong :rolleyes:

eva2000
05-25-2001, 11:39 PM
hey Isuldor looong time no see.. thanks again for Animeboards.com's forum logo :)

JamesUS
05-26-2001, 04:35 AM
Try changing $user to $bbuserinfo :)

Isuldor
05-26-2001, 07:03 AM
heyya eva2k :D I think I was really bored that day lol

$bbuserinfo[usergroupid] returns a 6 for every person :eek:

!edit OH it seems that $bbuserinfo[usergroupid] is returning the value for MY usergroup
hmm...
!edit ah I tried using $post[usergroupid] and it works now
thanks james! I was stuck heheh