Version: 1.4, by Xenatino
Developer Last Online: Dec 2006
Version: 3.0.7
Rating:
Released: 04-09-2005
Last Update: 04-19-2005
Installs: 52
DB Changes
No support by the author.
Upgrade now available
DHC Banner Ads Hack
This script allows you to manage the banner advertisments on your vBulletin board from within the Admin Control Panel. Currently not integrated with PayPal, NoChex so payment will have to remain seperate, although this is set for later releases.
Features
? Display Banner Ads on every page
? Limit display of ads to so many clicks or views
? Turn off display of ads for certain usergroups
? Count clicks and views through Admin CP
? Keep banner ads in database but dont include them in rotation (ie: If maximum views has been reached)
? Auto deactivate when maximum clicks/views are reached
? Displays stats of ads in specified users control panel
? End date and time for banners (Limit or Unlimited)
? Multiple banners per page, using a locations script
Please don't forget to hit the Install button if you use this hack - It helps me judge how popular this hack is and how far to carry on supporting it
*UPDATE* [17th Apr 05] v1.4 Released! Download new ZIP file and either do fresh install or upgrade from previous version!
v1.2.1 - All queries now include TABLE_PREFIX for boards that use this function
Steps have also been taken to prevent SQL Injection
Show Your Support
This modification may not be copied, reproduced or published elsewhere without author's permission.
Saw somebody posting this same question a page ago, but I'm also having this problem, and the answer there was to just create the table, nonsense ofcourse. Anyway, the problem:
Invalid SQL: SELECT displayads FROM usergroup WHERE usergroupid='2'
mysql error: Table 'jnfn.usergroup' doesn't exist
mysql error number: 1146
So there is still a prefix missing in the code. So in functions_bannerads.php change line 34 to:
PHP Code:
$GetUsergroup = $DB_site->query_first("SELECT displayads FROM ".TABLE_PREFIX."usergroup WHERE usergroupid='$bbuserinfo[usergroupid]'");
Solved the errors for me.
Edit:
Noticed another one missing in the code which has to be added to profile.php
Find the following in profile.php
PHP Code:
$getBanners = $DB_site->query("SELECT * FROM dhc_ads WHERE userid='$bbuserinfo[userid]'");
And replace this with:
PHP Code:
$getBanners = $DB_site->query("SELECT * FROM ".TABLE_PREFIX."dhc_ads WHERE userid='$bbuserinfo[userid]'");
Warning: Cannot modify header information - headers already sent by (output started at /xxx/xxx/xxx/xxxx/xxxx/xxxx/forum/includes/adminfunctions.php:223) in /admincp/dhcbannerads.php on line 313
So is there ever going to be a fix for this error? Has anyone looked into it?
I love this hack, only problems im having is I want to be able to sell advertisement space for a certain period of time and time isnt included in this. Also I want to be able to display a random banner ad in one spot on refresh. Anyone done this yet?