PDA

View Full Version : Style Chooser & usergroups?


qpurser
06-13-2012, 12:28 PM
I would like to make the style chooser option available to certain user groups (some user groups allowed to change the style and the other user groups should only have the "standard" style with no options.

I probably could do this with a conditional in the footer template?
How would the conditional have to be coded?

THX for any help.

This is the code from the footer:
<vb:if condition="$show['quickchooser']">
<select name="styleid" onchange="switch_id(this, 'style')">
<optgroup label="{vb:rawphrase quick_style_chooser}"><option class="hidden"></option></optgroup>
<vb:if condition="$quickchooserbits1">
<vb:if condition="$quickchooserbits2">
<optgroup label="&nbsp;{vb:rawphrase standard_styles}">
</vb:if>
{vb:raw quickchooserbits1}
<vb:if condition="$quickchooserbits2">
</optgroup>
</vb:if>
</vb:if>

kh99
06-13-2012, 12:35 PM
I think you could just change the first line like this:

<vb:if condition="$show['quickchooser'] AND is_member_of($bbuserinfo, 1, 2, 3)">


where you'd change 1, 2, 3 to the list of group IDs that can see the chooser. If you'd rather list the groups that can't see it, you can change it to

<vb:if condition="$show['quickchooser'] AND !is_member_of($bbuserinfo, 1, 2, 3)">


This doesn't actually stop a user from using a style, it just takes away the control. I believe any user could still put &styleid=X on the url, if they know the styleid.

qpurser
06-13-2012, 12:43 PM
WOW. That was a quick reply. thx so much.

Works perfect this way.

It is OK if they would know the style ID and using it. Don't think that many users on our forum will be that smart...lol