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 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:
PHP Code:
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