Log in

View Full Version : Custom user groups


Tizer
06-02-2006, 09:31 AM
Hi all,

Looking for a few pointers regarding usergroups on the forum

Im building a news page for my site which will feed out news threads from the forum. Simple enough using "vBExternal" mod, got it working a treat.

However, i also want to feed out info from a private / hidden forum that users in a usergroup called "iOMembers" can access. Its like our private guild/clan chat forum.

So my code <?php
if ($vbulletin->userinfo['membergroupids'] == '11'
|| $vbulletin->userinfo['membergroupids'] == '12'
)
{
echo "<td class=\"bc\"><div class=\"l\"><div class=\"r\">";
output_News(5,13);
echo "</div></div></td>";
}
?>

This will call output_News(5,13) for forum number 13 and output 5 of the latest threads.

It works a treat until the visiting user is added to another membergroup, i think this is because the way the users membergroups variable is stored, perhaps its an array? im not quite sure.

If i output the users new membergroups using:

echo $vbulletin->userinfo['membergroupids'];

it might say "12, 11"

Which will obviously mess up my if statement.

Im not too hot with Arrays, and if this is the case, is there someone who can give me a few pointers.

Cheers

Tizer
06-09-2006, 10:00 AM
nobody able to help? im sure this has come up somewhere before for someone :\