How do I give paying members the option to disable ads?
Originally posted by Jake Bunce
User options are implemented using profile fields, but profile fields are not group assignable, so allowing only certain groups access to a profile field requires a template conditional.
Create a profile field in your:
Admin CP -> User Profile Fields -> Add New User Profile Field
A checkbox profile field with one option would probably work best for this application.
Under the Which page displays this option option, select one of the Options categories. This profile field needs to be the only custom profile field under the selected options category. Any other custom profile fields in the same category will be hidden as well.
Go to your:
Admin CP -> Styles & Templates -> Style Manager -> « » -> Modify User Option Templates -> modifyoptions
In this template you will find several $customfields variables, one for each category in your options (the same categories as the ones for your profile fields). You need to enclose the appropriate $customfields variable with this conditional:
Code:<if condition="is_member_of($bbuserinfo, [color=red]usergroupid of subscriber group[/color])"> $customfields[category] </if>
Now that you have the option setup, you need to add the appropriate conditional to your banner ad. Pull up your banner code in your templates and enclose it in this conditional:
Code:<if condition="!$bbuserinfo['[color=red]fieldX[/color]']"> banner image code </if>
Admin CP -> User Profile Fields -> User Profile Field Manager
This code will display the banner image if the user has not checked the box for the profile field you created... and because of the conditional in step 2, the profile field will only be available to members of your subscribers group.