View Full Version : Mini Mods - Adsense Inside the Post
unitedpunjab
02-27-2007, 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']">
bollie
02-28-2007, 04:49 AM
Nice ;) instal
3dsoft
03-02-2007, 06:01 PM
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
03-02-2007, 06:03 PM
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-03-2007, 02:11 AM
so this actually shows up in the users posts and not in a post of its own?
BigJimTheLug
03-03-2007, 02:16 AM
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-03-2007, 02:34 AM
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-03-2007, 02:50 AM
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-03-2007, 02:59 AM
I See...
3dsoft
03-03-2007, 09:27 PM
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
03-04-2007, 03:29 AM
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
03-04-2007, 10:43 PM
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
03-05-2007, 12:01 AM
Is there a way to limit the ads to show only if there are greater than X words on that post?
kontrabass
03-08-2007, 01:59 PM
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]
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
03-16-2007, 01:14 PM
Did anyone check whether this works with Yahoo Publishers Network YPN?
unitedpunjab
03-16-2007, 01:39 PM
I don't see why it should not work.
magnaromagna
03-19-2007, 10:32 PM
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
03-20-2007, 04:21 AM
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 -->
Thanks for an excellent mod.
I would like to disable the ad in the last post. What do I need to do??
bryandailey
03-27-2007, 09:07 PM
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
03-29-2007, 05:45 PM
Thanks you 2 (guy above me and mod author!
BigJimTheLug
03-29-2007, 06:14 PM
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
04-06-2007, 10:43 AM
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
04-06-2007, 10:47 AM
Replace
<if condition="(($post[postcount] % $vboptions[maxposts] == 1)) and ($show['guest'])">with
<if condition="(($post[postcount] % $vboptions[maxposts] == 1))">
kpascal
04-06-2007, 10:51 AM
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
04-06-2007, 10:58 AM
<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
04-06-2007, 11:11 AM
<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
04-06-2007, 11:53 AM
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
04-06-2007, 12:18 PM
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
04-06-2007, 12:26 PM
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
04-06-2007, 12:30 PM
Your posted code suggestions work perfectly. Thank you for your help and again please accept my apologies for the confusion.
ggiersdorf
04-07-2007, 10:58 AM
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
04-07-2007, 11:21 AM
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
04-10-2007, 01:00 AM
s.s pha jee
i want to use this mod as adsance in all posts
unitedpunjab
04-10-2007, 08:24 AM
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
04-13-2007, 08:30 PM
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
04-13-2007, 11:34 PM
nice :) Thanx man :)
popowich
04-15-2007, 12:06 AM
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
04-15-2007, 12:34 AM
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
04-15-2007, 09:12 AM
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
04-15-2007, 05:40 PM
very nice thanks man
Digital Girl
04-16-2007, 08:27 AM
Great Mod but it does not seem to be working for me?
Mrdby
04-18-2007, 12:45 AM
anybody?
Smitty
04-18-2007, 08:59 AM
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
06-01-2007, 08:05 AM
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
06-01-2007, 08:18 AM
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
06-01-2007, 11:26 AM
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
06-01-2007, 09:39 PM
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
06-04-2007, 07:50 PM
Anyone......
Buler...... Buler....... Buler.....
MRGTB
07-22-2007, 11:22 PM
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
09-05-2007, 11:17 PM
It didn't work to my forum. (version 3.6.8)
Can anyone work on 3.6.8?
jscieza
09-26-2007, 05:34 PM
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
11-01-2007, 03:56 PM
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
11-04-2007, 06:00 PM
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
12-11-2007, 08:39 PM
searching for this one
pcoskat
12-13-2007, 07:37 PM
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
12-15-2007, 01:10 PM
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
12-16-2007, 12:25 PM
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
12-16-2007, 02:00 PM
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
12-16-2007, 03:05 PM
One more thing i want to show this only when thread has 2 or more posts
valdet
12-16-2007, 11:59 PM
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
12-19-2007, 08:09 PM
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
12-20-2007, 03:02 PM
Great!!!
Thanks :)
ahmed83
12-22-2007, 12:59 PM
It's working for me only in the first post.
how to add it to the last post or after (x)posts
For soem reason this doesnt work? It simly doesnt show up?
I have version vBulletin 3.6.8
Could this have to do somethgn with it?
"Your AdSense unit has been saved. Changes may not appear for up to 10 minutes. [?]"
siliconfinance
12-25-2007, 03:18 PM
How can I make the ad display after the text in the post?
Forum Lover
12-25-2007, 04:06 PM
cool, planning it for future plan.
iulianh
12-26-2007, 10:33 AM
Great hack and easy to install ! Thanks .
Prince
12-31-2007, 02:13 AM
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
01-14-2008, 11:29 PM
Installed but not yet seeing anything in several browers, it may be just the way google ads are done as explained above though.
applyimage
01-15-2008, 10:29 AM
----------------------------------------------------------------------------------------------------
Nope, still don't see a thing.
Uninstalled*
Prince
01-22-2008, 02:45 AM
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
01-25-2008, 10:05 AM
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
01-27-2008, 03:10 PM
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
02-13-2008, 06:07 PM
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
02-13-2008, 11:57 PM
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
02-14-2008, 05:51 AM
edit postbit_legacy
SVTCobraLTD
02-14-2008, 01:29 PM
Sorry to hijack, but how much are some of you making on your boards roughly? How many members?
toprak
02-16-2008, 01:15 AM
<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
02-23-2008, 04:54 AM
thank you
:)
SgtRumble
02-25-2008, 08:41 PM
Is it possible to incorporate yahoo ads instead of Adsense?
stelthius
03-02-2008, 05:25 PM
THank you Reserved :)
nectons
03-10-2008, 09:34 PM
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
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-04-2008, 08:54 PM
Thx
l2ride55
04-19-2008, 07:16 AM
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
04-25-2008, 09:09 PM
i am sorry, is it the tumbnail break TOS or not??
isnt we need border so not break TOS??
https://vborg.vbsupport.ru/external/2008/04/20.jpg
hnjco
04-26-2008, 09:18 PM
installed on 3.6.10 in both postbit and postbit_legacy but not working...
anyone?
installed on 3.6.10 in both postbit and postbit_legacy but not working...
anyone?
same as me. it didnt work.
newguy
05-31-2008, 10:10 PM
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
06-04-2008, 10:31 PM
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
06-05-2008, 07:15 PM
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
06-14-2008, 11:21 PM
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
07-16-2008, 12:31 AM
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
09-05-2008, 07:44 PM
Is there a way to restrict this by a certain style rather then usergroup?
Desi-Home
11-28-2008, 08:13 PM
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
12-09-2008, 11:42 AM
Did anyone work out how to edit the code to get the ad to display in the last post as well?
Riccardo83
01-01-2009, 08:45 PM
Does this show the ad inside the first post only or the first post on every page? that would be more useful?
Canadianbacon
07-24-2011, 07:29 PM
this still work?
Naijasite
10-01-2012, 01:01 PM
how do make it to be at the middle of the fist post on 4.2.0 ?
mangmel
12-14-2015, 03:08 AM
good source......
vBulletin® v3.8.12 by vBS, Copyright ©2000-2024, vBulletin Solutions Inc.