How to integrate a banner ad system that allows paying members to not view ads

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Bigforumfan
    Senior Member
    • Aug 2001
    • 166

    How to integrate a banner ad system that allows paying members to not view ads

    I'm just about to the point of installing VB3.

    The two big changes that I will be making to my site will be to integrate a banner ad system like phpadsnew (or something better if you know of one) and establish a "Contributer" level of membership.

    The big thing I'd like to do is to be able to disable some or all of the banner ads for the Contributer members.

    Is anyone already doing this?

    What would be the best way to do this?

    Thanks.
  • Jake Bunce
    Senior Member
    • Dec 2000
    • 46598
    • 3.6.x

    #2
    You can do this with usergroups and template conditionals. Setup a subscription in your:

    Admin CP -> Subscriptions -> Subscription Manager

    Have the subscription add users to a "contributor" usergroup. Then setup a template conditional around the banner ad, like this:

    <if condition="$bbuserinfo['usergroupid'] != contributor usergroupid">
    banner image code
    </if>

    Comment

    • Bigforumfan
      Senior Member
      • Aug 2001
      • 166

      #3
      So since I want the ads to appear for everyone but the contributors I would add all of the usergroups except "contributor" correct?On another note PHPadsnew seems like a great product but someone mentioned it makes a lot of queries on the server. Being very uneducated when it comes to programming I can only asume this means slow load times and heavy server loads.

      Would those that are knowledgable and experienced with PHPadsnew please let me know if these are valid concerns and if PHPadsnew is a well written product. I'd be willing to spend a moderate amount of money for a product ($150) that is much better and/or more efficient.

      Thanks for your time.

      Comment

      • Jake Bunce
        Senior Member
        • Dec 2000
        • 46598
        • 3.6.x

        #4
        Originally posted by Bigforumfan
        So since I want the ads to appear for everyone but the contributors I would add all of the usergroups except "contributor" correct?
        Only one id is needed. The condition I posted will display the banner code if the user's group is not equal to the id number listed. So the banner code will display for everyone except contributors.

        Comment

        • Bigforumfan
          Senior Member
          • Aug 2001
          • 166

          #5
          Originally posted by Jake Bunce
          Only one id is needed. The condition I posted will display the banner code if the user's group is not equal to the id number listed. So the banner code will display for everyone except contributors.
          Thanks Jake.

          Comment

          • eoc_Jason
            Member
            • Dec 2001
            • 61

            #6
            phpadsnew is proabably one of the more efficient ad-delivery programs out there, that gives maximum flexibility. You can save queries by disabling un-used options and detailed logging. Also you can use more efficient caching options (it supports several).

            Comment

            • d3nnis
              Senior Member
              • Jun 2003
              • 620
              • 3.7.x

              #7
              yeah i am using phpadsnew , its free and reliable.

              Comment

              • theguru
                Senior Member
                • Dec 2001
                • 101

                #8
                Bigforumfan,

                How is this working out for you? I want to do the same thing.

                Comment

                • Jake Bunce
                  Senior Member
                  • Dec 2000
                  • 46598
                  • 3.6.x

                  #9
                  Incidentally, since I posted in this thread a month ago I have found a better way to check group memberships. Use the is_member_of() function. This will check both primary and secondary group memberships:

                  <if condition="!is_member_of($bbuserinfo, contributor usergroupid)">
                  banner image code
                  </if>

                  Comment

                  • Tungsten
                    Senior Member
                    • Jan 2002
                    • 614
                    • 3.0.0 Beta 7

                    #10
                    Originally posted by d3nnis
                    yeah i am using phpadsnew , its free and reliable.
                    I just started using phpadsnew on my forum today. So far, so good. It was easy to set up.

                    Comment

                    • Smirks
                      Senior Member
                      • Sep 2002
                      • 119
                      • 3.0.0 'Gold'

                      #11
                      I'm thinking about doing something similar to my fourms, but I want the members to have the *option* to turn the ads off.

                      For example, the user becomes a subscriber, then they are moved in the subscriber group. Once they get moved to the subscriber group they have an option in their user cp to disable the ads.

                      I want to do it that way so if they ads don't bother the subscribers they can leave them on and hopefully generate more revenue for the site. But, since they are a paid memeber they have the option of turning them off, if they desire.

                      Is this possible?

                      --- Also, on a side note, how did you guys use phpadsnew? I'd like to use a local invocation if possible. Did you use a remote invocation? If so, which one? --
                      PJnet BBS .:. RU Forums

                      Comment

                      • Jake Bunce
                        Senior Member
                        • Dec 2000
                        • 46598
                        • 3.6.x

                        #12
                        Originally posted by Smirks
                        For example, the user becomes a subscriber, then they are moved in the subscriber group. Once they get moved to the subscriber group they have an option in their user cp to disable the ads.
                        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, [color=red]usergroupid of subscriber group[/color])">
                          
                          	$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['[color=red]fieldX[/color]']">
                          	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.


                        I just tested all of this on my test forums, so I know it works. If you have problems let me know. Actually, let me know if you don't have problems too. I will add this to a "How to" section we are working on.

                        Comment

                        • Smirks
                          Senior Member
                          • Sep 2002
                          • 119
                          • 3.0.0 'Gold'

                          #13
                          Works like a charm! Thanks!
                          PJnet BBS .:. RU Forums

                          Comment

                          • Smirks
                            Senior Member
                            • Sep 2002
                            • 119
                            • 3.0.0 'Gold'

                            #14
                            Actually, it did, once.... now it doesn't. I opted for a "single selection Radio Button" with the options "Yes" and "No". When the user selects "Yes" the ads are to be displayed, when "No" is selected, the ads are to be hidden.

                            Any ideas on how to fix?
                            PJnet BBS .:. RU Forums

                            Comment

                            • Jake Bunce
                              Senior Member
                              • Dec 2000
                              • 46598
                              • 3.6.x

                              #15
                              Originally posted by Smirks
                              Actually, it did, once.... now it doesn't. I opted for a "single selection Radio Button" with the options "Yes" and "No". When the user selects "Yes" the ads are to be displayed, when "No" is selected, the ads are to be hidden.

                              Any ideas on how to fix?
                              With a radio button, after the user selects a value once, the profile field always has a nonzero value for either case, so you need to change the condition around the banner ad to check the exact condition, not just if there is a value or not. Use this condition around the banner:

                              Code:
                              <if condition="$bbuserinfo['[color=red]fieldX[/color]'] != '[color=red]Yes[/color]'">
                              	banner image code
                              </if>
                              Where Yes is the exact text you use for the "yes" option.

                              In this example the profile field would ask, Disable banners? - and the Yes option would be to disable banners. If the question is worded differently to where Yes means the opposite, then you can change the conditional to check for the No value.

                              Comment

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