Helpful Information
 
 
Category: vBulletin 3.5
Put Google AdSense in your forums

Kinda interesting info to share.

The AdSense TOS says you can't put ads in pages that are exclusively asking input from the user, which means in vBulletin creating a thread page, replying or editing a post.

This code will put your ads between the navbar and forum/thread listing. Edit your "navbar" template, and after

<!-- / nav buttons bar -->
add

<br />
<if condition="THIS_SCRIPT != 'newthread' AND THIS_SCRIPT != 'newreply' AND THIS_SCRIPT != 'editpost' AND THIS_SCRIPT != 'search' AND THIS_SCRIPT != 'login' AND THIS_SCRIPT != 'register'">
<!-- Google AdSense -->
YOUR_ADSENSE_CODE_HERE
<!-- / Google AdSense -->
</if>
not sure about other locations, hope that helps.

updated added login and search and register

Can't forget login.php

<if condition="THIS_SCRIPT != 'newthread' AND THIS_SCRIPT !='newreply' AND THIS_SCRIPT != 'editpost' AND THIS_SCRIPT != 'login'">

wait....

adsense cant be placed on newthread and quickreply pages? is that what your telling me?

Looks like it..

No Google ad may be placed on any non-content-based pages. This includes error, login, registration, "thank you" or welcome pages.

You may get away with it on a quickreply, but newthread would definitely be in violation of the ToS.

Actually it also can't be on regiser and who's online. I think member's lists too but not sure on that one.

Have you tested the drop down/thread tools menu after adding this...in partucular anything that goes over 10 replies? I've discovered MAJOR issues with AJAX and anything that goes on the nav bar. I would love to try this but not if it is going to mess with the nav bar again. BTDT. Liz

Have you tested the drop down/thread tools menu after adding this...in partucular anything that goes over 10 replies? I've discovered MAJOR issues with AJAX and anything that goes on the nav bar. I would love to try this but not if it is going to mess with the nav bar again. BTDT. Liz

Liz, just stick it at the very very end of the template, after all the popup stuff. It will be cool. :)

(I would surround the google code with a <div align="center"> though. Makes it look nicer.)

Looks like it..



You may get away with it on a quickreply, but newthread would definitely be in violation of the ToS.

Whoops.

What about the whole User CP? Isn't that asking for user input as well?

if i want to put this right next to the main banner on the site how can i do this? what template do i edit and where do i put the code?

if i want to put this right next to the main banner on the site how can i do this? what template do i edit and where do i put the code?


bump please

can ise the demo of this

I have expanded it further in the if statement.. is there a better/optimized way to do this ?

<if condition="THIS_SCRIPT != 'newthread' AND THIS_SCRIPT != 'newreply' AND THIS_SCRIPT != 'editpost' AND THIS_SCRIPT != 'search' AND THIS_SCRIPT != 'login' AND THIS_SCRIPT != 'register' AND THIS_SCRIPT != 'memberlist' AND THIS_SCRIPT != 'calendar' AND THIS_SCRIPT != 'sendmessage' AND THIS_SCRIPT != 'faq' AND THIS_SCRIPT != 'usercp' AND THIS_SCRIPT != 'profile' AND THIS_SCRIPT != 'private' AND THIS_SCRIPT != 'subscription' AND THIS_SCRIPT != 'private' AND THIS_SCRIPT != 'online'">










privacy (GDPR)