View Full Version : Show Thread Enhancements - Google Adsense / Adbrite Ads Based on Length of First Post
Neutral Singh
10-12-2006, 10:00 PM
Google Adsense / Adbrite Based on Length of First Post
This should work on all versions of vbulletin 3.5.x and above.
Keywords: google, adsense, adbrite, yahoo publisher, earn, income, showthread, first post, thread, topic
Google Policy on showing competitive advertisements at end of this post:
Context: Time to make some neat money on google adsense. Well, this is a cute little plugin which enables an admin to show variable adsense or adbrite code on the first post of the thread/topic based on the length of the message. This helps in keeping in shape the demographics of the forum by keeping the things neat and tidy. You can visit my forums on my website (http://www.sikhphilosophy.net) and surf through some threads/topics to get a clear picture of what i am saying.
Installation Instructions:
Go to Plugin Manager > Add new Plugin
Product: vbulletin
Hook Location: postbit_display_complete
Title: Google Adsense in Postbits Based on the Length of Message
Execution Order: 5
Plugin PHP code: $post['text_length'] = strlen($post['message']);
Now edit Template posbit or postbit_legacy
Find:
<div>$post[icqicon] $post[aimicon] $post[msnicon] $post[yahooicon] $post[skypeicon]</div>
</div>
Add Below: (Put the following code where ever you feel like adding.)
<if condition="THIS_SCRIPT == 'showthread'">
<if condition="$post['text_length'] < 1200">
<br>
Google Adsense/Adbrite/Publisher Code # 1 Here
<else />
<br>
Google Adsense/adbrite/Publisher Code # 2 Here
</if>
</if> Here, 1200 is variable to adjust the length of message to change your adsense accordingly.
You are done! You can play with this thing to add your own advertising banners or adbrite code as well.
Demo: http://www.sikhphilosophy.net
Google Policy on showing competitive advertisements:
Thank you for your email. Google AdSense program policy does not permit Google ads to be published on the same web page as other
contextually-targeted ads. More broadly, our policy does not permit Google
ads to be displayed on the same website as ads that mimic or attempt to be
associated with Google ads. According to these program policies, AdBrite
may be displayed on the same page as Google ads on your site. We do allow
affiliate or limited-text links. However, other contextually-targeted ads
may not be used.
For publishers participating in AdSense for search, please note that we do
not allow other search services or query-targeted ads to be displayed on
the same site as AdSense for search.
Our intent with this policy is to be as fair to our advertisers as
possible and to maintain the integrity of the AdWords and AdSense
programs.
We appreciate your cooperation and look forward to your continued
participation in AdSense.
For additional questions, I'd encourage you to visit the AdSense Help
Center (http://www.google.com/adsense_help), our complete resource center
for all AdSense topics. Alternatively, feel free to post your question on
the forum just for AdSense publishers: the AdSense Help Group
(http://groups.google.com/group/adsense-help).
Please do click install if you like it.
Enjoy!!
Acido
10-13-2006, 01:22 AM
Thanx for sharing. Really is very useful.
Cheers!;)
Snake
10-13-2006, 02:18 AM
How about a screenshot please? :)
dieselpowered
10-13-2006, 02:30 AM
Ummm not sure what I am looking for (not a whole lot of direction in your post, however, if it is the adsense banners you have placed, many of them are against their TOS. Something for everyone to keep in mind.
How are they against the TOS? Adsense can be displayed with AdBrite no problem according to BOTH of their TOS agreements.
osmanungur
10-13-2006, 06:51 AM
For Testing
http://www.sikhphilosophy.net/anand-sahib/1059-anand-sahib-pauri-8th.html
DementedMindz
10-13-2006, 09:30 AM
How can you have google ads on one page along with another companys ads aint that against the TOS?
Last time i checked, any contextual based ad system can not be used with google on the same page. I phathom to think that adbrite is a contextual ad server very similar to google. Could you please post where it says the 2 can be used on the same page. This will stop all of us wondering. (I have read the TOS on google and can't recall it saying anywhere that adbrite was ok to use on the same page. Perhaps I overlooked it?)
Kihon Kata
10-13-2006, 12:42 PM
Rich is correct. Any contextual based ad system cannot be used with google on the same page.
ChavMagnet
10-13-2006, 01:17 PM
Looks ugly and illegal *UNISTALLED*
Neutral Singh
10-13-2006, 02:00 PM
I won't take all this speculation until anybody could quote directly from TOS. :rolling eyes:
Throtex
10-13-2006, 02:57 PM
I won't take all this speculation until anybody could quote directly from TOS. :rolling eyes:
Competitive Ads and Services
We do not permit Google ads or search boxes accessing Google search services to be published on web pages that also contain what could be considered competing ads or services. If you have elected to receive contextually-targeted Google ads, this would include all other contextually-targeted ads or links on the same page as Google ads. This would also include ads throughout the site that mimic Google ads or otherwise appear to be associated with Google on your site. Although you may sell ads directly on your site, it is your responsibility to ensure these ads do not mimic Google ads. If you have elected to receive Google search services, this would include other search services on the same site and non-Google query-targeted ads. We do allow affiliate or limited-text links.
Not that this has anything to do with the hack itself ... hack itself looks good.
KuRnAz
10-13-2006, 05:25 PM
I think there is a wrong thing with that code :)
I have added code in posbit_legacy and created a new plugin but I can't see ads in messege :) Thet are under pst number on posbit :)
How can I fix that ?
Thanks...
Calash
10-13-2006, 08:52 PM
https://www.google.com/adsense/support/bin/answer.py?answer=48182&sourceid=aso&subid=ww-ww-et-asui&medium=link&gsessionid=qkexqJeJiAY
If you want the link....not that hard to find thought....just google for it :)
Hello,
You should have rearched the TOS before releasing this. if someone has installed this and done as this mod specifies and adds both ad servers to their site, on the same page, they could be screwed and removed from google for reasons they will never know. I would suggest contacting everyone that has installed this to let them know that it does indeed violate the TOS.
How are they against the TOS? Adsense can be displayed with AdBrite no problem according to BOTH of their TOS agreements.
007,
You need to go and re-read the TOS again. You are highly mistaken.
Ryan McBain
10-14-2006, 07:33 AM
Well just put either adsense or something else in the code, not both and the problem is solved...right?
Throtex
10-14-2006, 11:52 AM
Well just put either adsense or something else in the code, not both and the problem is solved...right?
Yeah ... there's nothing wrong with the hack, and can be used with any one of those ad services.
Just remember that for Google:
"Up to three ad units may be displayed on each Web site page."
So don't get carried away. :D
www.1n1n.com
10-14-2006, 12:27 PM
Sorry. The administrator has banned your IP address. To contact the administrator click here !!:(
Neutral Singh
10-14-2006, 02:39 PM
Alright!! I have changed the topic slightly to end the controversy... now please enjoy the little plugin!! ;)
tansu
10-15-2006, 10:53 AM
well, now is it against or not? (TOS)
And how can I use it to show only visitors, not members?
thanks in advance
Neutral Singh
10-16-2006, 01:31 AM
well, now is it against or not? (TOS)
And how can I use it to show only visitors, not members?
thanks in advance
Use the following code in the postbit.
<if condition="($show['guest'])">
<if condition="THIS_SCRIPT == 'showthread'">
<if condition="$post['text_length'] < 1200">
<br>
Google Adsense or Adbrite or Publisher Code # 1 Here
<else />
<br>
Google Adsense or adbrite or Publisher Code # 2 Here
</if>
</if>
</if>
Enjoy!!
KuRnAz
10-16-2006, 07:46 AM
Use the following code in the postbit.
<if condition="($show['guest'])">
<if condition="THIS_SCRIPT == 'showthread'">
<if condition="$post['text_length'] < 1200">
<br>
Google Adsense or Adbrite or Publisher Code # 1 Here
<else />
<br>
Google Adsense or adbrite or Publisher Code # 2 Here
</if>
</if>
</if>
Enjoy!!
And what is the wrong thing with me :(
Ads aren't in messega they are on posbit ..
Just copied the code you give...
Look The Pic ...
What must I do...
Thanks...
Neutral Singh
10-16-2006, 01:18 PM
I said you can play with this thing and put links whereever you feel nice.
Neutral Singh
10-16-2006, 02:22 PM
Ok Find
<!-- message -->
Till
<!-- / message -->
Replace all with the following code:
<!-- message -->
<div id="post_message_$post[postid]">
<table id="post$post[postid]" class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="0" border="0" width="100%" align="center" valign="top">
<tr><td valign="top">
$post[message]
</td>
<td width="160" align="middle" valign="top">
<if condition="THIS_SCRIPT == 'showthread'">
<if condition="$post['text_length'] < 1200">
<br>
$vbphrase[Google_Postbit_Skyscraper_120x240]
<else />
<br>
$vbphrase[Google_Postbit_Skyscraper_160x600]
</if>
</if>
</td>
<td width="160" align="middle" valign="top">
</td>
</table>
</div>
<!-- / message -->
Neutral Singh
10-17-2006, 03:15 PM
Competitive Ads and Services
We do not permit Google ads or search boxes accessing Google search services to be published on web pages that also contain what could be considered competing ads or services. If you have elected to receive contextually-targeted Google ads, this would include all other contextually-targeted ads or links on the same page as Google ads. This would also include ads throughout the site that mimic Google ads or otherwise appear to be associated with Google on your site. Although you may sell ads directly on your site, it is your responsibility to ensure these ads do not mimic Google ads. If you have elected to receive Google search services, this would include other search services on the same site and non-Google query-targeted ads. We do allow affiliate or limited-text links.
Not that this has anything to do with the hack itself ... hack itself looks good.
Hello All
Just now i got a clear cut reply from google:
Thank you for your email. Google AdSense program policy does not permit
Google ads to be published on the same web page as other
contextually-targeted ads. More broadly, our policy does not permit Google
ads to be displayed on the same website as ads that mimic or attempt to be
associated with Google ads. According to these program policies, AdBrite
may be displayed on the same page as Google ads on your site. We do allow
affiliate or limited-text links. However, other contextually-targeted ads
may not be used.
For publishers participating in AdSense for search, please note that we do
not allow other search services or query-targeted ads to be displayed on
the same site as AdSense for search.
Our intent with this policy is to be as fair to our advertisers as
possible and to maintain the integrity of the AdWords and AdSense
programs.
We appreciate your cooperation and look forward to your continued
participation in AdSense.
For additional questions, I'd encourage you to visit the AdSense Help
Center (http://www.google.com/adsense_help), our complete resource center
for all AdSense topics. Alternatively, feel free to post your question on
the forum just for AdSense publishers: the AdSense Help Group
(http://groups.google.com/group/adsense-help).
So, we can show adbrite along with google if not yahoo publisher hence i have change the topic accordingly... :rambo:
Cueball
10-18-2006, 03:39 AM
Great hack! I have it installed and it works well. Just one change I would like to see in any updates. If there is a way to exclude certain forums from grabing the google ads. that would be a big plus !
Thanks again :)
Cueball
10-19-2006, 01:47 PM
Great hack! I have it installed and it works well. Just one change I would like to see in any updates. If there is a way to exclude certain forums from grabing the google ads. that would be a big plus !
Thanks again :)
Is there a way to do this ?
Cueball
10-19-2006, 04:46 PM
I have uninstalled this since there is little to no support for it. Maybe there is another similar hack out there? Anyone see a similar hack? Thanks anyway :)
Frapegliko
10-19-2006, 05:12 PM
is there any way to show ads only on first post?
i use postbit_legacy
tanyeri24
10-21-2006, 09:42 AM
is there any way to show ads only on first post?
i use postbit_legacy
yeah only first post would be good :cry:
Neutral Singh
10-21-2006, 03:19 PM
Use the following code: ;)
<if condition="THIS_SCRIPT == 'postbit_legacy'">
<if condition="$post['text_length'] < 1200">
<br>
Google Adsense/Adbrite/Publisher Code # 1 Here
<else />
<br>
Google Adsense/adbrite/Publisher Code # 2 Here
</if>
</if>
SnitchSeeker
10-21-2006, 08:28 PM
This looks great!
But is there a way to have it place the adSense ad AFTER the first post (rather than inside it like in your forum)? ie. between the first and second posts?
Looks very clever indeed. And since I only use adSense and non-context targeting ads I have nothing to fear with the TOS :)
SnitchSeeker
10-22-2006, 06:41 PM
Have you added code for this to show only for first post? I tried your last post (https://vborg.vbsupport.ru/showpost.php?p=1101436&postcount=31) and that doesn't work.
AdSense has a rule that only three ads can be shown per page. If we don't make a rule that excludes this to the first post, we may end up violating their rules.
Could you post an explanation of what exactly the original code does and how we can modify it to show only for the first post?
Also, how do I test this? Will it only work on threads started after installing the plug-in? Or is there a way to make it retro-active (or however you write it)?
I have to say I am very positive about this but it really needs some ironing out.
Thanks! :)
Neutral Singh
10-23-2006, 01:29 AM
If we remove the if conditions then this code will work anywhere.
SnitchSeeker
10-23-2006, 12:04 PM
If we remove the if conditions then this code will work anywhere.
Thanks. That is obvious.
Could you please answer the questions from my last post? Especially: How do you code it so it only shows up in the first post of a thread?
EDIT: I guess the title does say "length of first post" which could mean you have already coded it for the first post ONLY. If that is the case, then I appologize for not getting it. But could you confirm it?
Also, what do I have to do so that all threads before I installed this will also be affected? (Nevermind, it seems to do it automatically! Yay!) :)
EDIT 2: Yes! I got it to work! *clicks install* Very nice job! I love it! :)
I still wish I could get confirmation that this is ONLY for the first post and some directions on how to tweek it for different settings would be really cool as well. For example what all the IF statements you have posted here do.
Cheers! Nice job! :)
Neutral Singh
10-25-2006, 02:06 AM
How do you code it so it only shows up in the first post of a thread?
Cove the code with following conditionals:
<if condition="!$GLOBALS['FIRSTPOSTID']">
Above Code here
</if>
SnitchSeeker
10-25-2006, 07:42 AM
Cove the code with following conditionals:
<if condition="!$GLOBALS['FIRSTPOSTID']">
Above Code here
</if>
Thank you so much! :)
Muchos appreciated.
Hello,
You should have rearched the TOS before releasing this. if someone has installed this and done as this mod specifies and adds both ad servers to their site, on the same page, they could be screwed and removed from google for reasons they will never know. I would suggest contacting everyone that has installed this to let them know that it does indeed violate the TOS.
007,
You need to go and re-read the TOS again. You are highly mistaken.
FYI, Adbrite is not contextual. It does not pull info from the page to serve ads. Now if you had yahoo and google then yes that would be a TOS violation. :eek:
ercollins
08-08-2007, 04:41 PM
It is completely legal to place Adsense and Adbrite on the same page if you actually read the program policies at google.
If you are going to tell someone what they can and cant do you should also include any information to back your statements up.
Can I place Google ads on the same page with other ads?
You're welcome to display Google ads on the same site or page as other third party advertisements provided that the formatting or colors of the third party ads is different enough from that of the Google ads. In other words, if you choose to place non-Google ads on the same site or page as Google ads, it should always be clear to the user that the ads are served by different advertising networks and that the non-Google ads have no association with Google. If the formats are naturally similar, we ask that you choose different color schemes for the competing ads.
Our intent with this policy is to be as fair to our advertisers as possible and to maintain the integrity of the AdWords and AdSense programs. You can learn more about this, and all our policies, on our program policies page.
Here is the link:
https://www.google.com/adsense/support/bin/answer.py?answer=32849&ctx=en:search&query=other+ads&topic=&type=f
Personally I dont run adbrite but I do run CJ.com ads and Adsense, and I had also contacted google prior to doing so, and they replied that I well with in TOS.
The only questionable problem with any of these scripts is that google does not allow their adsense program to run from any scripts or software. Take it at what it is worth.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.