Announcement

Collapse
No announcement yet.

Implementing AdSense and the Code to exclude certain pages....

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

  • Jake Bunce
    replied
    Originally posted by Stingraynyc
    Is there a way to only allow showthread and forumdisplay but disallow the private forums?
    Use this:

    Code:
    <if condition="(THIS_SCRIPT == 'forumdisplay' OR THIS_SCRIPT == 'showthread') AND ($forumid != X AND $forumid != Y AND $forumid != Z)">
    
    ADSENSE CODE
    
    </if>
    Where X, Y, and Z are forumids of private forums.

    Leave a comment:


  • Stingraynyc
    replied
    there has to be a better way to to this than I have done. Am I using more server resources with my code? (below)

    The reason I have done it this way is google will come and spider any page the code is on after it is looked at. I have private forums that google cant get into so had to exclude those, plus all the profile, register pages etc. I originally used the code for showthread and forumdisplay only.. however I had the problem with the private forums.

    The way I see it, google disallows register pages for a reason, it will spider the page every time someone looks at it, They dont want to continually spider pages that have no content or get error messages when trying to get into the page (like private forums, login, memberlist, private, profile etc. etc.) so all the scripts in my code are not allowed by google and will get my adsense dropped If I didnt exclude them.

    Is there a way to only allow showthread and forumdisplay but disallow the private forums?

    here is my code

    <if condition="$foruminfo[forumid] == 18 OR $foruminfo[forumid] == 29 OR $foruminfo[forumid] == 32 OR $foruminfo[forumid] == 40 OR $foruminfo[forumid] == 22 OR $foruminfo[forumid] == 36 OR THIS_SCRIPT == 'search' OR THIS_SCRIPT == 'faq' OR THIS_SCRIPT == 'calendar' OR THIS_SCRIPT == 'usercp' OR THIS_SCRIPT == 'memberlist' OR THIS_SCRIPT == 'login' OR THIS_SCRIPT == 'mailmember' OR THIS_SCRIPT == 'online' OR THIS_SCRIPT == 'member' OR THIS_SCRIPT == 'profile' OR THIS_SCRIPT == 'private' OR THIS_SCRIPT == 'subscription' OR THIS_SCRIPT == 'report' OR THIS_SCRIPT == 'showgroups' OR THIS_SCRIPT == 'newthread' OR THIS_SCRIPT == 'register'">
    <else />Google Adsense Code here</if>
    Last edited by Stingraynyc; Sun 9 May '04, 12:12pm.

    Leave a comment:


  • Jake Bunce
    replied
    You can exclude the User CP by adding the red code to the condition:

    Code:
    <if condition="THIS_SCRIPT != 'register' AND THIS_SCRIPT != 'usercp'">

    Leave a comment:


  • maikj
    replied
    User CP

    I used

    PHP Code:
    <if condition="THIS_SCRIPT != 'register'"
    to exclude the registration Page. My Ads are under the navbar.
    How do i exclude the UserCP?

    The Site is under
    http://www.thepossums.com/f

    Thx
    Maik

    Leave a comment:


  • patrick24601
    replied
    Where is this header file everybody is talking about ? I am looking in admincp and I see nothing with the name header in it.

    I am trying to do a similair thing - add google adsense and my own banner mgmt system to the header and footer.

    Thanks.

    Leave a comment:


  • WeddingFotos
    replied
    Nice display, RaZor Edge! Your statement about new or newly updated pages is correct. That seems to have been the issue (as now the ads are relevant... mostly )

    Thank you for the spider explination, decostop! That makes sense now too.

    Thanks everyone... I think I'm all set now.

    Leave a comment:


  • RaZor Edge
    replied
    It will always show a Charity ads when a new post is posted or when the page is just updated.

    I show the Google ads on the footer templates for most of the forum (example)...

    <if condition="$foruminfo[forumid] == 69 OR $foruminfo[forumid] == 67 OR $foruminfo[forumid] == 68 OR $foruminfo[forumid] == 48 OR THIS_SCRIPT == 'showthread' OR THIS_SCRIPT == 'search' OR THIS_SCRIPT == 'register'">
    <br>
    <else />

    ADS CODE

    </if>
    But a display them on a different way on showthread templates (example)...
    Last edited by RaZor Edge; Thu 17 Mar '05, 5:55am.

    Leave a comment:


  • raxafarian
    replied
    are you seeing the charity ads on 'search' type pages? The way it works is google spiders every link to your site to target the ads. The search results page does not have a static link...it changes all the time, so ads don't get targeted.

    Leave a comment:


  • WeddingFotos
    replied
    Thanks

    Thank you all... I think it looks better under the header, but I decided to put it in the NavBar as suggested.

    Some pages it shows relevant ads on, and other pages it shows the charity ads... I wonder why that is?

    Leave a comment:


  • aky
    replied
    maybe this will help
    http://www.vbulletin.com/forum/showt...t=86406&page=6

    Originally posted by WeddingFotos
    I've been working with my vBulletin since the weekend so I am an absolute newbie with the code and such. I was just approved for AdSense. Can anyone help with the code? I have the code from AdSense and I want to place it just below my logo in the header. I am aware of how to do this, but I am not sure how to exclude the ads from showing up on the registration page, thank you pages or error pages.

    Any sort of code help here would be massively appreciated. Thanks so much.

    (Posted this in a previous AdSense thread but figured I should probably start a new one... And I appologise for yet another AdSense thread! I've been trying to read through the previous ones pertaining to AdSense but not really understanding the code has made it hard for me to figure out what to use and where to put it.)

    Leave a comment:


  • Zachery
    replied
    The best place to actually post adsense is the navbar, it shouldnt show on any important pages that google doesnt like.

    Leave a comment:


  • Jake Bunce
    replied
    You can enclose the banner code within a template conditional to exclude the registration page, like this:

    Code:
    <if condition="THIS_SCRIPT != 'register'">
    	BANNER CODE HERE
    </if>
    As for redirection and error pages... redirection pages don't use the header template so the banner code should not show up on those (assuming the banner code is in your header). Error pages are spawned by many different files so the template conditional method will not work. I don't know of a way to exclude error pages... I tried on my own forums recently.

    Leave a comment:


  • Implementing AdSense and the Code to exclude certain pages....

    I've been working with my vBulletin since the weekend so I am an absolute newbie with the code and such. I was just approved for AdSense. Can anyone help with the code? I have the code from AdSense and I want to place it just below my logo in the header. I am aware of how to do this, but I am not sure how to exclude the ads from showing up on the registration page, thank you pages or error pages.

    Any sort of code help here would be massively appreciated. Thanks so much.

    (Posted this in a previous AdSense thread but figured I should probably start a new one... And I appologise for yet another AdSense thread! I've been trying to read through the previous ones pertaining to AdSense but not really understanding the code has made it hard for me to figure out what to use and where to put it.)
widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
Working...
X