View Full Version : Show Thread Enhancements - Google Adsense Postbit Integration
Atakan KOC
10-27-2008, 10:00 PM
Google Adsense Postbit Integration
install
Go to your admin cp, then:
Plugin System -> Manage Products -> [Add/Import Product] -> Select 'product-googleadsensei.xml' from your computer then press 'Import'
Modifications Info
Plugin : 2
Phrases : 12
Template : 1
Setting : 5
Google Adsense Postbit Setting
Go to your admin cp, then:
vBulletin Options -> Google Adsense Postbit Integration ->
Versions:
v1.0 - 30 July 2007
-First release
v1.1 - 31 July 2007
- Usergroup Permissions Added
v1.2 - 31 July 2007
- Usergroup Permissions Problem Fixed
v1.3 - 20 December 2007
- "Sponsored Links" Phrase added
- small template change
- vBulletin 3.7 released
v2.0 - 12 Octaber 2008
- vBulletin 3.7 released
If does not work;
Open template "postbit or postbit_legacy"
Find
<!-- post $post[postid] popup menu -->
After Add
$template_hook[postbit_end]
Atakan KOC
10-28-2008, 04:36 PM
Reserved.
kartik786
11-11-2008, 08:04 AM
if you wish to improve this, enable channel integrated google adsense for each forum so that webmasters know ads in which forum is performing better ;)
example : here on vb.org , forum for vb 3.8 mods will use particular channelto track ads and orum for vb 3.7 mods will use particular channel.
This way the webmaster knows which section to focus on for revenues.
ultimatearco
11-11-2008, 10:38 AM
works really fine.
Installed :)
abouahmed
11-11-2008, 02:22 PM
installed,
thanks
Hi there, first of all, its a great hack, but i've got one question.
I'm very interested in showing the googleads after the last post.
Could you tell me how i can manage that?
Cheers and thanks
Disi
diouxsie
01-07-2009, 07:02 PM
- Reserved -
acegames
01-09-2009, 11:26 AM
Thanks just what I was looking for
As this is applied to all styles, would there be a way to have a 'style assignment' type feature? For example, I have the 728px width ads assigned to a mobile style where I would actually want to use the Mobile AdSense ads (it's very skewed at this point), so the use of this would not necessarily be feasible across all styles (unless you wanted to add a mobile style addition). Anyhow, great product! :up:
*EDIT: For alternate styles that may or may not require this product, you can delete the content from the 'gaip_code1' template for that style.
christon26
01-14-2009, 01:56 AM
I've installed this thanx!
Is there a way to have the ads display at set intervals, such as after post 1, 5, 10, and on down to after the last post? Would it display randomly if so or would they all be the same? lol
Thanx for the mod!
Installed BUT! I want to show it on everypage for multipage threads
-=Leb=-
01-16-2009, 01:54 PM
Thank you Installed
kellyandmark04
01-17-2009, 01:02 AM
Is there any way to show this in between more than one post and have it show on the forum homepage???
kellyandmark04
01-18-2009, 07:23 AM
^^^Also is there any wa to have this pn my forum home in diff places???
vip-q.com
01-18-2009, 07:43 AM
Installed, thanks :)
Silentonenz
01-19-2009, 08:28 PM
Nice hack,
Anyway to put it on different positions on each thread? Some are multi-paged
Nadeemjp
01-19-2009, 10:48 PM
can we use Ad Brite ads instead of google adsense in here?
tribedude
01-20-2009, 09:29 AM
Is this going to work with 3.80?
tribedude It's work on mine ;)
albear
01-27-2009, 08:17 PM
Reserved.
Stubbed
01-29-2009, 10:05 PM
Hi there, first of all, its a great hack, but i've got one question.
I'm very interested in showing the googleads after the last post.
Could you tell me how i can manage that?
Cheers and thanks
Disi
Go Admin CP > Styles & Templates > Style Manager > Edit Templates (On the style you want to ad adverts on) > Double Click 'Ad Location Templates
You can edit any of those subtemplates and put any ad code in there, Google Adverts, OpenX, what ever you want. For after the last post, ad_showthread_beforeqr is what you want to edit (qr as in quick reply).
can we use Ad Brite ads instead of google adsense in here?
It looks like you can put any code in there, give it a go :)
markusv3000
02-24-2009, 09:42 PM
Thanks. this is great
thunderclap82
02-27-2009, 04:30 PM
This mod seems to be working, but is there a reason it only adds an ad to the Sponsored Link section only half the time?
Brandon Sheley
02-27-2009, 04:45 PM
Nice idea, altho I don't see why a product is needed when you can add your ads in the ad_location after first post and get the same results :)
Maybe I'm missing something
faxreport
02-28-2009, 04:07 PM
Good job , thank you :)
vision.mmxlix
03-05-2009, 10:19 PM
Very Cool, Thanks [^_^]
Jesse Stratford
03-12-2009, 05:51 PM
Nice work. I had to do the manual step of updating the template to get it to work.
Question: is it possible to make this show an ad after more than one post? E.g. what if I want an ad after post 1, post 10, post 20, etc.... I'm just thinking it's an awful waste only having the ad on the first page of the thread when threads often run many pages... would be great if I could get it to show up at least once on each page.
Many thanks for the mod, and for any assistance.
Installed..
Byt better change name because is not only for google :)
New name=more installs
Spaz21
03-30-2009, 07:14 PM
so ive installed this... and the ad only appears once. other addons let you have it appear after every "x" number of posts... can this be done with this as well?
fmntprsv
05-17-2009, 03:58 PM
It doesn?t work for me. Vbulletin 3.8.1 and vbseo 3.3.0. I tried to add
$template_hook[postbit_end]
and also doesn?t work. Any suggestion please! thanks in advance!
jkcerda
07-03-2009, 07:48 PM
cool, will give it a try
Macgiber
07-08-2009, 12:03 AM
thanks
daveaite
07-08-2009, 05:23 AM
thanks
ricardoNJ
07-11-2009, 04:23 PM
nice!
stickyslicks
07-13-2009, 12:23 AM
Hi,
I installed, and it works great in IE, but no ads show up in Firefox 2.0.0.18. The wrapper for the ads is there, it just doesn't show content.
Any idea why it works in one browser and not the other?
Thanks for any help!
brvheart
07-20-2009, 06:00 PM
How would I keep from working on my iphone template or at least adjust the size so that it looks ok with that template?
ARKphoenix2k
07-22-2009, 11:11 PM
Works great, thanks.
Installed
MikesSite
08-03-2009, 03:44 AM
I would like to install this, but I would like to have it only active for 1 forum. Could I possibly manually add it into the style? How could I do this? Thanks!!
elenh
08-18-2009, 09:27 AM
If you want to add Google Adsense Postbit Integration in more places in your forum like in the Private messages then do this:
Create a new plugin and add:
Product: Google Adsense Postbit Integration
Hook Location: parse_templates
Title: Google Adsense PM Integration
Execution Order: 5
Plugin PHP Code: eval('$gaip_code1= "' . fetch_template('gaip_code1') . '";');
Plugin is Active: Yes
Click Save.
Now go style manager and search in templates:
Find in Private Message / pm_showpm template:
<if condition="$show['quickreply']">
Adove add:
$gaip_code1
<br />
Click Save and done!
Now if a member read a PM then before the Quick Reply editor is showing the Sponsor Banners.
Tip: You can put the code $gaip_code1 where ever you like to show the banners, but for me the best places/targets to provide the banners is under 1 post in the topics and before the quickreply editor when a member read the pm.If you place it in more places then your site will lose load speed.
Thanks a lot!!
corsacrazy
08-21-2009, 10:09 PM
what if we dont want to show this in certain forums.. like the important forums etc and only keep it in a few ?
aapkae
08-29-2009, 06:21 PM
Work Fine with 3.8.3 thanks
Bob_R
08-29-2009, 06:24 PM
It would be great if it could place ads after the last post.
And maybe if chose for guests only.
mindfrost82
09-04-2009, 03:59 PM
I don't want to display ads in my VIP forums, if I try adding this around the AdSense code it still seems to display in all forums:
<if condition="!in_array($GLOBALS[forumid], array(X,Y,Z))">
</if>
Any ideas if this is possible?
Thanks!
aaa007
09-05-2009, 06:45 PM
how can i have ads on every 3-4 posts??
Is this possible?
duditas
09-06-2009, 09:38 AM
Does it work with Vidvertiser too? Thanks
iheartvb
09-06-2009, 04:53 PM
how do i align the ad to the left part of the post instead of the center?
Guvadan
09-07-2009, 09:08 PM
There seems to be a bug in this as I am also finding it works in one browser but not another. Works fine in Firefox, but doesn't show in IE or chrome. I notice someone else posted the opposite a few posts back. Any ideas?
Tibia4
09-07-2009, 11:43 PM
nice, thanks it's work for me
Jeweetog
01-18-2010, 09:19 PM
Hi,
Nice hack!
I was wondering if you can alter it so that the google adsense bar can show up on multiple places.
For example under all posts, and under forums at forum home, and under the navbar.
For all those options a yes/no would be enough and a place to put the adsense code which is already present.
Bouncer222
01-24-2010, 03:18 PM
**REQUEST**
Could you please instead of making it after Post #, make it to show up after each X posts, example would be that it would show up every 3 posts, so that it doesnt only show up one advertisement?
Bouncer222
01-24-2010, 03:24 PM
And I cannot find <!-- post $post[postid] popup menu --> in postbit_legacy ... help please???
helmica
01-27-2010, 02:30 PM
hi,
By me it is not working on VB4 do you plan to make it work for Vb4?
I am loving it i hope to be able to use it on Vb4
Thanks in advance for your prompt response
G-man
02-04-2010, 03:26 AM
I second this. Had it working before I upgraded and would love to have it back with 4.0. I can't stand the limitations of the only 4 places for ads that are built into 4.0
xlguy
03-17-2010, 03:24 PM
If you want the ad to appear twice in a thread then you just need to edit the plugin code, Google Adsense Postbit Integration > postbit_display_complete find this bit of code
if ($post[postcount] % $vbulletin->options[maxposts] == $google_sira and !$GLOBALS['vbulletin']->GPC['ajax'])
{
eval('$template_hook[postbit_end] .= "' . fetch_template('gaip_code1') . '";');
}
and add below this code (editing 19 to your choice)...
if ($post[postcount] % $vbulletin->options[maxposts] == 19 and !$GLOBALS['vbulletin']->GPC['ajax'])
{
eval('$template_hook[postbit_end] .= "' . fetch_template('gaip_code1') . '";');
}
That would, in our case, add it after the 19th post as well as the one specified in the options section. Obviously this is a bit of an ugly solution, as you have to hard code in the post number (but it works on all pages, i.e. the 19th post on each page not just the first one) but I hope it helps others.
BeefyBeefo
03-21-2010, 08:31 PM
Works great! Thanks!
**Installed**
matthewhotdude
04-01-2010, 06:44 PM
installed but the adds are showing up twice?
BadgerDog
05-02-2010, 09:53 PM
This works great for us under v3.6 ... :up:
We really need the user group permissions capability of this kind of mod, so is there any chance it will be upgraded for v4, as there doesn't seem to be a v4 adsense mod that does this.
Thanks ... :)
Regards,
Badger
muratcan25
05-11-2010, 09:35 AM
thanks installed !
basskiller
06-13-2010, 06:37 AM
is there a way to run a rotation of different scripts?
Like adsense , some affiliate banner, amazon.. and have it rotate between the three different blocks of code?
Can someone or developer please take attention!!!
Would be great to add option to disable it for some forums or even threads by IDs as some forums can be nonGoogle friendly and they can BAN your account for it (just got email about that)!
oldfan
08-01-2010, 12:49 AM
I played around with the script a bit and I got the ads to work after the last post
SHOWTHREAD template, I added the red text.
Now I have the first and last post
<div id="posts">$postbits<div id="lastpost"></div></div>
<!-- start content table -->
$spacer_open
<!-- / start content table -->
$gaip_code1
<p>
<!-- controls below postbits -->
Now if I could figure out to have different ad colors for my other skins
TitanJeff
09-10-2010, 01:17 PM
Love this hack. I started using it with 3.7 and the same version works fine with 3.8.6.
If I could add a feature, it would be to have the option to add code in multiple areas of a thread, use different code and be able to set each for different usergroups.
For example:
After the third post, a leaderboard is placed which is set to be viewed by all.
After the sixth post, a 300x250 is added to be seen by only guests.
I think I can add conditions for it to be seen by only certain groups but can't figure out how to add multiple code options.
fxwoody
09-11-2010, 10:16 AM
Nice hack tks! Lots of good ideas here for this, should be interesting to see what will be the results of all these?
Anyway, installed ;)
BadgerDog
09-27-2010, 10:10 AM
I tried to get an answer in the programming area, but nobody there seems to know how to do this, or doesn't want to help out ....
I have this mod installed and it works great, so I thought either the programmer here or someone else could help me with a simple question ...
I'm not a programmer, but know enough to be dangerous and can insert code within templates etc.
I'd like to have my adsense ads only appear for specific usergroups (1,2,3,4,6,13,16)...
So, in simple terms, what is the code to wrap around my adsense script to have the ads displayed for just those usergroups and centered.
ie:
===================
if ....
<script>
xxx
xxxx
xx
<script>
endif
==================
Thanks for any help ... :)
Regards,
Badger
TitanJeff
10-01-2010, 12:56 PM
Try this:
<if condition="is_member_of($vbulletin->userinfo,1,2,3,5)">
Your ad code here.
</if>
BadgerDog
10-01-2010, 08:24 PM
Try this:
<if condition="is_member_of($vbulletin->userinfo,1,2,3,5)">
Your ad code here.
</if>
Thanks ... :)
Regards,
Badger
shoppingtelly
10-06-2010, 09:11 AM
Is there a way to use this twice? So I can see the mod twice in control panel and add ads under two different number posts?
Many thanks
BadgerDog
10-06-2010, 10:15 AM
Is there a way to use this twice? So I can see the mod twice in control panel and add ads under two different number posts?
Many thanks
I'd like to add this as well, just after first post and before last post ....
Regards,
Badger
BadgerDog
10-06-2010, 10:26 AM
I played around with the script a bit and I got the ads to work after the last post
SHOWTHREAD template, I added the red text.
Now I have the first and last post
Hi ... :)
I can't seem to find the code you posted anywhere in showthread template, so I can add the part you indicated in red and get adsense in the two places?
Thanks for any help ....
Regards,
Badger
asabet
05-22-2011, 12:42 AM
If you want the ad to appear twice in a thread then you just need to edit the plugin code, Google Adsense Postbit Integration > postbit_display_complete find this bit of code
if ($post[postcount] % $vbulletin->options[maxposts] == $google_sira and !$GLOBALS['vbulletin']->GPC['ajax'])
{
eval('$template_hook[postbit_end] .= "' . fetch_template('gaip_code1') . '";');
}
and add below this code (editing 19 to your choice)...
if ($post[postcount] % $vbulletin->options[maxposts] == 19 and !$GLOBALS['vbulletin']->GPC['ajax'])
{
eval('$template_hook[postbit_end] .= "' . fetch_template('gaip_code1') . '";');
}
Thanks for the tip! I changed
if ($post[postcount] % $vbulletin->options[maxposts] == $google_sira and !$GLOBALS['vbulletin']->GPC['ajax'])
to
if ($post[postcount] % 3 == 0 and !$GLOBALS['vbulletin']->GPC['ajax'])
and now have the ad after every 3rd post the way I wanted it.
Big Kahuna
08-01-2011, 10:56 PM
Man I wish there was a version of this for VB4
8thos
08-02-2011, 12:30 AM
Word.
basskiller
10-25-2011, 10:03 PM
is there a way to create a second one that is totally different from the first???
This way I could add different sponsors to the second one in a second location
TitanJeff
12-03-2011, 03:37 PM
I also wanted to check to see if there is a way for this to pull a random image from a designated folder on my server. I assume it would be writing some code to go where the ad code is now. Any ideas?
Also, would it be possible to randomize where the photo is inserted? Right now, I can choose the number but would prefer it be something like between posts 4 and 9 so the reader never knows when it'll show.
This might be an entirely new hack but this one seems to do almost what I need.
g0rdy
12-06-2011, 05:40 PM
I also wanted to check to see if there is a way for this to pull a random image from a designated folder on my server. I assume it would be writing some code to go where the ad code is now. Any ideas?
Also, would it be possible to randomize where the photo is inserted? Right now, I can choose the number but would prefer it be something like between posts 4 and 9 so the reader never knows when it'll show.
This might be an entirely new hack but this one seems to do almost what I need.
Yes, should be, google for javascript image / banner rotator.
is there vb4 version?! Can't find any similar :(
basskiller
05-10-2013, 01:37 PM
does anyone know how to not show on certain styles. I have several different styles for specific areas. there are a few where I do not want this to show on
captain-busa
10-25-2013, 09:17 PM
This was a great mod until 4.2.2 and it caused errors. Gonna miss the old girl...
ozzy47
10-25-2013, 09:25 PM
This was a great mod until 4.2.2 and it caused errors. Gonna miss the old girl...
What were the errors?
EDIT: Nevermind, I see this is not even for vB4 at all.
Jim Oaks
01-28-2014, 03:28 AM
This stopped working today. I tried to uninstall, but it won't uninstall. I re-installed, and when I went to ad my adsense code, my code from the last install was there. I even had it checked to overwrite.
Can someone please tell me how to uninstall this?
mykkal
05-08-2015, 06:08 AM
If anyone figures out how to get this working with vb 4.2.X. This really increased the amount of revenue I was making. Ridiculously increased it.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.