Quote:
Originally Posted by The Equivocate
Hey, I'm using this hack to implement a "multi-site" shared forum. Because the sites will be referring hits based on style id (I.E. the affiliate has skin id #2 branded with their logos/ads, so they'd use mysite.com/index.php?styleid=2), Unregistered Users need to have all the skins available to them, and their skin defined via the styleid in the URL.
What change would I have to make? I know absolutely nothing about PHP, but here's the change I tried to make to allow Unregs (usergroup ID #1) to view both skin styleid #1 AND #2 (but let's pretend there's going to be about 6 more). It's giving me a parse error and only showing skin #2.:
Code:
if (in_array($vbulletin->userinfo['usergroupid'], array(1)) || (in_array($vbulletin->userinfo['membergroupids'], array(1))))
{
$styleid = 1,2;
}
|
This is only to force a
1 style on member group(s).
You can not have multiple style ids as you have them, this is what is causing the parse error:
If you want to have guests use all styles then do not use this hack. Only use this hack for the member groups you want to restrict to a particular style.
If you want to restrict say 2 different member groups to one style and say 1 different member group to another style then here is an example of how to do it.
Code:
if (in_array($vbulletin->userinfo['usergroupid'], array(2,3)))
{
$styleid = 1;
}
if (in_array($vbulletin->userinfo['usergroupid'], array(4)))
{
$styleid = 2;
}
Also please click
INSTALL, as you said you are using this hack.