Announcement

Collapse
No announcement yet.

How To Give Paying Members the Option to Disable Ads

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • How To Give Paying Members the Option to Disable Ads

    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.

    1. 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.

    2. 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, usergroupid of subscriber group)">
      
      	$customfields[category]
      
      </if>
      This will make it so the custom fields for this options category will only be visible to members of the subscribers group.

    3. 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['fieldX']">
      	banner image code
      </if>
      Where fieldX is the field identifier of the profile field as shown in your:

      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.
    Last edited by Jake Bunce; Fri 2 Apr '04, 11:54am.
widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
Working...
X