The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Advertisements Enhancer + TOS Compatibility Details »» | |||||||||||||||||||||||||
Most advertising companies will ask you not to have their ads on pages without content. This is a problem in vBulletin, because you want to have the ads on as many pages as possible, but you dont want to get banned from the service (i.e. adsense )
The solution is not to try and find places we CAN put the ads, but rather to exclude all the places we would NOT want them. What this hack does is make sure ads do not appear on pages we dont want them to (This includes most hacks which add pages, such as the cyber paypal donation hack, invites hack, etc. Plus, it is quite simple to add any other page you want to the no-no list ) Another thing this hack does is put the ads in a table, to make it look neater. In addition, it gives the members an option to collapse the ads. It will still get you impressions, and it wont be annoying for the user, so its a win-win situation. ------------------------------------------------------------ UPDATE 1.01: There seemed to have been code which was one style specific (satellite skin spacer) so I replaced it with a <br />. If you had a problem with spaces between the ads table and the navbar and/or forum categories, use this updated code. ------------------------------------------------------------ The following script will work with any type of affiliates, including referencers, search boxes, and links/images. NOTE: It works best with Leaderboard size advertisements (Approximately 728x90) Code:
<if condition="!( (THIS_SCRIPT == 'login') OR (THIS_SCRIPT == 'register') OR (THIS_SCRIPT == 'usercp') OR (THIS_SCRIPT == 'private') OR (THIS_SCRIPT == 'subscription') OR (THIS_SCRIPT == 'payments') OR (THIS_SCRIPT == 'invites') OR (THIS_SCRIPT == 'memberlist') OR (THIS_SCRIPT == 'online') OR (THIS_SCRIPT == 'member') OR (THIS_SCRIPT == 'spiders') OR (THIS_SCRIPT == 'psistats') OR (THIS_SCRIPT == 'profile') OR (THIS_SCRIPT == 'faq') OR (THIS_SCRIPT == 'sendmessage') OR (THIS_SCRIPT == 'CybPayPal') OR (THIS_SCRIPT == 'calendar') OR ((THIS_SCRIPT == 'calendar') AND $_REQUEST['do'] == 'add') OR ((THIS_SCRIPT == 'misc') AND $_REQUEST['moderator_stats'] == '') OR ((THIS_SCRIPT == 'search') AND $_REQUEST['searchid'] == '') OR ((THIS_SCRIPT == 'gallery_search') AND $_REQUEST['searchid'] == '') OR (THIS_SCRIPT == 'gallery_upload') OR (THIS_SCRIPT == 'THIS_SCRIPT') )"> <br /> <table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center"> <tr><td align="left" width="728" class="thead" colspan="2"> <a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('ad_head')"><img id="collapseimg_ad_head" src="$stylevar[imgdir_button]/collapse_tcat$vbcollapse[collapseimg_ad_head].gif" alt="" border="0" /></a> Sponsored Links</td></tr> <tbody id="collapseobj_ad_head" style="$vbcollapse[collapseobj_ad_head]"> <tr><td class="alt1" colspan="2" ><span class="smallfont"><center> <!-- CODE HERE --> </center></span></td></tr> </tbody> </table> <br /> <else /> </if> This default version of the code will display the ads on every page except the following: Login Pages Registry Pages User CP Pages Private Messages List Pages Subscription Payment Pages Invitations Hack Pages Members List Page Online Members Page Member Pages Spider Watcher Hack Pages psiStats Hack Pages User Profile Page FAQ Page Send PM Page Cyber PayPal Donation Hack Page Calendar Page Adding Calendar Events Moderator Statistics Hack Page Search Form Page Gallery Searching Page Gallery Uploading Page Error Pages ------------------------------------------------------ NOTE: If you find that the spacing between the table is too big or too little, add/remove the colored <br /> s If you add a modification that ads another page, add the following in the space below (THIS_SCRIPT == 'CybPayPal') OR Code:
(THIS_SCRIPT == '<PHP FILE NAME HERE>') OR Code:
(THIS_SCRIPT == 'arcade') OR Code:
http://www.siteurl.com/forum/search.php?do=getnew Code:
((THIS_SCRIPT == 'search') AND $_REQUEST['getnew'] == '') OR Support is available if needed. You can contact me via MSN at rsx@nerdshack.com, or by email (same address) Please give feedback! Thanks & Enjoy! P.S. THIS MODIFICATION IS COMPATIBLE WITH EVERY VERSION OF VBULLETIN P.S 2: This is my first mod release so if I did anything wrong don't hurt me. Just tell me what the problem is and I will fix it ASAP :bunny: Supporters / CoAuthors Show Your Support
|
Comments |
#32
|
|||
|
|||
Amazing mode...just what I wanted!
|
#33
|
|||
|
|||
The bottom banner I am unable to collapse. I used the same code as the top. I put the code at the very top.
http://www.prisonbreakscene.com Code:
<if condition="!( (THIS_SCRIPT == 'login') OR (THIS_SCRIPT == 'register') OR (THIS_SCRIPT == 'usercp') OR (THIS_SCRIPT == 'private') OR (THIS_SCRIPT == 'subscription') OR (THIS_SCRIPT == 'payments') OR (THIS_SCRIPT == 'invites') OR (THIS_SCRIPT == 'memberlist') OR (THIS_SCRIPT == 'online') OR (THIS_SCRIPT == 'member') OR (THIS_SCRIPT == 'spiders') OR (THIS_SCRIPT == 'psistats') OR (THIS_SCRIPT == 'profile') OR (THIS_SCRIPT == 'faq') OR (THIS_SCRIPT == 'sendmessage') OR (THIS_SCRIPT == 'CybPayPal') OR (THIS_SCRIPT == 'calendar') OR ((THIS_SCRIPT == 'calendar') AND $_REQUEST['do'] == 'add') OR ((THIS_SCRIPT == 'misc') AND $_REQUEST['moderator_stats'] == '') OR ((THIS_SCRIPT == 'search') AND $_REQUEST['searchid'] == '') OR ((THIS_SCRIPT == 'gallery_search') AND $_REQUEST['searchid'] == '') OR (THIS_SCRIPT == 'gallery_upload') OR (THIS_SCRIPT == 'THIS_SCRIPT') )"> <br /> <table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center"> <tr><td align="left" width="728" class="thead" colspan="2"> <a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('ad_head')"><img id="collapseimg_ad_head" src="$stylevar[imgdir_button]/collapse_tcat$vbcollapse[collapseimg_ad_head].gif" alt="" border="0" /></a> Sponsored Links</td></tr> <tbody id="collapseobj_ad_head" style="$vbcollapse[collapseobj_ad_head]"> <tr><td class="alt1" colspan="2" ><span class="smallfont"><center> <script type="text/javascript"><!-- google_ad_client = "pub-9433563858228418"; google_ad_width = 728; google_ad_height = 90; google_ad_format = "728x90_as"; google_ad_type = "text_image"; google_ad_channel =""; google_color_border = "AC5B22"; google_color_bg = "F6DFCE"; google_color_link = "AC5B22"; google_color_text = "AC5B22"; google_color_url = "AC5B22"; //--></script> <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script> </center></span></td></tr> </tbody> </table> <br /> <else /> </if> <br /> <div class="smallfont" align="center">$vbphrase[all_times_are_gmt_x_time_now_is_y]</div> <br /> $spacer_close <!-- /content area table --> <form action="$vboptions[forumhome].php" method="get"> <table cellpadding="$stylevar[cellpadding]" cellspacing="0" border="0" width="$stylevar[outertablewidth]" class="page" align="center"> <tr> <if condition="$show['quickchooser']"> <td> <select name="styleid" onchange="switch_id(this, 'style')"> <optgroup label="$vbphrase[quick_style_chooser]"> $quickchooserbits </optgroup> </select> </td> </if> <if condition="$show['languagechooser']"> <td> <select name="langid" onchange="switch_id(this, 'lang')"> <optgroup label="$vbphrase[quick_language_chooser]"> $languagechooserbits </optgroup> </select> </td> </if> <td align="$stylevar[right]" width="100%"> <div class="smallfont"> <strong> <if condition="$show['contactus']"><a href="$vboptions[contactuslink]" rel="nofollow">$vbphrase[contact_us]</a> -</if> <a href="$vboptions[homeurl]">$vboptions[hometitle]</a> - <if condition="$show['admincplink']"><a href="$admincpdir/index.php$session[sessionurl_q]">$vbphrase[admin]</a> -</if> <if condition="$show['modcplink']"><a href="$modcpdir/index.php$session[sessionurl_q]">$vbphrase[mod]</a> -</if> <if condition="$vboptions['archiveenabled']"><a href="archive/index.php">$vbphrase[archive]</a> -</if> <if condition="$vboptions[privacyurl]"><a href="$vboptions[privacyurl]">$vbphrase[privacy_statement]</a> -</if> <a href="#top" onclick="self.scrollTo(0, 0); return false;">$vbphrase[top]</a> </strong> </div> </td> </tr> </table> </form> </td><td width="84" background="$stylevar[imgdir_misc]/br.gif"> <img src="$stylevar[imgdir_misc]/br.gif" width="84" height="2" align="right"></td> </table> <div align="justify"> <table cellSpacing="0" cellPadding="0" align="center"> <tr> <td><img src="$stylevar[imgdir_misc]/footer1.gif"></td> </tr> </table> </div> <div align="justify"> <table height="60" cellSpacing="0" cellPadding="0" width="1000" background="$stylevar[imgdir_misc]/footer2.gif" align="center"> <tr> <td align="middle" background="$stylevar[imgdir_misc]/footer2.gif"> <div class="smallfont" align="center"> <a style="text-decoration: none; color: #AC5B22" href="http://www.starpages.net/cgi-bin/star.pl?VID=1152650057"> Vote For Our Site <br /> <!-- Do not remove this copyright notice --> $vbphrase[powered_by_vbulletin] <!-- Do not remove this copyright notice --> </div> <div class="smallfont" align="center"> <!-- Do not remove $cronimage or your scheduled tasks will cease to function --> $cronimage <!-- Do not remove $cronimage or your scheduled tasks will cease to function --> $vboptions[copyrighttext]</div></td> </tr> </table> <table class="smalltxt" height="56" cellSpacing="0" cellPadding="0" width="1000" background="$stylevar[imgdir_misc]/footer3.gif" align="center"> <tr> <td vAlign="top" align="right" width="435"></td> <td vAlign="top" align="left" width="364"></td> </tr> </table> </div> </center> <if condition="$show['dst_correction']"> <!-- auto DST correction code --> <form action="profile.php" method="post" name="dstform"> <input type="hidden" name="s" value="$session[sessionhash]" /> <input type="hidden" name="do" value="dst" /> </form> <script type="text/javascript"> <!-- var tzOffset = $bbuserinfo[timezoneoffset] + $bbuserinfo[dstonoff]; var utcOffset = new Date().getTimezoneOffset() / 60; if (Math.abs(tzOffset + utcOffset) == 1) { // Dst offset is 1 so its changed document.forms.dstform.submit(); } //--> </script> <!-- / auto DST correction code --> </if> <script type="text/javascript"> <!-- // Main vBulletin Javascript Initialization vBulletin_init(); //--> </script> |
#34
|
|||
|
|||
It works fine with one at the header but once you at the second one in the footer or the forumdisplay it wont work at all!
|
#35
|
|||
|
|||
Anyone have this issue also?
|
#36
|
|||
|
|||
Bump!
|
#37
|
|||
|
|||
Any ideas guys!
|
#38
|
|||
|
|||
Is it safe to have this (displaying google ads) on vbadvanced and forum index?
|
#39
|
|||
|
|||
I dont see why not, there is content on both those pages!
|
#40
|
|||
|
|||
Thanks. For some reason I thought they weren't allowed on pages with registration. I understand now though!
|
#41
|
|||
|
|||
Hello,
Very nice addition, thank you. Hey, does anyone know where I could find a script (or does anyone know a script 'php, html' java') that would rotate linked banners? The script would go in the spot of: <!-- CODE HERE --> in this new addition. Thank You, Nuguru |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|