Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.5 > vBulletin 3.5 Template Modifications
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Advertisements Enhancer + TOS Compatibility Details »»
Advertisements Enhancer + TOS Compatibility
Version: 1.01, by RsX RsX is offline
Developer Last Online: Jul 2011 Show Printable Version Email this Page

Version: 3.5.5 Rating:
Released: 03-17-2006 Last Update: 03-17-2006 Installs: 38
Template Edits
 
No support by the author.

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
So if the php file name is arcade.php, it would look like this:

Code:
(THIS_SCRIPT == 'arcade') OR
If the hack is an addition to an already existing php file, find the command/script within. For example, if I didn't want ads to show in the new posts list, I couldn't do that using just the file name, because the file name is search, which would in turn remove the ads from every single page that has to do with search. What you need to do is copy the link of the new posts page, and copy the command, which looks like this:

Code:
http://www.siteurl.com/forum/search.php?do=getnew
So what you need to add in the template would look like this:

Code:
((THIS_SCRIPT == 'search') AND $_REQUEST['getnew'] == '') OR
I recommend using these in the header and/or footer templates. Add this at the lowest place possible in the header, and the highest place possible if in the footer (Right below the copyright notices)


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

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #22  
Old 04-24-2006, 04:30 PM
GeorgeNewbie GeorgeNewbie is offline
 
Join Date: Jun 2005
Location: NY
Posts: 4
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

is there a way to put more than one sponsor in and have them side by side...i tried but they sit ontop of one another?
Reply With Quote
  #23  
Old 04-25-2006, 11:43 AM
nelto nelto is offline
 
Join Date: Sep 2004
Posts: 42
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Im kinda of a newb around and I was looking to hsi.

I didnt found any type of instroctions on how to set this up.
Can any one hlep me out here?
Reply With Quote
  #24  
Old 04-27-2006, 03:07 AM
RsX's Avatar
RsX RsX is offline
 
Join Date: Sep 2004
Location: Toronto
Posts: 101
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Place it in your Header template
Reply With Quote
  #25  
Old 04-27-2006, 03:11 AM
RsX's Avatar
RsX RsX is offline
 
Join Date: Sep 2004
Location: Toronto
Posts: 101
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by GeorgeNewbie
is there a way to put more than one sponsor in and have them side by side...i tried but they sit ontop of one another?
Modify this part of the code:


Code:
<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 />

to look like this:


Code:
<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 OF BANNER 1 HERE -->

</center></span></td></tr>
</tbody>
</table> 



<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_head2')"><img id="collapseimg_ad_head2" src="$stylevar[imgdir_button]/collapse_tcat$vbcollapse[collapseimg_ad_head2].gif" alt="" border="0" /></a>
Sponsored Links</td></tr>
<tbody id="collapseobj_ad_head2" style="$vbcollapse[collapseobj_ad_head2]">
<tr><td class="alt1" colspan="2" ><span class="smallfont"><center>

 <!-- CODE OF BANNER 2 HERE -->

</center></span></td></tr>
</tbody>
</table> 

<br />
Reply With Quote
  #26  
Old 06-25-2006, 01:07 PM
wobbly wobbly is offline
 
Join Date: Sep 2005
Posts: 110
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Installed thx,

Is there anyway to make the ads just viewable to certain usergroups at all?
Reply With Quote
  #27  
Old 06-25-2006, 02:54 PM
Tulsa Tulsa is offline
 
Join Date: Jul 2005
Location: Broken Arrow, Oklahoma
Posts: 475
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Replace the usergroup #'s that you want to be able to see the ad with the 1 2 3 4 etc..

<if condition="is_member_of($bbuserinfo, array(1, 2, 3, 4))">

Insert the code your controlling

</if>
Reply With Quote
  #28  
Old 06-29-2006, 01:35 PM
Dannyboy1 Dannyboy1 is offline
 
Join Date: Aug 2005
Posts: 45
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Here is my question, can I remove Adsense ads only from specific folders with this script? I need to do that
Reply With Quote
  #29  
Old 07-01-2006, 08:47 PM
Get Shorty's Avatar
Get Shorty Get Shorty is offline
 
Join Date: Jun 2006
Location: Baton Rouge, LA
Posts: 65
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Simple to change... Great idea!

Clicked install...
Reply With Quote
  #30  
Old 07-02-2006, 12:12 AM
Get Shorty's Avatar
Get Shorty Get Shorty is offline
 
Join Date: Jun 2006
Location: Baton Rouge, LA
Posts: 65
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

:\

I'm using this for my Adsense banners. Anytime someone clicks on a banner, the following error shows up:

This page contains the following errors:

error on line 1 at column 1: Extra content at the end of the document
Below is a rendering of the page up to the first error.




Any thoughts? I just pasted my adsense code in the specified area.


edit
Nevermind. It just doesn't seem to work in Safari. It works perfectly in IE and Firefox.
Reply With Quote
  #31  
Old 07-05-2006, 10:29 PM
Cosimo Cosimo is offline
 
Join Date: Oct 2005
Location: Munich, Germany
Posts: 2
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Great work

Installed it currently on my vb3.6.0b4
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 01:24 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04691 seconds
  • Memory Usage 2,323KB
  • Queries Executed 26 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (7)bbcode_code
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete