I wanna make it so that certain styles can only be used by members of a certain group. Any suggestions?
What do you want to do exactly?
Do you want to restrict access altogether or do you only want to restrict the options shown on the select menu in the usercp?
If you only restrict access to the select menu, users can still see styles by adding &styleid=x to the URL... but it's less complicated as far as I know
// style specified in user profile
$styleid = $bbuserinfo['styleid'];
REPLACE WITH:
PHP Code:
if ($bbuserinfo['styleid'] == X AND $bbuserinfo['usergroupid'] != Y)
{
$styleid = $vboptions['styleid'];
}
else
{
// style specified in user profile
$styleid = $bbuserinfo['styleid'];
}
replace X with the styleid and Y with the usergroup that's allowed to view that style.
(untested)
// style specified in user profile
$styleid = $bbuserinfo['styleid'];
REPLACE WITH:
PHP Code:
if ($bbuserinfo['styleid'] == X AND $bbuserinfo['usergroupid'] != Y)
{
$styleid = $vboptions['styleid'];
}
else
{
// style specified in user profile
$styleid = $bbuserinfo['styleid'];
}
replace X with the styleid and Y with the usergroup that's allowed to view that style.
(untested)
I'll give that a try. Basically, I have 6 or 7 styles right now, and I want to add a new style that doesn't include advertisements and allow users to purchase that style.
you could look at it from another angle and edit the templates. putting in a conditional to display the ads if the usergroup is not the ad-free usergroup might be easier also that would mean that your paying users wouldn't be limited to just one style to gain their benifits.
you could look at it from another angle and edit the templates. putting in a conditional to display the ads if the usergroup is not the ad-free usergroup might be easier also that would mean that your paying users wouldn't be limited to just one style to gain their benifits.
that's a great idea! could you help me with what the conditional would look like?
// style specified in user profile
$styleid = $bbuserinfo['styleid'];
REPLACE WITH:
PHP Code:
if ($bbuserinfo['styleid'] == X AND $bbuserinfo['usergroupid'] != Y)
{
$styleid = $vboptions['styleid'];
}
else
{
// style specified in user profile
$styleid = $bbuserinfo['styleid'];
}
replace X with the styleid and Y with the usergroup that's allowed to view that style.
(untested)
I got a parse error with this code. All I want to do is give moderators 1 more style to choose. Any ideas?