![]() |
DHC Banner Ads - Upgrade [1.4]
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 |
Quote:
|
Thanks for sharing your work. A few remarks though after a quick view of the code:
- You are not using TABLE_PREFIX in all your queries, so this hack will not work for boards using a table prefix. - There are some places in the coding vulnerable to SQL injections. Please validate all values before using them in a query. |
Does this hack check secondary user groups?
|
Quote:
Quote:
Quote:
|
this looks very promising!!
|
Very cool! How about instead of expiring after so many views or clicks, how about also just after so much time? I am interested but it would be really cool to be able to set how long the ad should be active too. Maybe have it show how much time it has left in the AdminCP?
~006 |
Future releases will include the ability to limit by time as well.
This was originally coded into the script on my own site, but due to sloppy coding I decided to elave it out until future releases. |
UPDATED!
alright well i fixed it for the controls to be put in the admincp find: (in admincp/index.php) Code:
$printhr = false; Code:
construct_nav_option($vbphrase['banner_view'], 'dhcbannerads.php?do=view', '<br />'); first- phrase type: global varname: banner_view text: View Current DHC Banners Second- phrase type: global varname: banner_add text: Add a DHC Banners Then in footer template: find: Code:
<br /> Code:
<br /> |
Very Awesome..>Can't wait for the PayPal integrated version...This will be very cool.
|
apparently you can only have banners that are 468 by 60 pixels, fix please...
|
tp214: Thank you for the updates and I will add these to the release tonight.
Also, I will allow for multiple sizes to be entered in the Admin CP determining the size of the banner. Future releases are set to include: Multiple banners per page Checking of secondary usergroups Specifying which forums certain banners will be shown in Limit by time/days Paypal integration for automatic setup (with admin moderation of banners) Setup of packages, ie: 1000 views for $5 preset etc... (Custom packages) Next release due: 13th April |
Does this hack rotate banners?
|
Nice ideas but we have nochex as well for us mortals that dont use Paypal. And instead of multiple banners per page, what about banner rotation as well, or even a choice of multiple or rotation.
Quote:
|
Currently the script selects a random banner from the list on each refresh or page change. Everytime the header script is loaded a random banner will be chosen.
Also, NoChex will be integrated with this script, I thought I had mentioned that but looking back i forgot to. |
I just installed it and added 2 banners, but only the 1st one in the list is showing, they are not rotating?
Laters |
Can it display the amazon <Iframe> based banners?
|
Quote:
Quote:
Again, next release is due 13th April so watch out for the features in that |
The Realist: After a few debugging minutes I found out the error in the script that does not allow one of the banners to be shown.
In /includes/functions_bannerads.php find PHP Code:
PHP Code:
|
I'll download it now M8 and give it a test.
|
Somethings not right M8. When I enable just one of the 2 banners I get the one showing up fine and then on rotation the other shows up but as a 468x60 box with a red x.
Also the 2nd banner should not show as its disabled and also the path of the 2nd blank banner is wrong, if I right click and view properties the path is wrong? HELP? |
I put the original code back in as you pointed out above, and now my banners work but dont rotate?
|
Well I woke up this morning after putting the original code back and the banners are now rotating?
Work that one out? |
Possibly to do with your cache, or maybe an error on your server.
Currently working on next release... |
waiting for the 13th today is 13th ehhhee
|
Many additions have been made to the script and this release will be out soon. Just tweaking some bugs before I release to public.
v1.4 Release Features Unlimited banners per page based on a location script Majority of bugs from 1.2.1 fixed and in fully working order Now allows for different banner types: Image/Flash/Custom Code (If you select Custom Code you have the option to input your own code with basic variables) Banner size included in Admin CP End date/time for banner included to allow limiting by timespan |
can't wait. Any idea when?
|
Version 1.4 has been released. Sorry for the delay but their were more bugs in my code than I thought would be!
Let me know what you think of the upgrades and what else can be done to improve it? |
Er - i tried to do a 1st install - when i click the install button on the install_bannerads.php page - it comes up with
Not Found The requested URL /forum/admincp/.php was not found on this server. |
wtf ?
print_form_header('install_bannerads', 'sql'); = <!-- form started: 5 queries executed --> <form action=".php" name="messageform" method="post"> :squareeyed: |
K bypassed that problem - then i came across a prefix problem in functions_bannerads.php
line 34 is $GetUsergroup = $DB_site->query_first("SELECT displayads FROM usergroup WHERE usergroupid='$bbuserinfo[usergroupid]'"); should be $GetUsergroup = $DB_site->query_first("SELECT displayads FROM ".TABLE_PREFIX."usergroup WHERE usergroupid='$bbuserinfo[usergroupid]'"); |
Densit5: Sorry for the errors, can you tell me please how you bypassed that error and I will try and incorporate it into the script.
Also, I will be sure to include that update above into the script |
So we shouldn't install this until you have fixed the problem densit5 is having?
I'm so looking forward to this one! Thank you X! |
All changes have been made. Installation runs smoothy now, tested on 2 different servers!
|
Good feature, installed!
Is there a way to add a feature in the next version that will allow you to have the link open in a new (_blank) window or the same (_self) window? So ads that relate to in-forum ads (like promoting a new feature or forum in the same forum) open in the same window, and external links open in a new window? Thanks! |
Great idea dynamic! That way they don't leave your forum.
Thanks Xenatino!! |
I'm coming up with a Parse error: parse error, unexpected '/' in /home/content/c/h/e/cher123/html/community/global.php on line 522 while installing. can't get past it.
|
----------------------------------------------------------------------
/global.php (1 Change) ---------------------------------------------------------------------- FIND eval('$headinclude = "' . fetch_template('headinclude') . '";'); eval('$header = "' . fetch_template('header') . '";'); eval('$footer = "' . fetch_template('footer') . '";'); ADD ABOVE // <DHC> require_once('./includes/functions_bannerads.php'); $TotalSlots = get_banner_slots(); for ($x=1; $x < ($TotalSlots+1); $x++) { $banner_ad[$x] = print_random_banner($x); } // </DHC> ---------------------------------------------------------------------- This is where I'm having the problems so far. If I do this to my global.php that is in my FORUM root directory, I get the above error. Looking at this /global.php (1 Change) it makes it look as though there should be a global.php in my main ROOT directory? |
Quote:
|
Been busy the past week - i am now looking back at the problem i am still having - I think its a problem with my v bulletin site - as i run the install_bannerads.php file - when i hit the Start installation button - it redirects me to .php which does not exist.
code i have is :- <!-- form started: 5 queries executed --> <form action=".php" name="messageform" method="post"> <input type="hidden" name="do" value="" /> <br /> <table cellpadding="4" cellspacing="0" border="0" align="center" width="65%" class="tborder"> <tr> <td class="tcat" align="center" colspan="2"><b>vBulletin Message</b></td> </tr> <tr valign="top"> <td class="alt1" colspan="2"><blockquote><br />This script will install the necessary MySQL data to run DHC Banner Ads...<br /><br /><input type="submit" value="Start Installation"><input type="hidden" name="do" value="sql"><br /><br /></blockquote></td> </tr> <tr> <td class="tfoot" colspan="2" align="center"> <input type="button" class="button" value="Go Back" tabindex="1" onclick="window.location='javascript:history.back(1)';"/> </td> </tr> </table> </form> <!-- form ended: 5 queries executed --> i think its a problem in my global.php file somewhere, am investigating. i by passed it by creating some manual form code in the install php file that call the sql function, which worked. So i dont think your code is at fault here. But i will find out why hopefully soon. |
All times are GMT. The time now is 04:39 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|