View Full Version : Mini Mods - Adsense Inside the Post
unitedpunjab
03-04-2008, 10:00 PM
This little template modification allows you to put an Ad inside the post with Text wrapped around the Ad.
See Screenshot.
In postbit template replace
<!-- message -->
<div id="post_message_$post[postid]">$post[message]</div>
<!-- / message -->
With
<!-- message -->
<if condition="(($post[postcount] % $vboptions[maxposts] == 1)) and ($show['guest'])">
<span style="margin: 2px; float: right; width: 301px; height: 251px;">
ADSENSE CODE HERE
</span>
</if>
<div id="post_message_$post[postid]">$post[message]</div>
<!-- / message -->
you will have to replace ADSENSE CODE HERE with the actual code.
The code is for 300 * 250 Medium Rectangle Format,Edit width & height parameters if you want to use any other format.
Ad is shown on the first and last post (modify if you want)
Ad is shown to guests Only ( remove "and ($show['guest'])" to show to all)Version History:
v 1.0.1 :Ads displayed after the first post on every page (instead of just the first page)
Tip: To remove quote button for guests.
Replace
<if condition="$post['replylink']
with
<if condition="$post['replylink'] AND $show['member']">
iogames
03-05-2008, 08:28 PM
I think is too much :(
SwollenCranium
03-05-2008, 08:53 PM
I think is too much :(
I did as well, then I saw this part ;
** Ad is shown to guests Only ( remove "and ($show['guest'])" to show to all) **
I would never subject my members to this type of add placement, but I have seen many forums that do.
Basically ... some will like it, some won't.
Barakat
03-06-2008, 01:25 AM
looks nice ....
v12kid
03-07-2008, 11:11 PM
can you assign this to specific forums?
abroad
03-10-2008, 10:45 PM
Dont use this script. It is not allowed to use float elements and Iframesfor your Google Ads. I got an email from Google concerning this.
shoppingtelly
03-12-2008, 11:47 AM
What did Google say?
Would it be possible to apply this to some various usergroups?
abroad
03-12-2008, 04:11 PM
they just said that they have switched off my ads as I used float elements with the ad and that I have 2 weeks to remove it...otherwise they are going to deactivate my account.
jack bro
03-12-2008, 04:34 PM
Although this is a good idea, I wouldn't recommend using until Google approves it or it gets changed.
Jack.
pcoskat
03-22-2008, 11:45 AM
Anyone heard from google?
dancue
03-27-2008, 04:47 PM
I just read their guidelines and didn't see any mention of it.
I'm sure, if they do indeed prohibit the use of ads in this manner that we could simply substitute the code for another code from another ad agency. (as long as the ads look different from those from google's)
pcoskat
03-28-2008, 02:25 PM
Dont use this script. It is not allowed to use float elements and Iframesfor your Google Ads. I got an email from Google concerning this.
Specifically what were you doing, and what did Google say to you?
Jase2
03-28-2008, 02:41 PM
He is correct. You are not allowed to use Iframes -- but the ad can go there.
Here is the correct way:
FIND:
<!-- message -->
<div id="post_message_$post[postid]">$post[message]</div>
<!-- / message -->
Replace with:
<!-- message -->
<div id="post_message_$post[postid]">
<if condition="($post[postcount]==1) and ($show['guest'])">
<div style="float: right; margin: 0 0 5px 5px;">
<script type="text/javascript"><!--
google_ad_client = "pub-0574157151562455";
/* 250x250, created 28/03/08 */
google_ad_slot = "5276949639";
google_ad_width = 250;
google_ad_height = 250;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
<br />
</div>
</if>
$post[message]
</div>
<!-- / message -->
Change to match your set-up!
Anyway, where would I edit to get my ads to down the right hand side of a thread? Am I right in thinking somewhere in the 'showthread' template?
Regards Jason :)
dancue
03-29-2008, 02:20 AM
He is correct. You are not allowed to use Iframes -- but the ad can go there.
Here is the correct way:
FIND:
<!-- message -->
<div id="post_message_$post[postid]">$post[message]</div>
<!-- / message -->
Replace with:
<!-- message -->
<div id="post_message_$post[postid]">
<if condition="($post[postcount]==1) and ($show['guest'])">
<div style="float: right; margin: 0 0 5px 5px;">
<script type="text/javascript"><!--
google_ad_client = "pub-0574157151562455";
/* 250x250, created 28/03/08 */
google_ad_slot = "5276949639";
google_ad_width = 250;
google_ad_height = 250;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
<br />
<a href="http://www.techsupportteam.org/register.php" target="_parent"></a>
</div>
</if>
$post[message]
</div>
<!-- / message -->
Change to match your set-up!
Anyway, where would I edit to get my ads to down the right hand side of a thread? Am I right in thinking somewhere in the 'showthread' template?
Regards Jason :)
Thanks!
Now why do you have this there for?
<a href="http://www.techsupportteam.org/register.php" target="_parent"></a>
Jase2
03-29-2008, 11:48 AM
You don't, remove it if you want.
Regards Jason :)
Liquid1ce
04-11-2008, 12:26 PM
its same for postbit legacy?
dancue
04-12-2008, 03:33 PM
I'm using mine on postbit legacy. Works fine. Just be sure to use Jase's version (post 13 in this thread) if you are using google for ads.
netsavy006
04-13-2008, 09:36 PM
It's not working for me. I was trying it out with Bidvertiser code and it doesn't work:
<!-- message -->
<if condition="(($post[postcount] % $vboptions[maxposts] == 1))">
<span style="margin: 2px; float: right; width: 301px; height: 251px;">
<SCRIPT LANGUAGE="JavaScript1.1" SRC="http://bdv.bidvertiser.com/BidVertiser.dbm?pid=84584&bid=241167" type="text/javascript"></SCRIPT>
<noscript><a href="http://www.bidvertiser.com">affiliate program</a></noscript>
</span>
</if>
<div id="post_message_$post[postid]">$post[message]</div>
<!-- / message -->
koolfire
04-29-2008, 02:41 AM
I think this kind of add placing is really annoying and makes you think how greedy the admin is..
But hey, thats just me
dancue
04-29-2008, 01:27 PM
I think this kind of add placing is really annoying and makes you think how greedy the admin is..
But hey, thats just me
I disagree. If it's kept on just the first post of every thread it isn't as annoying. Hey, we've got to try and make our money somehow...
roalaik
05-02-2008, 12:49 AM
i cant locate the postbit template
Guest210212002
05-02-2008, 08:44 AM
fyi, this (done correctly, without the iframe tag) is my best performing unit.
roalaik
05-02-2008, 10:14 AM
I am asking where the postbit template is
unitedpunjab
05-02-2008, 10:53 AM
fyi, this (done correctly, without the float tag) is my best performing unit.
However in terms of the mod - everyone is correct. Doing it with the float tag will get you punted from adsense right quick.
How did you manage to achieve this without the float tag ?
I will replace the code with your code,, with your permission off course.
dancue
05-02-2008, 01:00 PM
How did you manage to achieve this without the float tag ?
I will replace the code with your code,, with your permission off course.
Jase provided it on this thread. Page 1.
unitedpunjab
05-02-2008, 01:15 PM
The code in post#13 still use the float element.
<div style="float: right; margin: 0 0 5px 5px;">
<div> and <span> tags are almost the same thing.
This kind of ad placement is extensively used on many sites,but if anyone is still sceptical about it then use it for something other than adsense.
dancue
05-02-2008, 04:04 PM
Hopefully Chris-777 can tell us what he did.
Jase2
05-02-2008, 09:31 PM
Nope, this is using an Iframe - which is against Googles TOS.
dancue
05-02-2008, 09:34 PM
so the float does not matter?
Guest210212002
05-04-2008, 02:47 PM
Gah, more coffee before posting. I _AM_ using the float tag, not the iframe tag.
Apologies.
dancue
05-04-2008, 07:11 PM
So is it Iframes, float tags, or both not allowed? Which is it?
unitedpunjab
05-04-2008, 07:33 PM
I can't find anywhere in adsense tos that iframes are barred,
All I could find was this
Our targeting technology is not optimized to serve ads within a separate IFRAME. If you placed the AdSense code in a separate IFRAME, your site may display less targeted ads or public service ads.
In this adsense guide:
https://www.google.com/adsense/support/bin/answer.py?hl=en&answer=10035
It still doesn't say that you will be banned for using iframes.
There is absolutely no mention of float element anywhere,
dancue
05-04-2008, 07:46 PM
Cool. So Jase's version is what we should be using, correct.
Can this be updated so that there's no more confusion?
Again, Thanks for this. I love this mod.
KURTZ
05-04-2008, 07:49 PM
<a href="http://www.vbulletin.com/forum/showthread.php?t=237530" target="_blank">http://www.vbulletin.com/forum/showthread.php?t=237530</a>
unitedpunjab
05-04-2008, 08:53 PM
Cool. So Jase's version is what we should be using, correct.
Can this be updated so that there's no more confusion?
Again, Thanks for this. I love this mod.
Jase's code and the original code is 99% similar,use/not use any at you very own discretion.
unitedpunjab
05-04-2008, 08:55 PM
http://www.vbulletin.com/forum/showthread.php?t=237530
Thanks but that does n't achieve the similar placement.
unitedpunjab
05-05-2008, 02:52 PM
Check this: https://vborg.vbsupport.ru/showthread.php?t=178166
This plugin does the same thing and its lot easier.
dancue
05-13-2008, 09:04 PM
Hey,
Anybody want to tell me how I could possibly use a condition to use a certain ad if using a certain style? I ask because I have both fixed and fluid styles and using a 300x250 ad on a fixed style is way too much.
gabbar77
07-29-2010, 06:54 AM
I am using vBulletin™ Version 4.0.3
It has its own ad management. I have placed ads on first and last post but the content of posts are not wrapped.
Check this post
Best Antivirus software? (http://www.webmasters-forum.org/computers-forum/663-best-antivirus-software.html)
Can you help me?
webnsn
11-07-2015, 03:09 PM
Great,
I have added LEFT side
http://wikinewforum.com/showthread.php?p=998292
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.