PDA

View Full Version : Mini Mods - Adsense Inside the Post


unitedpunjab
05 Mar 2008, 17:08
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
05 Mar 2008, 21:28
I think is too much :(

SwollenCranium
05 Mar 2008, 21:53
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
06 Mar 2008, 02:25
looks nice ....

v12kid
08 Mar 2008, 00:11
can you assign this to specific forums?

abroad
10 Mar 2008, 23:45
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
12 Mar 2008, 12:47
What did Google say?

Would it be possible to apply this to some various usergroups?

abroad
12 Mar 2008, 17:11
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
12 Mar 2008, 17:34
Although this is a good idea, I wouldn't recommend using until Google approves it or it gets changed.

Jack.

pcoskat
22 Mar 2008, 12:45
Anyone heard from google?

dancue
27 Mar 2008, 17:47
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
28 Mar 2008, 15:25
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
28 Mar 2008, 15:41
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
29 Mar 2008, 03:20
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
29 Mar 2008, 12:48
You don't, remove it if you want.

Regards Jason :)

Liquid1ce
11 Apr 2008, 13:26
its same for postbit legacy?

dancue
12 Apr 2008, 16:33
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
13 Apr 2008, 22:36
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
29 Apr 2008, 03:41
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
29 Apr 2008, 14:27
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
02 May 2008, 01:49
i cant locate the postbit template

Chris-777
02 May 2008, 09:44
fyi, this (done correctly, without the iframe tag) is my best performing unit.

roalaik
02 May 2008, 11:14
I am asking where the postbit template is

unitedpunjab
02 May 2008, 11:53
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
02 May 2008, 14:00
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
02 May 2008, 14:15
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
02 May 2008, 17:04
Hopefully Chris-777 can tell us what he did.

Jase2
02 May 2008, 22:31
Nope, this is using an Iframe - which is against Googles TOS.

dancue
02 May 2008, 22:34
so the float does not matter?

Chris-777
04 May 2008, 15:47
Gah, more coffee before posting. I _AM_ using the float tag, not the iframe tag.

Apologies.

dancue
04 May 2008, 20:11
So is it Iframes, float tags, or both not allowed? Which is it?

unitedpunjab
04 May 2008, 20:33
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
04 May 2008, 20:46
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
04 May 2008, 20:49
http://www.vbulletin.com/forum/showthread.php?t=237530

unitedpunjab
04 May 2008, 21:53
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
04 May 2008, 21:55
http://www.vbulletin.com/forum/showthread.php?t=237530

Thanks but that does n't achieve the similar placement.

unitedpunjab
05 May 2008, 15:52
Check this: http://www.vbulletin.org/forum/showthread.php?t=178166
This plugin does the same thing and its lot easier.

dancue
13 May 2008, 22:04
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
29 Jul 2010, 07:54
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
07 Nov 2015, 16:09
Great,

I have added LEFT side

http://wikinewforum.com/showthread.php?p=998292