Simple Ad manager for Vbulletin

Namecheap AuctionsNamecheap Auctions
SpaceshipSpaceship
Spacemail by SpaceshipSpacemail by Spaceship
Watch

JFS

VIP Member
Impact
141
greetings,

this have some limitations but it does do the work - it is the one i'm using at the moment - although it may not be the best way to do it.
it was done is like 10 mins so don't expect much stuff

the adsense_728x90.php and adsense_468x60.php contains the code for adsense for my case, just create a new file copy and paste your code and save it.

demo: www.sotaopt.com

For VBulletin

in the globals.php add this
Code:
srand( microtime() * 1000000);
//if you have 5 ads you shoud change this into  $var = rand(1,5);  and add the case's
// makes a random number from 1 to 2
$var = rand(1,2); 
switch($var)
{
     case 1: $ad="ad/adsense_728x90.php";
             $title_ad= "Google Adsense";
             break;
     case 2: $ad="ad/adsense_468x60.php";
             $title_ad= "Google Adsense";
             break;

}
ob_start();
include($ad);
$show_ads = ob_get_contents();
ob_end_clean();

in your template you can call $show_ads to show the ad
i loved the way NP put the ad on the forum tops so i'm using a similiar one hehehe

on the template
Code:
<div align="center" style="border: 2px dotted #CCCCCC; background-color:#EFF1FA;">
<table border="0" cellpadding="2" cellspacing="3" bgcolor="#EFF1FA">
<tr>
 <td align="left">
 <strong>$title_ad</strong></td>
 <td>
 <div align="right">
 <font color="#999999">Forum Sponsor</font>
 </div>
 </td>
 </tr>
  <tr>
   <td colspan="2" align="center">
$show_ads
   </td>
   </tr> 
</table> 
</div>


i don't know if this will be usefull for someone but here it is...
 
Last edited:
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
do you have a live demo of it somewhere? would be helpful!
 
0
•••
sure, i added it on the topic
 
0
•••
CatchedCatched

We're social

Escrow.com
Spaceship
Domain Recover
CryptoExchange.com
Catchy
DomDB
NameFit
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back