PDA

View Full Version : Mini Mods - Adsense Inside the Post


unitedpunjab
28 Feb 2007, 00:26
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']">

bollie
28 Feb 2007, 05:49
Nice ;) instal

3dsoft
02 Mar 2007, 19:01
Hi, this looks cool. Will adsense show up only in 1st post (thread start) or in all posts? Because I would not like it to show up in all posts. Also, I think that googles rules say that no more than 3 ads per page.

unitedpunjab
02 Mar 2007, 19:03
Hi, this looks cool. Will adsense show up only in 1st post (thread start) or in all posts? Because I would not like it to show up in all posts. Also, I think that googles rules say that no more than 3 ads per page.

Only in the First and Last post and only to guests,if you want in a different way then let me know.

2 FN LOW
03 Mar 2007, 03:11
so this actually shows up in the users posts and not in a post of its own?

BigJimTheLug
03 Mar 2007, 03:16
This is a nice modification, but you will run into problems when you or someone at your site uses the "quote" option.

It will screw things up, watch.

unitedpunjab
03 Mar 2007, 03:34
so this actually shows up in the users posts and not in a post of its own?

yes its shown in user posts,

This is a nice modification, but you will run into problems when you or someone at your site uses the "quote" option.

It will screw things up, watch.

Ads are shown only to guest,even if ads are shown to members there will be no problem.Ads will not get 'quoted' along with the post.

BigJimTheLug
03 Mar 2007, 03:50
yes its shown in user posts,



Ads are shown only to guest,even if ads are shown to members there will be no problem.Ads will not get 'quoted' along with the post.

No, an ad won't get quoted. However, if someone wraps "quotes" around the post they make, then the blending efficiency of the mod will vanish. I used this ad implementation at first, but when it came time to wrap quotes around posts, this modification was inefficient.

unitedpunjab
03 Mar 2007, 03:59
I See...

3dsoft
03 Mar 2007, 22:27
Only in the First and Last post and only to guests,if you want in a different way then let me know.
Sounds perfect to me. :)

banuchi2
04 Mar 2007, 04:29
For some reason, the ad is only showing in the first post and not the last. I have 2 questions...

1) How can I get this to show in the last post?
Update: Ahhh....Google states: "Please place only one link unit on any content page. This number does not affect the current limit of 3 regular ad units on any page - you may still place up to 3 regular ad units in addition to a single link unit on any content page"
U
2) If I wanted it to show in every post, what changes are necessary.
Answered my own question...there's a limit of 3
Thanks!

perju
04 Mar 2007, 23:43
It works great, but QUOTES and IMGs generate undesirable results. I had to uninstall because of this. :(

--
Edit: I'm guessing the only way this mod would work would be if it checks to see if the post contains a quote or an img. If neither of those elements are present, then the adsense code would appear.

soletrader
05 Mar 2007, 01:01
Is there a way to limit the ads to show only if there are greater than X words on that post?

kontrabass
08 Mar 2007, 14:59
Great hack and just in time - have been talking to a Google Adsense rep about optimizing my site, the rectangle in the first post is their top suggestion. And for guests only, this is perfect.

Stupid question: How do I modify it so that the ad is only displayed in the first post and not the last?

[installed]

Zia
08 Mar 2007, 15:18
nice to see u here unitedpanjab :)
looks promising modification..
will use it..if the adsense only shown in last post & shown to every one..& without any conflict along with [quote] & [img] tags..seems it will generate more clicks...

clicks install to get future notification/update...

valdet
16 Mar 2007, 14:14
Did anyone check whether this works with Yahoo Publishers Network YPN?

unitedpunjab
16 Mar 2007, 14:39
I don't see why it should not work.

magnaromagna
19 Mar 2007, 23:32
great hack.
how to put it at the top of the message? The ads is on the middle of the first message, I'd like to put it at the top. Adding vAlign=top ?

4x4 Mecca
20 Mar 2007, 05:21
It was a simple install, but it's not working... any ideas? I know that's vauge, but it's just not working?!?

Here is what I have
<!-- / icon and title -->
</if>

<!-- message -->
<if condition="(($post[postcount] % $vboptions[maxposts] == 1)) and ($show['guest'])">
<span style="margin: 2px; float: right; width: 301px; height: 251px;">
<script type="text/javascript"><!--
google_ad_client = "pub-XXXXXXXXXXXX";
google_ad_width = 300;
google_ad_height = 250;
google_ad_format = "300x250_as";
google_ad_type = "text_image";
//2007-03-19: Forum
google_ad_channel = "2290601347";
google_color_border = "F5F7F9";
google_color_bg = "F5F7F9";
google_color_link = "003265";
google_color_text = "000000";
google_color_url = "0066CC";
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</span>
</if>

<div id="post_message_$post[postid]">$post[message]</div>
<!-- / message -->

Zia
21 Mar 2007, 12:32
no news yet ???

Rick
23 Mar 2007, 14:28
Thanks for an excellent mod.

I would like to disable the ad in the last post. What do I need to do??

bryandailey
27 Mar 2007, 22:07
I found this hack and thought it was pretty cool but for my needs, I dont use AdSense so I wanted to be able to put pre-defined, targeted ad tags from AdvertPRO (or AdCycle or PHP AdsNew etc) onto each forum. In other words, if the forum topic is electronics, I only want electronics based ads on those pages, and if the topic of the forum is Cooking, i only want cooking ads to show up. Google Adsense does that automatically by scanning for words on the page but my ad system doesnt

What I did was create a 300x250 ad placement for each form and then i made a large series of if/else commands and it in my postbit (in my case the postbit_legcy). It says "if its this forum, show the corresponding ad". Here is the code for ya'll to check out and use if you want. It's a modified version of unitedpunjab's "Adsense Inside the Post". I always give credit where credi is due!

Here be the code. Of course fill in your own ad code that corrsponds with what ads you want to show up in each forum. It's very important that you have the correct number if </if> tags at the end, one for each "if/else". Mine has 17 of em (I only show 4 here). Anyone think this will cause major problems or load issues?


<!-- message -->

<if condition="(($post[postcount] % $vboptions[maxposts] == 1) and
$forum[forumid] ==1)">
<span style="margin: 2px; float: right; width: 301px; height: 251px;">

<!-- BEGIN ADVERTPRO CODE BLOCK -->
CODE FOR FORUM #1 ADS GO HERE
<!-- END ADVERTPRO CODE BLOCK -->

</span>

<else />
<if condition="(($post[postcount] % $vboptions[maxposts] == 1) and
$forum[forumid] ==2)">
<span style="margin: 2px; float: right; width: 301px; height: 251px;">

<!-- BEGIN ADVERTPRO CODE BLOCK -->
CODE FOR FORUM #2 ADS GO HERE
<!-- END ADVERTPRO CODE BLOCK -->

</span>

<else />
<if condition="(($post[postcount] % $vboptions[maxposts] == 1) and
$forum[forumid] ==3)">
<span style="margin: 2px; float: right; width: 301px; height: 251px;">

<!-- BEGIN ADVERTPRO CODE BLOCK -->
CODE FOR FORUM #3 ADS GO HERE
<!-- END ADVERTPRO CODE BLOCK -->

</span>

<else />
<if condition="(($post[postcount] % $vboptions[maxposts] == 1) and
$forum[forumid] ==4)">
<span style="margin: 2px; float: right; width: 301px; height: 251px;">

<!-- BEGIN ADVERTPRO CODE BLOCK -->
CODE FOR FORUM #4 ADS GO HERE
<!-- END ADVERTPRO CODE BLOCK -->

</span>
</if>
</if>
</if>
</if>

<div id="post_message_$post[postid]">$post[message]</div>


<!-- / message -->

prophecydude
29 Mar 2007, 18:45
Thanks you 2 (guy above me and mod author!

BigJimTheLug
29 Mar 2007, 19:14
Here is a nifty tip to increase your CTR while using this modification.
This ad placement is good to blend in with the post content, but it also, when someone or you make a post, try not to place any links inside the post. For example, instead of using http://www.yoursite.com or www.yoursite.com , just use yoursite.com. This way, the only links available for someone to click on are links to Google Adsense, YPN, or whatever publishing program you use.

Keep in mind that you are not forcing others to click your links, you are simply eliminating other "clickable" links while making your publisher links the only "clickable" links inside the post.


This is a great modification, thanks.

kpascal
06 Apr 2007, 11:43
I would like to show the ads to guests and registered users (sponsors will not see ads). What would I alter in the code to show ads to registered users as well?

[INSTALLED]

unitedpunjab
06 Apr 2007, 11:47
Replace

<if condition="(($post[postcount] % $vboptions[maxposts] == 1)) and ($show['guest'])">with

<if condition="(($post[postcount] % $vboptions[maxposts] == 1))">

kpascal
06 Apr 2007, 11:51
Thanks for the quick reply. Your suggestion would have the ads viewable by all visitors regardless of their usergroup. I would like to specify an additional usergroup (guests & registered).

Can you suggest the code?

unitedpunjab
06 Apr 2007, 11:58
<if condition="(($post[postcount] % $vboptions[maxposts] == 1)) and !is_member_of($bbuserinfo,XX)">
Replace XX with the usergroup id you do not want to show ads.

kpascal
06 Apr 2007, 12:11
<if condition="(($post[postcount] % $vboptions[maxposts] == 1)) and !is_member_of($bbuserinfo,XX)">
Replace XX with the usergroup id you do not want to show ads.


For more than one usergroup I would separate by commas? i.e.<if condition="(($post[postcount] % $vboptions[maxposts] == 1)) and !is_member_of($bbuserinfo,2,7,12)">


And please confirm that this will be the groups that will or will not see the ads. Thanks for your help. :)

unitedpunjab
06 Apr 2007, 12:53
will not see the ads..

replace

!is_member_of($bbuserinfo,2,7,12)with

is_member_of($bbuserinfo,2,7,12)if you want the other way

kpascal
06 Apr 2007, 13:18
I understand your directions and have used the following:<if condition="(($post[postcount] % $vboptions[maxposts] == 1)) and !is_member_of($bbuserinfo,10,11,12,14)">

I have tested with a user subscribed to the 'Custom Usergroup' 12 and they were able to see the ads. I thought it might be because four group IDs were separated by commas so I tried this:<if condition="(($post[postcount] % $vboptions[maxposts] == 1)) and !is_member_of($bbuserinfo,12)">

The user was still able to see the ads. Does the code you have provided only work for 'Default Usergroups'? If so, would it be possible to do this with 'Custom Usergroups'?

kpascal
06 Apr 2007, 13:26
My baad.. I did not provide clear direction to the user that was testing for me and they were looking at an ad in the header and reporting that it was still visible. The last code I posted is working well and I am now testing the multiple usergroup version. I will report once it is tested.

Very sorry for the confusion an inconvenience.

kpascal
06 Apr 2007, 13:30
Your posted code suggestions work perfectly. Thank you for your help and again please accept my apologies for the confusion.

ggiersdorf
07 Apr 2007, 11:58
has a fix for images and quotes been made? I would love to use this but almost all my first posts consist of images being a gaming forum. We heavly use images and quotes

kpascal
07 Apr 2007, 12:21
I changed the placement of this mod when I applied it. (link to example (http://www.talkcf.ca/showthread.php?t=1)) With the ad placed under the post, instead of beside it, I have not experienced an [img] or [quote] problem.

notrious
10 Apr 2007, 02:00
s.s pha jee


i want to use this mod as adsance in all posts

unitedpunjab
10 Apr 2007, 09:24
s.s pha jee


i want to use this mod as adsance in all posts

SSA,
Adsense doesn't allow more than three Ads on a page,So that wont work.

notrious
13 Apr 2007, 21:30
but still on soem sites i have seen this they have adsance in header like 2 sets and adsance in posts also


may be they are more smarter kid then me

NightShado
14 Apr 2007, 00:34
nice :) Thanx man :)

popowich
15 Apr 2007, 01:06
If this is targeted for guests what about adding text under the ad such as "Register today to remove this ad!" with the Register being a link to the forums registration page?

-Raymond

popowich
15 Apr 2007, 01:34
I changed the placement of this mod when I applied it. (link to example (http://www.talkcf.ca/showthread.php?t=1)) With the ad placed under the post, instead of beside it, I have not experienced an [img] or [quote] problem.

Hello,

Where do you insert the code for this mod to look like your version?

-Raymond

kpascal
15 Apr 2007, 10:12
Hello,

Where do you insert the code for this mod to look like your version?

-Raymond


Hi Raymond, instead of using the suggested code below:
<!-- 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 -->


I used his instead:
<!-- message -->
<div id="post_message_$post[postid]">$post[message]</div>

<if condition="(($post[postcount] % $vboptions[maxposts] == 1)) and !is_member_of($bbuserinfo,10,11,12,14)"><br />
<center><span style="margin: 5px; width: 470px; height: 62px;">

ADSENSE CODE HERE

</span></center>
</if>
<!-- / message -->


The !is_member_of($bbuserinfo,10,11,12,14) part of the <if> statement specifies which usergroups do not see the ads.

abakus
15 Apr 2007, 18:40
very nice thanks man

Digital Girl
16 Apr 2007, 09:27
Great Mod but it does not seem to be working for me?

Mrdby
18 Apr 2007, 01:45
anybody?

Smitty
18 Apr 2007, 09:59
Great Mod but it does not seem to be working for me?

It is working for me, but only shows in the first post.

How do I get it to show in the last post on the page as well as the first post?

Edit Add:

In my postbit I've put <!-- Start AdSense Google within post message -->
<if condition="(($post[postcount] % $vboptions[maxposts] == 1) or ($post[islastshown]))">
<span style="margin: 2px; float: right; width: 301px; height: 251px;">
GOOGLE ADSENSE CODE HERE
</span>
</if>
<div id="post_message_$post[postid]">$post[message]</div>
<!-- End AdSense Google within post message --> to work, but if someone uses the 'quick edit' on a post with adsense in it (first or last post in a thread), the ajax of Quick Edit kicks in but the google ad that is there is superimposed over part of the editing box....

smestas
01 Jun 2007, 09:05
Thanks for the great MOD!

I just installed it and it seems to be working for the most part but I did remove the code to show to all users and now I'm getting more then one add per page. Usuall this wouldnt be so bad but I already have 2 other Adsense adds running. Is there a way to keep it only on the first post of every page?

here is and example: http://www.alfabb.com/bb/forums/showthread.php?t=7645


<!-- message -->
<if condition="(($post[postcount] % $vboptions[maxposts] == 1))">
<span style="margin: 2px; float: right; width: 301px; height: 251px;">

<script type="text/javascript"><!--
google_ad_client = "pub-8924331979110227";
google_ad_width = 300;
google_ad_height = 250;
google_ad_format = "300x250_as";
google_ad_type = "text";
//2007-06-01: AlfaBB postbit
google_ad_channel = "3930652802";
google_color_border = "F6F6F6";
google_color_bg = "F6F6F6";
google_color_link = "CC0000";
google_color_text = "333333";
google_color_url = "CC0000";
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>

</span>
</if>
<div id="post_message_$post[postid]">$post[message]</div>
<!-- / message -->

smestas
01 Jun 2007, 09:18
Hmmmmmmmmmm....

I just noticed that the adds overlap image attachements. depending on how much text is in the post before the attachments. See my screenshot below.

Smitty
01 Jun 2007, 12:26
I had to remove the mod. My forum regulars went ballistic. The complaints started rolling in within minutes. Some even complained that when ads showed up in their posts they felt it may appear to some people that they personally 'approved' the advertisement(s). There were also many justification issues (such as overlap noted above) in many posts.

Nice idea, though.

smestas
01 Jun 2007, 22:39
Anyone figure out how to fix this so it doesn't show multiple times on a single page?

I can live with the justification problems for now but I would like to control how many times it shows on a single page. Since its showing more then once my other Adsense adds aren't loading.

smestas
04 Jun 2007, 20:50
Anyone......

Buler...... Buler....... Buler.....

MRGTB
23 Jul 2007, 00:22
when you click edit button on a thread that has the adsence displayed in it, the adsence is shown at the top of the edit box. Anybody know how to stop it from being displayed in the edit box

FoReX
06 Sep 2007, 00:17
It didn't work to my forum. (version 3.6.8)

Can anyone work on 3.6.8?

jscieza
26 Sep 2007, 18:34
Yes, it works fine for me in 3.6.8. Thanks unitedpunjab! ;)

Just a question. I want to show AdSense to all my subforums and exclude one (id=XX). I have tried to do it with the following lines:


<if condition="(($post[postcount] % $vboptions[maxposts] == 1)) and ($show['guest'])">
<if condition="!in_array($forumid, array(XX))">
<span style="margin: 2px; float: left; width: 301px; height: 251px;">
ADSENSE CODE HERE
</span>
</if>
</if>


But don't work, Ads continues being impressed on all subforums. Any ideas?

Thank you!

kontrabass
01 Nov 2007, 16:56
Just a tidbit: After a 1-on-1 phone discussion Google Adsense, I've learned that they are pushing this medium rectangle-in-first-post more than anything - according to them with the forum sites they've worked with so far it results in a huge rev boost, as the medium rectangle brings in the most site-targeted ads... Whether or not your forum regulars will put up with it, that's a different story. But he convinced me to give it a try.

d8tabyte
04 Nov 2007, 19:00
Ive noticed that in the last post display of the ads, the buttons are not staying in the bottom right of the post.

Is there anyway to fix this? They seem to move left and up to the very bottom of the message.

http://digitalet.net/forum/showthread.php?p=117647#post117647 check there for an example

bijju
11 Dec 2007, 21:39
searching for this one

pcoskat
13 Dec 2007, 20:37
Is there a way this mod can be 'forum specific'?

I'd only like to use it in one of my forums.

Thanks! (great mod)

ETA
I just saw the post quoted below. It articulates, beautifully, why I need to restrict this to one forum :)

I had to remove the mod. My forum regulars went ballistic. The complaints started rolling in within minutes. Some even complained that when ads showed up in their posts they felt it may appear to some people that they personally 'approved' the advertisement(s). There were also many justification issues (such as overlap noted above) in many posts.

Nice idea, though.

pcoskat
15 Dec 2007, 14:10
Is there a way this mod can be 'forum specific'?

I'd only like to use it in only one of the forums on my board.


Anyone???:confused:

bosal
16 Dec 2007, 13:25
How to show ad only after first post per page?
not so quite simple. Becouse when i use your script it shows after first post on every page if the page has default post count. Eg. if the page has 20 posts by default it show only after first post. But if user has changed that he want to show 40 post per page, the ad shows after 1 post and after 20 post, if the thread has more than 20 posts. How to fix it ?

edenx
16 Dec 2007, 15:00
I need this 2 conditionals

1) If I want to show it only in First Post to everyone

2) If I want to show it only in First Post only to Guests

Thanks

bosal
16 Dec 2007, 16:05
One more thing i want to show this only when thread has 2 or more posts

valdet
17 Dec 2007, 00:59
Is there a way this mod can be 'forum specific'?

I'd only like to use it in one of my forums.

Thanks! (great mod)

ETA
I just saw the post quoted below. It articulates, beautifully, why I need to restrict this to one forum :)

use this conditional

<if condition="$forumid == X">
<!-- 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 -->
</if>with X being your specific forum id

Regards,
Val.

Teresa
19 Dec 2007, 21:09
The placement also messes up my edit buttons and whatnot. The buttons are appearing in the middle of the post when it's not a LONG post. Suggestions? Fix?

Artes_Marciales
20 Dec 2007, 16:02
Great!!!
Thanks :)

ahmed83
22 Dec 2007, 13:59
It's working for me only in the first post.
how to add it to the last post or after (x)posts

GTGT
22 Dec 2007, 21:42
For soem reason this doesnt work? It simly doesnt show up?

GTGT
22 Dec 2007, 21:43
I have version vBulletin 3.6.8

GTGT
22 Dec 2007, 22:06
Could this have to do somethgn with it?

"Your AdSense unit has been saved. Changes may not appear for up to 10 minutes. [?]"

siliconfinance
25 Dec 2007, 16:18
How can I make the ad display after the text in the post?

Forum Lover
25 Dec 2007, 17:06
cool, planning it for future plan.

iulianh
26 Dec 2007, 11:33
Great hack and easy to install ! Thanks .

Prince
31 Dec 2007, 03:13
I had the same problem, with the way Google does the managed ads now it can actually take up to an hour for a new ad to appear, and in IE it will show "site cannot be found" in your post, Firefox will not display anything, but it does work fine in both browsers.

applyimage
15 Jan 2008, 00:29
Installed but not yet seeing anything in several browers, it may be just the way google ads are done as explained above though.

applyimage
15 Jan 2008, 11:29
----------------------------------------------------------------------------------------------------
Nope, still don't see a thing.

Uninstalled*

Prince
22 Jan 2008, 03:45
Installed but not yet seeing anything in several browsers, it may be just the way google ads are done as explained above though.

were you logged in?

the way the code is it only shows to GUESTS, unless you remove that portion of the statement.

goranbaxy
25 Jan 2008, 11:05
I was not loged in, and I couldn't see it, it doesn't generate html code for that div, but I'm using vbulletin 3.6.8

ChrisSy
27 Jan 2008, 16:10
Having difficulty with this, anyone know the if conditional to show ads in the first post for a specific forum only? - for all usergroups.

abrecher
13 Feb 2008, 19:07
It's working for me only in the first post.
how to add it to the last post or after (x)posts

Same here. Does anybody know how to get this working please ?

abrecher
14 Feb 2008, 00:57
if someone uses the 'quick edit' on a post with adsense in it (first or last post in a thread), the ajax of Quick Edit kicks in but the google ad that is there is superimposed over part of the editing box....

I have the same problem, I'm running 3.6.8

Has anybody figured out a solution ? This is a GREAT mod.

goranbaxy
14 Feb 2008, 06:51
edit postbit_legacy

SVTCobraLTD
14 Feb 2008, 14:29
Sorry to hijack, but how much are some of you making on your boards roughly? How many members?

toprak
16 Feb 2008, 02:15
<if condition="!in_array($bbuserinfo['forumid'], array(2, 6, 7))">
guys do you think this code will work ??

I would like to show ad in some forumid so I exclude 2 6 7 ??
do you guys have any prefer except this

neonneon
23 Feb 2008, 05:54
thank you
:)

SgtRumble
25 Feb 2008, 21:41
Is it possible to incorporate yahoo ads instead of Adsense?

stelthius
02 Mar 2008, 18:25
THank you Reserved :)

nectons
10 Mar 2008, 22:34
i have 3.6.8 and it is now working.. im seeing so many problems.. so i dont install it ... but a good idea though

GTX2
31 Mar 2008, 14:30
how can i put this on the left side of the post, just like this attached picture has, on the first and second post? I've been using on the right side as shown, but without any good results.

see example:

raja811
04 Apr 2008, 21:54
Thx

l2ride55
19 Apr 2008, 08:16
Absolutely a great mod! Love it!

Forum Link (http://www.telepresenceforum.com)

Installed the Template Mod with these changes....

Installed in postbit_legacy, not postbit - Did not work in postbit

Replaced float "right" to "left" - Awesome!

To space the Adsense away from the text in the thread - Added 12px to width (larger than adsense) - ie 300 width for Adsense box - 312px in mod template

Added 10px to height (larger than adsense) - ie 250 width for Adsense box - 260px in mod template

Great Mod! Thanks! :D

basketmen
25 Apr 2008, 22:09
i am sorry, is it the tumbnail break TOS or not??

isnt we need border so not break TOS??

https://www.vbulletin.org/forum/external/2008/04/20.jpg

hnjco
26 Apr 2008, 22:18
installed on 3.6.10 in both postbit and postbit_legacy but not working...
anyone?

saka
28 May 2008, 16:50
installed on 3.6.10 in both postbit and postbit_legacy but not working...
anyone?
same as me. it didnt work.

newguy
31 May 2008, 23:10
What do you have to do to keep your edit, quote, multi quote ect images under the adsence unit? Also I noted that the content moves around based on the post. Like if the member has a signature or if the post has a quoted post in it.

da_judge
04 Jun 2008, 23:31
Works very well if thread is a long one or you have big signiture...

If short post dont look good at all

Any ideas on best way round it

Attached pic

Cheers

da_judge
05 Jun 2008, 20:15
I worked this out

If you want it under post slightly

Search for
<!-- controls -->
in postbit

After add

<if condition="(($post[postcount] % $vboptions[maxposts] == 1))">
<span style="margin: 2px; float: right; width: 201px; height: 201px;">
<script type="text/javascript"><!--
google_ad_client = "pub-3894247933641517";
/* 200x200, created 04/06/08 */
google_ad_slot = "9908865295";
google_ad_width = 200;
google_ad_height = 200;
google_cpa_choice = ""; // on file//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</span>
<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
</if>

This will correct the button thing...

Depending on what skin you may need to add or remove some of the <br>

Attached what it does

Cheers

Mike Vollmer
15 Jun 2008, 00:21
I've been trying to incorporate this into my 3.7.0 vB today, two problems become apparent:

1. A lot of experienced users set their profiles to show the newest posts first. Basing your condition on ($post[postcount] % $vboptions[maxposts] == 1) is selecting the first post ever made in the thread, not the first post viewed. If you're trying to max ad revenue by putting that 300x250 rectangle in the first ad viewed, this has the opposite effect -- it's buried at bottom of the page for user who have chosen to view newest first.

2. 3.7.0 allows threaded & hybrid views, with a preset # of cached posts. Selecting based on ($post[postcount] % $vboptions[maxposts] == 1) seems to work for the posts that are displayed initially, but if that post is later retrieved from the cache & shown again, the ad is missing, although the post is still formatted as if it were there -- with 300x250 pixels of white space on the right side.

I doubt most of my potential users are sophisticated enough to care (or even notice) if the threaded/hybrid views are missing, so I've simply disabled them. However, a workaround for the first problem would be nice. :)

Later (and yes, I did sleep): This code addresses the first problem above:

<if condition="(

(($bbuserinfo[postorder] == '') and
($post[postcount] % ($bbuserinfo[maxposts] == -1 ? $vboptions[maxposts] : $bbuserinfo[maxposts]) == 1))

or

(($bbuserinfo[postorder] != '') and
($GLOBALS[qrfirstpostid] == $post[postid]))

)">


Evaluating $bbuserinfo[postorder] tells me whether the user is displaying newest or oldest first. Total post count seems not to be available, but the first post that is displayed on the screen is flagged by $GLOBALS[qrfirstpostid] == $post[postid].

Another potential problem is the use of $vboptions[maxposts] in the original mod. If user has elected to display more than the default # of posts per page, the condition potentially could be satisfied as many as 3 times & push the page over one of AdSense's max-ads-allowed limits. Using $bbuserinfo[maxposts] is preferable, but because it has a default value of -1, the conditional evaluation above is needed.

balance12
16 Jul 2008, 01:31
I am using Version 3.7.1. I do this and it dont shows me nothing.. i use postbit_legacy... i algo return to the original and re code the mod.... nothingg.. what it might be?

zerokarma
05 Sep 2008, 20:44
Is there a way to restrict this by a certain style rather then usergroup?

Desi-Home
28 Nov 2008, 21:13
It moves up the buttons of reply, quotes etc. Is there a way i keep them down even if the post is not too long?

xlguy
09 Dec 2008, 12:42
Did anyone work out how to edit the code to get the ad to display in the last post as well?

Riccardo83
01 Jan 2009, 21:45
Does this show the ad inside the first post only or the first post on every page? that would be more useful?

Canadianbacon
24 Jul 2011, 20:29
this still work?

Naijasite
01 Oct 2012, 14:01
how do make it to be at the middle of the fist post on 4.2.0 ?

mangmel
14 Dec 2015, 04:08
good source......