The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Make your adsense look like a post! With Referals, forum exclusion and more! Details »» | |||||||||||||||||||||||||||
Make your adsense look like a post! With Referals, forum exclusion and more!
Developer Last Online: Aug 2008
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)))"> $spacer_open <table id="post$post[postid]" class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="0" border="0" width="100%" align="center"> <tr valign="top"> <td class="alt2" width="175"> <div id="postmenu_$post[postid]"> <if condition="$show['profile']"> <a class="bigusername" href="#">Focused.ORG</a> <else /> Focused.ORG </if> <br><br><script type="text/javascript"><!-- google_ad_client = "YOUR ADSENSE ID HERE!"; google_ad_width = 125; google_ad_height = 125; google_ad_format = "125x125_as_rimg"; google_cpa_choice = "CAAQ8OCIlAIaCP1TkEVpn_IYKITHrYMB"; google_ad_channel = ""; //--></script> <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script> </div> </td> <if condition="$show['moderated']"> <td class="alt2" id=""> <else /> <td class="alt1" id=""> </if> <if condition="$show['messageicon'] OR $post['title']"> <div class="smallfont"> <if condition="$post['title']"><strong>Sponsored links</strong></if> </div> <hr size="1" style="color:$stylevar[tborder_bgcolor]" /> </if> <!-- message --> <div id="post_message_$post[postid]"> <if condition="$show['spacer']"> </if> <div align="left"> <script type="text/javascript"><!-- google_ad_client = "YOUR ADSENSE ID GOES HERE!"; google_ad_width = 336; google_ad_height = 280; google_ad_format = "336x280_as"; google_ad_type = "text_image"; google_ad_channel =""; google_color_border = "D0DFE4"; google_color_bg = "E2ECEF"; google_color_link = "85868F"; google_color_text = "85868F"; google_color_url = "85868F"; //--></script> <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script> </div> <if condition="$show['spacer']"> </if> </div> <!-- / message --> </td> </tr> </table><br> <!-- / post $post[postid] popup menu --> <if condition="$show['spacer']"> </div> $spacer_close </if></if> <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])"> Supporters / CoAuthors Show Your Support
|
Comments |
#12
|
||||
|
||||
Thanks, that is pretty neat
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 |
#13
|
||||
|
||||
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 |
#14
|
|||
|
|||
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 |
#15
|
||||
|
||||
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 |
#16
|
||||
|
||||
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?? What is different on my account? |
#17
|
|||
|
|||
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
|
#18
|
|||
|
|||
Quote:
Quote:
Quote:
|
#19
|
||||
|
||||
Unless I am mistaken, this modification would violate Googles TOS.
|
#20
|
|||
|
|||
Quote:
|
#21
|
|||
|
|||
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. |
Thread Tools | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|