![]() |
Make your adsense look like a post! With Referals, forum exclusion and more!
Hey,
This will let you show your add after x posts, put a referal box as a false avatar, and show a 336x280 banner. Please note this has been made for my skin (legacy). You will have to alter this i think. Add this at the end of your postbit template: Code:
<!-- START ADSENSE REVENUE --> <if condition="THIS_SCRIPT == 'showthread'AND ($post[postid] == $GLOBALS['qrlastpostid']) AND (!in_array($forum[forumid], array(2,3,32)))"> In the array() you put the forums where you don't want to show the ads. Here (($post[postid] == $GLOBALS['qrlastpostid'])) you choose where to show it. Use $GLOBALS['qrlastpostid'] to show it at the end of all the posts, $GLOBALS['qrfirstpostid'] to show it after the first post, or you can use a number. For the picture blocks use <img src="random.php"> to where ever random.php is. Please remember to update the settings for random.php. I reccomend you use a table to put your ads in. If you want to show the ads only where there is more than 1 post use: Code:
AND ($post['postcount'] > 1) Code:
<if condition="THIS_SCRIPT == 'showthread'AND ($post[postid] == $GLOBALS['qrlastpostid']) AND (!in_array($forum[forumid], array(2,3,32))) AND ($post['postcount'] > 1)"> Code:
AND (!$show[member]) Code:
<if condition="THIS_SCRIPT == 'showthread'AND ($post[postid] == $GLOBALS['qrlastpostid']) AND (!in_array($forum[forumid], array(2,3,32))) AND ($post['postcount'] > 1) AND (!$show[member])"> |
Please make sure you change your adsense ID where it tells you to!
Please note: I reccomend you put it at the end. In some cases, the quick reply after the adsense code may not work. |
installed..working great
|
Hey,
Thanks for the install. If you want, i can give you those random picture blocks. They increase your page CTR by 30-40% i've been told. |
yes please,that would be great
|
Hey,
I've added them. I've only added the .gifs as those were transparent. You can add more. And remember to edit the random.php. |
where is random.php
|
got it,but what to add in the above code ?
|
just use somthing like
<table align="left"><tr><td align="left"><img src="path/to/random.php"></td><td align="left">ADSENSECODE HERE</td></tr></table> |
Thank you, works great! :)
|
Thanks, that is pretty neat :cool:
One question, I use: Code:
<if condition="THIS_SCRIPT == 'showthread'AND ($post[postid] == $GLOBALS['qrlastpostid'])"> If viewed as a guest, the adcode shows up on every page at the end. Any hints why it is this way and how to change it for loggend in users, too? Thanks, -Tom |
Second: Is there any way to show that adcode only if there is more than one post in a thread?
/update: Got it, just changed the conditional to Code:
<if condition="THIS_SCRIPT == 'showthread' AND ($post[postid] == $GLOBALS['qrlastpostid']) AND ($post['postcount'] > 1)"> So just the one question is still open, see a.m.: https://vborg.vbsupport.ru/showpost....4&postcount=11 Thanks, -Tom |
Quote:
I signed up to your forum, and it shows at the end of every page. Not just at the end of threads. As guest it worked the same as well :) |
ritenow u have this in array array(2,3,32) so it means in forums 2,3,32 ads will not show rite ?
after saving got this Parse error: syntax error, unexpected T_VARIABLE in /home/.******/****/friendskorner.com/forum/includes/adminfunctions_template.php(3537) : eval()'d code on line 249 |
Quote:
This is very confusing. The adcode shows up when using a test user account (normal member). But using my account it only shows up at the very end of a thread?? :confused: What is different on my account? |
how do you show this to only certain usergroups as well ? i want to only show for guests and for regular registered members, but not for a certain usergroup
|
Quote:
Quote:
Quote:
|
Unless I am mistaken, this modification would violate Googles TOS.
|
Quote:
|
I do not see how this modification could possibly violate the policies set by Google's TOS. This mod does not go over the amount of ad units which are allowed as per their guidelines.
The only constraint is that the site must have content, which evidently it will as it is a forum. Please explain why you think it would violate the policies. |
if i stick a number like
<if condition="THIS_SCRIPT == 'showthread'AND ($post[postid] == 5) AND (!in_array($forum[forumid], array(2,3,32)))"> will it show the ads after every 5 posts?? if not, how do i make it do that? repetetive |
i have lots of forum areas, is there a way to do this so i can only show it to one forum area without listing all the other forum ids in the array?
|
Quote:
Code:
<if condition="THIS_SCRIPT == 'showthread'AND ($post[postid] == 5) AND (in_array($forum[forumid] == forumid))"> Quote:
Remember google only allow 3 ads, so you might as well do it manually. |
PHP Code:
, which should not be used for adsense , i might add because of TOS i believe |
Quote:
|
Quote:
Google Ad Placement
|
Is there anyway to have this code show like ever 3rd post or something like that. Awesome code, this has been the only adsense code ive gotten to work.
Nick |
@Dumi: add this to the line beginning with <if condition="THIS_SCRIPT == 'showthread' :
AND ($post[postcount] % 3 == 0) @question?: I think I got it, all users who don't see the adcode have to delete their cookies once, after that the adcode shows up. /edit: I guess I'm going for this option here: http://www.vbulletin.com/forum/showp...82&postcount=3 |
Quote:
|
How can I get it to show ads after the first post on every page of my thread, not just the first page like at present?
|
It should already do that.
|
how can we have it show as the 2nd post on all pages?
|
question? you can help me please ?
it's not working for me if you can geav me the code to do a copy i work with postbit after 4 post in all the forums |
Does this code work on 3.6? Before I go charging into things......
|
Great mod, quick to install and works flawlessly.
|
Quote:
|
Hi awesome hack. it is showing up after the last post on every page. is there a way i can make it after the first post?
|
Quote:
Quote:
|
Quote:
|
anywho will this work with YPN?
|
All times are GMT. The time now is 05:20 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|