UBB.Dev
Posted By: coloradok5 Additional user titles by group? - 07/22/2001 6:03 AM
Any ideas on how to do this? I created a new group members and I would like to output the text "members" under the titles of the users in this new group. Is there a way to do it manually if that would make it easier?

From this :
coloradok5
(Trail Boss)
07/18/01 07:33 AM
170.207.170.135

To this:
coloradok5
(Trail Boss)
([:red]Member)
07/18/01 07:33 AM
170.207.170.135

Posted By: Rick Re: Additional user titles by group? - 07/22/2001 4:05 PM
It could be done. You'd need to find out the group number assigned for that group. And then where you want that group name to be displayed you would need something like this:

if (ereg("-$groupnumber-",$user'[U_Groups'])) {
echo "(groupname)";
}

Edited by Scream on 07/22/01 09:06 AM (server time).

Posted By: coloradok5 Re: Additional user titles by group? - 07/22/2001 10:36 PM
OK, my group (G_Id) number is 6

I can not get the code below to output the text, is this correct?

if (ereg("-$6-",$user'[U_Groups'])) {
echo "(member)";
}

I am adding it to showthreaded.php is this correct for displaying like my original example?
Also should groupnumber be G_Id instead?

TIA

Posted By: coloradok5 Re: Additional user titles by group? - 07/22/2001 10:51 PM
oops, I need it in showflat.php

Posted By: Rick Re: Additional user titles by group? - 07/24/2001 3:13 PM
You need to take out the $ before the 6.[]/testimages/icons/wink.gif[/]
Posted By: coloradok5 Re: Additional user titles by group? - 07/24/2001 3:36 PM
I get this error "Parse error: parse error in /home/.eleusisblender/blazer90/coloradok5.com/forums/showflat.php on line 743" with this code.

if (ereg("-6-",$user'[U_Groups'])) {
echo "(groupname)";
}

Posted By: poil Re: Additional user titles by group? - 07/24/2001 3:50 PM
if (ereg("-6-",$user'[U_Groups'])) {
echo "(groupname)";
}
should be ?
if (ereg("-6-",$user['U_Groups'])) {
echo "(groupname)";
}
but that might not work either you could try either:
if (ereg("-6-",$user[U_Groups])) {
echo "(groupname)";
}
or just doing
$groups = $user[U_Groups];
if (ereg("-6-",$groups)) {
echo "(groupname)";
}

<a target="_blank" href=http://www.extremeforums.org/msg/announce/221.html>http://www.extremeforums.org/msg/announce/221.html</a>

Edited by poil on 07/24/01 08:52 AM.

Posted By: coloradok5 Re: Additional user titles by group? - 07/24/2001 4:23 PM
Thanks for the help, getting closer, both the last to snippets have the same result: The "groupname" displays under all users no matter what the group only for members of group 6.
What I would like is for "groupname" to be displayed to everyone only if they are a member of group 6.

Any ideas?

Posted By: coloradok5 Re: Additional user titles by group? - 07/24/2001 6:23 PM
Would it be easier if I handled the "member" group like the moderator and admin groups, that would be cool?

© UBB.Developers