Announcement

Collapse
No announcement yet.

How do I give paying members the option to disable ads?

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

  • How do I give paying members the option to disable ads?

    Jake, I know, this was a LONG time ago. At one time I had it working, so I am trying to make this work again. The problem I have is this: You say to pull up the banner code in the templates, which templates? All of them?

    Thanks for the help.

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

    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.
    Check out my latest Dive Videos.
    Spend your surface interval at www.zendiving.com

  • #2
    Where is your banner code? You just need to surround your code with that conditional.

    Comment


    • #3
      Jake, not to sound stupid, but that is what I was asking. Where is the banner code?
      Check out my latest Dive Videos.
      Spend your surface interval at www.zendiving.com

      Comment


      • #4
        Were you the one that added the banner to your forum? Only that person would know where it is.

        If you post a link to a page that contains your banner then I can probably tell you what template to edit.

        Comment

        widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
        Working...
        X