View Full Version : DHC Banner Ads - Upgrade [1.4]
Xenatino
04-09-2005, 10:00 PM
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
Marco van Herwaarden
04-10-2005, 09:39 PM
Bad start already, forgot to attach the ZIP File :rolleyes:Just edit your first post and add the file please.
Marco van Herwaarden
04-10-2005, 09:45 PM
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.
eXtremeTim
04-10-2005, 09:46 PM
Does this hack check secondary user groups?
Xenatino
04-10-2005, 09:52 PM
Just edit your first post and add the file please.
Have done, feel free to delete my reply.
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.
I thought I had used TABLE_PREFIX wherever I could, I will check again and re-upload. Also, thanks for the advice on SQL injection, will sort all that out now...
Does this hack check secondary user groups?
Not in this version no, I will arrange for that to be coded into the next version
Nordinho
04-10-2005, 10:15 PM
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
Xenatino
04-10-2005, 10:26 PM
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.
tp214
04-11-2005, 01:55 AM
UPDATED!
alright well i fixed it for the controls to be put in the admincp
find: (in admincp/index.php)
$printhr = false;
if (can_administer('canadminstyles'))
{ $printhr = true;
add below:
construct_nav_option($vbphrase['banner_view'], 'dhcbannerads.php?do=view', '<br />');
construct_nav_option($vbphrase['banner_add'], 'dhcbannerads.php?do=add', '<br />');
construct_nav_group("DHC Banner System", '<hr />');
Add 2 more phrases:
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: <br />
<div class="smallfont" align="center">$vbphrase[all_times_are_gmt_x_time_now_is_y]</div>
replace with:
<br />
<div align="center">$banner_ad </div>
<br />
<div class="smallfont" align="center">$vbphrase[all_times_are_gmt_x_time_now_is_y]</div>
The last edit is for only if you want it at the bottom of the page...
Very Awesome..>Can't wait for the PayPal integrated version...This will be very cool.
tp214
04-11-2005, 02:24 AM
apparently you can only have banners that are 468 by 60 pixels, fix please...
Xenatino
04-11-2005, 08:39 AM
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
The Realist
04-11-2005, 08:58 AM
Does this hack rotate banners?
The Realist
04-11-2005, 08:59 AM
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.
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
Xenatino
04-11-2005, 09:31 AM
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.
The Realist
04-11-2005, 10:18 AM
I just installed it and added 2 banners, but only the 1st one in the list is showing, they are not rotating?
Laters
vulture
04-11-2005, 11:36 AM
Can it display the amazon <Iframe> based banners?
Xenatino
04-11-2005, 02:59 PM
I just installed it and added 2 banners, but only the 1st one in the list is showing, they are not rotating?
Laters
Make sure that the other banner is set to active in the Admin CP
Can it display the amazon <Iframe> based banners?
Not yet, no. Only images can be used as banners.
Again, next release is due 13th April so watch out for the features in that
Xenatino
04-11-2005, 10:14 PM
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 $random = rand(0,$max); and change it to $random = rand(0,($max+1));
Or alternativley you can just re-download the zip file and get the updated functions_bannerads.php
The Realist
04-11-2005, 10:22 PM
I'll download it now M8 and give it a test.
The Realist
04-11-2005, 10:31 PM
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?
The Realist
04-11-2005, 10:38 PM
I put the original code back in as you pointed out above, and now my banners work but dont rotate?
The Realist
04-12-2005, 11:49 AM
Well I woke up this morning after putting the original code back and the banners are now rotating?
Work that one out?
Xenatino
04-12-2005, 01:53 PM
Possibly to do with your cache, or maybe an error on your server.
Currently working on next release...
turkforum
04-13-2005, 09:25 PM
waiting for the 13th today is 13th ehhhee
Xenatino
04-14-2005, 07:05 AM
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
Tigur
04-15-2005, 12:16 PM
can't wait. Any idea when?
Xenatino
04-16-2005, 11:59 PM
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?
Densit5
04-19-2005, 04:11 AM
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.
Densit5
04-19-2005, 04:39 AM
wtf ?
print_form_header('install_bannerads', 'sql'); =
<!-- form started: 5 queries executed -->
<form action=".php" name="messageform" method="post"> :squareeyed:
Densit5
04-19-2005, 05:35 AM
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]'");
Xenatino
04-19-2005, 08:49 PM
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
sunnycher
04-20-2005, 03:15 AM
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!
Xenatino
04-20-2005, 08:00 PM
All changes have been made. Installation runs smoothy now, tested on 2 different servers!
dynaimc
04-21-2005, 03:14 PM
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!
sunnycher
04-21-2005, 03:44 PM
Great idea dynamic! That way they don't leave your forum.
Thanks Xenatino!!
sunnycher
04-21-2005, 04:03 PM
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.
sunnycher
04-21-2005, 04:32 PM
----------------------------------------------------------------------
/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?
Xenatino
04-21-2005, 07:02 PM
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!
Thank you for this suggestion, I will be usre to implement it into the next release
Densit5
04-28-2005, 08:58 PM
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.
artonex
04-28-2005, 10:47 PM
This looks promising, i will be keeping awatch of this thread :)
artonex
04-29-2005, 06:22 AM
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
When is this coming mate do u have any ideas ?
artonex
05-02-2005, 03:09 PM
Xenatino have you given up on this great hack ?
Storage Guy
05-04-2005, 06:52 PM
am I retarded? trying to install this as my first mod... help needed!
Database error in vBulletin 3.0.7:
Invalid SQL: SELECT num_locations FROM dhc_ads_settings
mysql error: Table 'xxxxxxxx.dhc_ads_settings' doesn't exist
mysql error number: 1146
Did I leave something out???
- There are some places in the coding vulnerable to SQL injections. Please validate all values before using them in a query.
Don't think this has been fully addressed. Also submission of new banners does not capture info correctly. Submission of an 'Others' type banner doesn't accept HTML code either (perhaps should be mentioned :) )
Found these problems whilst installing the hack for TheWebJunkie. Nice and intuitive banner hack, but it needs some improvements :)
Kaelon
05-18-2005, 02:12 AM
Don't think this has been fully addressed. Also submission of new banners does not capture info correctly. Submission of an 'Others' type banner doesn't accept HTML code either (perhaps should be mentioned :) )
Found these problems whilst installing the hack for TheWebJunkie. Nice and intuitive banner hack, but it needs some improvements :)
Confirmed. There are serious security issues with this hack; I was able to insert a string of text into the database, in a separate cell using standard SQL.
MissKalunji
05-22-2005, 09:41 AM
Hey does anyone know if this will work with vb 3.5.0? thx
Xenatino
05-22-2005, 08:16 PM
Sorry, I'm back again. I will be starting work on this hack again shortly and releasing it within the next few weeks.
Please list any improvements you would like to see in the next release and any bugs/security holes (With the filename and rough location if possible) so that all of these may be corrected.
I apologise for the delay in getting back to you all.
Hey does anyone know if this will work with vb 3.5.0? thx
This script has only been formally tested with vB 3.0.7. Upon release of vB 3.5.0, I will try and make this version blend seemlessly. If not, I will release an updated version for the new vB version.
MissKalunji
05-22-2005, 09:16 PM
Sorry, I'm back again. I will be starting work on this hack again shortly and releasing it within the next few weeks.
Please list any improvements you would like to see in the next release and any bugs/security holes (With the filename and rough location if possible) so that all of these may be corrected.
I apologise for the delay in getting back to you all.
This script has only been formally tested with vB 3.0.7. Upon release of vB 3.5.0, I will try and make this version blend seemlessly. If not, I will release an updated version for the new vB version.
cool thx for the quick reply :ermm:
Blue Moose Aaron
05-23-2005, 02:34 AM
I get errors when trying to insert data
Warning: Cannot modify header information - headers already sent by (output started at /home/thekryp/public_html/includes/adminfunctions.php:223) in /admincp/dhcbannerads.php on line 304
I'm using vBadvanced on my website and it will not display the ad on that page. Any idea why?
Also, is it possible to display Google Ads?
Also, is it possible to display Google Ads?
Not at the moment.
redhotstang00
05-25-2005, 04:16 AM
When i'm in the Admin CP, I can view the Add New Banner Ad and Edit Settings for DHC Banner Ads.
But i can't see it on the left side this is the pic you have https://vborg.vbsupport.ru/attachment.php?attachmentid=25581
but i can't see any off this
Xenatino
05-25-2005, 08:41 AM
That is a screenshot of the original version, and not of the upgrade.
You should see 3 links under the heading of DHC Banner System (Manage Banner Ads, Add New Banner Ad and DHC Banner Settings)
etinteractive
05-25-2005, 05:16 PM
Has the SQL injection hole been fixed??
Trana
05-25-2005, 09:11 PM
I am getting the same error message as storageguy:
Database error in vBulletin 3.0.7:
Invalid SQL: SELECT num_locations FROM dhc_ads_settings
mysql error: Table 'forum.dhc_ads_settings' doesn't exist
mysql error number: 1146
I get this error message after I log in to the install script. The error is on every page of my site. Please help!
Thank you.
PixelFx
05-25-2005, 10:38 PM
Clicked install but waiting for PayPal integrated version, also ucash/ushop intergration would be cool aka buy with points or something as sugguestion.
etinteractive
05-27-2005, 12:40 PM
The one thing I had a problem with is the VBphrases in the admin cpanel wouldnt appear for me. They exist and all looks right, but the didnt output.
So i just hardcoded them.
any thoughts?
etinteractive
05-27-2005, 01:00 PM
also, when I click a banner, its going to www.xxx.com/clickthru.php and NOT /forum/clickthru.php.
So if i move clickthru.php to root then i get error msgs that /.global.php cannot be found.
etinteractive
05-27-2005, 01:15 PM
also, when I click a banner, its going to www.xxx.com/clickthru.php and NOT /forum/clickthru.php.
So if i move clickthru.php to root then i get error msgs that /.global.php cannot be found.
I realized this is due to using Vbadvanced portal. the banner ad doesnt work on the portal page, but it does on the forum pages.
any thoughts on how to change the output accordingly?
MissKalunji
05-27-2005, 02:27 PM
The one thing I had a problem with is the VBphrases in the admin cpanel wouldnt appear for me. They exist and all looks right, but the didnt output.
So i just hardcoded them.
any thoughts?
i had the same problem....i just took off the vb phrases and 'wrote it normally'
Blue Moose Aaron
05-28-2005, 01:13 AM
My banner will display for a time and then I revisit my site and nothing is showing. So for some reason it is disableing itself..
Xenatino
05-30-2005, 01:04 AM
also, when I click a banner, its going to www.xxx.com/clickthru.php and NOT /forum/clickthru.php.
So if i move clickthru.php to root then i get error msgs that /.global.php cannot be found.
Download the file attached to this reply and replace the current /includes/functions_bannerads.php file.
It has a few bug fixes and should fix this clickthru.php error.
Protoman
05-30-2005, 04:37 PM
My banner will display for a time and then I revisit my site and nothing is showing. So for some reason it is disableing itself..
open clickthru.php and find:
if ($Select['limit_type'] == "clicks" && ($Select[clicks]+1) >= $Select[limit_to])
replace with:
if ($Select['limit_type'] == "clicks" && ($Select[clicks]+1) >= $Select[limit_num])
how it's currently setup it validates that you are limiting by clicks.. then looks for a nonexistant variable in the database.. returned 0.. and tada, 1 click, ad turns off.
dennisuello
06-07-2005, 03:12 PM
i installed it and followed all the instrucation, now i get:
Database error in vBulletin 3.0.7:
Invalid SQL: SELECT displayads FROM usergroup WHERE usergroupid='6'
mysql error: Table 'reno4x4_vbulletin.usergroup' doesn't exist
mysql error number: 1146
The Realist
06-07-2005, 03:19 PM
As the error states "Table 'reno4x4_vbulletin.usergroup' doesn't exist"
Create it
i installed it and followed all the instrucation, now i get:
Database error in vBulletin 3.0.7:
Invalid SQL: SELECT displayads FROM usergroup WHERE usergroupid='6'
mysql error: Table 'reno4x4_vbulletin.usergroup' doesn't exist
mysql error number: 1146
dennisuello
06-07-2005, 03:21 PM
my forum worked just fine before this, now i get this error. doesn't this table exist already?
all my tables start with vb3, like vb3_usergroup.
how do i uninstall this hack?
The Realist
06-07-2005, 03:30 PM
If you want to uninstall it you have 2 options.
1) Reinstall the backup of your forum you should do before installing hacks.
2) Follow the instructions in reverse and put the edits etc back as they were.
my forum worked just fine before this, now i get this error. doesn't this table exist already?
all my tables start with vb3, like vb3_usergroup.
how do i uninstall this hack?
dennisuello
06-07-2005, 03:32 PM
2) Follow the instructions in reverse and put the edits etc back as they were.
what about reversing changes made by "install_bannerads.php"
Big J
06-13-2005, 04:01 PM
Hi,
I get the following error when I try to add a banner: Warning: Cannot modify header information - headers already sent by (output started at /home/extreme-/public_html/forums/includes/adminfunctions.php:223) in /admincp/dhcbannerads.php on line 337
im running vb3.0.7
please help.
MissKalunji
06-13-2005, 04:05 PM
Hi,
I get the following error when I try to add a banner: Warning: Cannot modify header information - headers already sent by (output started at /home/extreme-/public_html/forums/includes/adminfunctions.php:223) in /admincp/dhcbannerads.php on line 337
im running vb3.0.7
please help.
it still saves up your settings......i have the same error 2....
Big J
06-13-2005, 04:15 PM
it still saves up your settings......i have the same error 2....
It's not saving my settings. I also cant see the DHC Banner System option links in the nav, the phrases are not displaying. All I have are empty, clickable boxes.
MissKalunji
06-13-2005, 04:16 PM
It's not saving my settings. I also cant see the DHC Banner System option links in the nav, the phrases are not displaying. All I have are empty, clickable boxes.
no no trust me it does.....and as for the phrases i had to twik the index in adminc instead of making it look for the phrases (for some reason it doesnt) i put up the word myself here's what i did and it works fine :
//Banner
construct_nav_option("Banner View", 'dhcbannerads.php?do=view', '<br />');
construct_nav_option("Banner Add", 'dhcbannerads.php?do=add', '<br />');
construct_nav_option("Banner Settings", 'dhcbannerads.php?do=settings', '<br />');
construct_nav_group("DHC Banner System", '<hr />');
//Banner
Aeolian_X
06-13-2005, 10:27 PM
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
Getting this same error, but the settings do seem to save. Though I still am not seeing any banners on the forum pages.
Big J
06-13-2005, 10:30 PM
Thank you Miss!
MissKalunji
06-13-2005, 10:57 PM
Thank you Miss!
np :nervous:
MissKalunji
06-13-2005, 10:57 PM
Getting this same error, but the settings do seem to save. Though I still am not seeing any banners on the forum pages.
make sure that when u put up the banner code into your forum sometimes in the header template....that you put up example : number 1 make sure that when u add the banners from teh admincp make sure you put 1 in location...
Aeolian_X
06-14-2005, 02:37 AM
make sure that when u put up the banner code into your forum sometimes in the header template....that you put up example : number 1 make sure that when u add the banners from teh admincp make sure you put 1 in location...
Ah Ha!!! That's Beautiful! lol! Thank You Very Much MissKalunji. :)
Densit5
06-14-2005, 03:46 AM
Checked why my click throughs were not working - totally missing the URI and found this code:-
Back up your file before you edit it please!
functions_bannerads.php
Find
Around line 39
global $DB_site, $banner_ad;
Replace
global $DB_site, $banner_ad,$vboptions;
Find
Line 77 - 79
case "image":
$banner = "<a href=\"clickthru.php?uid=$ad[uid]\" target=\"_blank\"><img src=\"$ad\" height=\"$ad[height]\" width=\"$ad[width]\" border=\"0\"></a>";
break;
[b]
Added the full url code to the clickthru links - This should also work for people that have VB advanced installed, since i have it too :lick:
Replace
case "image":
$banner = "<a href=\"$vboptionsclickthru.php?uid=$ad[uid]\" target=\"_blank\"><img src=\"$ad[banner_image]\" height=\"$ad[height]\" width=\"$ad[width]\" border=\"0\"></a>";
break;
[b]Find
Line 95 - 102
case "other":
$banner = $ad['other_code'];
$url_code = "clickthru.php?uid=" . $ad['uid'];
$banner = str_replace("{url}", $url_code, $banner);
$banner = str_replace("{image}", $ad['banner_image'], $banner);
$banner = str_replace("{height}", $ad['height'], $banner);
$banner = str_replace("{width}", $ad['width'], $banner);
break;
Replace
case "other":
$banner = $ad['other_code'];
$url_code = "$vboptions[bburl]clickthru.php?uid=" . $ad['uid'];
$banner = str_replace("{url}", $url_code, $banner);
$banner = str_replace("{image}", $ad['banner_image'], $banner);
$banner = str_replace("{height}", $ad['height'], $banner);
$banner = str_replace("{width}", $ad['width'], $banner);
break;
This hack is nice but will not work on "other" for google addsense javascripts until you change the case "other" code.
Aeolian_X
06-14-2005, 08:23 PM
I've noticed that my banners do not stay active. Not sure what's causing it, but I have had to recheck the Active box three times now.
I'd still like a fix for this too.
Warning: Cannot modify header information - headers already sent by (output started at /xxx/xxx/xxx/xxx/xxx/xxx/forum/includes/adminfunctions.php:223) in /admincp/dhcbannerads.php on line 304
MissKalunji
06-14-2005, 08:28 PM
Ah Ha!!! That's Beautiful! lol! Thank You Very Much MissKalunji. :)
n e time glad i could help :)
COBRAws
06-14-2005, 11:48 PM
i apreciate this hack.
Any future move towards a backend? i mean, something like phpmyads, so publishers could see number of clicks of banners assigned to them? Just a tip.
ThePartyBorg
06-16-2005, 01:48 PM
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:
$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
$getBanners = $DB_site->query("SELECT * FROM dhc_ads WHERE userid='$bbuserinfo[userid]'");
And replace this with:
$getBanners = $DB_site->query("SELECT * FROM ".TABLE_PREFIX."dhc_ads WHERE userid='$bbuserinfo[userid]'");
Densit5
07-03-2005, 09:05 AM
ja, most of the prefix problems were found/fixed a couple of pages back! - but its good you found and fixed your code!
Aeolian_X
07-05-2005, 03:31 AM
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?
digidivakathy
07-06-2005, 06:50 PM
Forgive me for asking this, but there are an awful lot of posts here...is this working now? If I download and install, am I good to go?
Thanks!
Aeolian_X
07-08-2005, 03:17 PM
Well, no. It works, but still has bugs that obviously aren't being fixed. So I'm clicking UNinstall.
MissKalunji
07-08-2005, 03:22 PM
Forgive me for asking this, but there are an awful lot of posts here...is this working now? If I download and install, am I good to go?
Thanks!
the only bug is in admincp the link dont work and u can fix it by urself besides that 100% good 2 go
CrimsonGT
07-13-2005, 06:52 AM
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?
c0d3x
07-17-2005, 04:06 PM
any news? i would like to have the time option ;)
paul41598
07-20-2005, 12:14 AM
Can someone please explain this hack, or certain features at least. Is it like PHPadsnews?
Features:
Displays stats of ads in specified users control panel
This feature here to me, means that a user can log in his/her CP and see their stats. Am I wrong?
beansbaxter
07-20-2005, 05:35 AM
i am running 3.0.7 and i cannot get this to work.
beansbaxter
07-20-2005, 04:22 PM
ok so this morning, for testing purposes, i did a reinstall of vbulletin fresh on a clean new database. i figure i can test the mod out, so if it works then i can take it to my live site.
i went through the install instructions, verbatim, and not one hitch.
i go into admin cp, and the dhc banner system heading is there, but when i click on it, there are no links underneath it, just 3 little small blue boxes that are about 2 pixels high. the top little box does nothing, the bottom two do link to something, not sure what since i cant read anything.
That's ok, I can look in the code, and for whatever reason it did not make things work, but I see the link (example dhcbannerads.php?do=view) and I can make my own 3 links from there to view, add, and do settings so I'm ok with this bug.
So I deleted the default banner, and added a new banner. Everything seems to work so far up to this point. Now I just want to insert the banner into the header by adding the appropiate code. I just used the install instructions to copy and replace the code in the header template.
Keep in mind when I setup the banner, I selected ALL to make sure it was in all banner slots.
I load my forum and the banner is not there, dont know what is going on?????
beansbaxter
07-20-2005, 04:32 PM
update, i got it to work. for some reason, once the banner has been saved, u have to go back and manually choose the banner slot and the dimensions again, cause they dont save on the initial load.
beansbaxter
07-20-2005, 05:01 PM
and last update. i fixed the admincp issue, all you have to do is search in phrases for one of the banner phrases, i did banner_view and made no changes and saved it, it forced the phrases to rebuild themselves and now it all works perfect.
Aeolian_X
07-22-2005, 10:48 PM
LOL! You fixed it yourself, by doing everything I was gonna tell you to do. Glad to see it.
carloshax
07-25-2005, 04:23 PM
no no trust me it does.....and as for the phrases i had to twik the index in adminc instead of making it look for the phrases (for some reason it doesnt) i put up the word myself here's what i did and it works fine :
//Banner
construct_nav_option("Banner View", 'dhcbannerads.php?do=view', '<br />');
construct_nav_option("Banner Add", 'dhcbannerads.php?do=add', '<br />');
construct_nav_option("Banner Settings", 'dhcbannerads.php?do=settings', '<br />');
construct_nav_group("DHC Banner System", '<hr />');
//Banner
thx very much worked perfectly, this was the only problem i was having
erratic assasin
07-25-2005, 08:56 PM
Hi I just installed no probs but I would like to display ad under my banner in the centre anyone help me out please?
cynix2
07-26-2005, 11:34 AM
Ok ummm I really need some help on this. Advertising is the only thing that keeps my site going and ever since I switched to vb I havnt been able to have a good advertisment.
I have followed every step of every page and I do not see or get the banners on my page.
I dont have any errors. I put in the phasing for admincp. I have vbadvanced but I dont care if its on that page. I downloaded it a few days ago. NO images show up ANYwhere.
Please help. My site is at your coding mercy.
BOWZONE
07-27-2005, 03:38 AM
No problems here....Works great...
*installed*
John Smiley
08-03-2005, 07:18 PM
The first edit takes my site down. Do I need to close my site while I add this?
Will it work, once everything is complete?
----------------------------------------------------------------------
/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>
----------------------------------------------------------------------
Marco van Herwaarden
08-03-2005, 08:40 PM
You should always close down while modding. (and/or work on a local copy of the files, and upload them all at once).
Russ_T
08-03-2005, 09:52 PM
So is there ever going to be a fix for this error? Has anyone looked into it?
I get the exact same problem when I try to do anything in the banner control panel I get this back
"Warning: Cannot modify header information - headers already sent by (output started at /bla/bla/public_html/forum/includes/adminfunctions.php:223) in /admin/dhcbannerads.php on line 313""
or line 323, etc, depending on what I try to do.
If I can fix it I will let you know, for now my whole site is bannerless :(
Confusion
08-05-2005, 11:35 PM
I just installed the latest version of this hack and I can't get two banners to rotate.
Any suggestions?
DonLKSAB
08-18-2005, 09:59 PM
Hi all.
Everything works fine.
The banners works fine in the header.
But i still have one small problem.
Im running vBadvanced and wants to add a "banner module".
I need a php page to use as module.
I was hoping that adding a simple $banner_ad[1]; to a php file would do the trick.
But no luck.
So i guess i need a php page that can display the banners without all the other header code and stuff.
Any ideas how one of theese pages should look?
/DonLKSAB
DonLKSAB
08-19-2005, 08:32 PM
My guess is that i need a php file that can display the banner standalone.
Is that possible to do?
/DonLKSAB
BlueBulletRL
08-20-2005, 01:58 AM
Hey yea I've tried installin this hack 3 times and my site once everything is said and done says I have an error on the forum and I have to blow everything away anyw reason why it would do this? Unless there is an underlying message I don't see that is happening
BlueBulletRL
08-21-2005, 09:39 PM
I realized this is due to using Vbadvanced portal. the banner ad doesnt work on the portal page, but it does on the forum pages.
any thoughts on how to change the output accordingly?
I am having the same issue I finally got the program to work but I can't get the banners to show up the home page and I think its because its lookin for the table params in the admin cp but since its on the root directory its not gonna be able to pull them. Anyone confirm this?
ouchs1234
08-25-2005, 06:27 PM
I have Vbulletin 3.0.7, I got all installation instructions but one, the part find Modify template 'USERCP_SHELL'. Can you please help me.
THanks
Qwest
08-29-2005, 05:47 PM
It's been 3 months since the coder so much as posted in this thread.
I doubt he's coming back.
Floris
09-02-2005, 10:13 PM
This is such a shame, the 1.4 version is starting to look really good.
Hopefully the author has some free time soon to patch up what he has so far and address some known issues, and zip it up as a 1.5 :)
Save up the new features as a plugin for vb 3.5 so you can call it 2.0 - which also gives you (the author) some extra time to work on it.
Nice hack, feature rich enough for some sites I run and looking forward to version 1.5
If you read this please let us know if you have some time in the near future again to work on this! You've done a great job so far.
martinc126
09-11-2005, 11:17 AM
I don't think Adam has actually forgot about the mod, He is very busy at the moment in his full time job, I am sure v1.5 will be out soon.
Martin
(Adams Friend - DHChat.com)
TalkCS
09-11-2005, 05:10 PM
yeah, this seems to be a good hack thanks..
Ozster
09-14-2005, 10:56 AM
bug - everytime i view my homepage, the number of views for the banner goes up by 12?
Turbo_WRX
09-23-2005, 04:13 AM
shit i'm still confused on how to get a banner under my nav bar in that blank space...
Xenatino
09-23-2005, 09:29 AM
Sorry everyone for the long...long delay. As Martin said, I have been incredibly busy over the past few months and have had next to no free time for coding.
I will be working on the bug fixes stated so far and will be releasing a version 1.5 in the near future.
I also plan to be releasing a version 2.0 for VB 3.5.0.
Thank you for your patience everyone.
Regards,
Adam Prickett
mahdiyat`
09-23-2005, 01:12 PM
thanks for it
BlueBulletRL
10-21-2005, 05:16 AM
Hey do we have a release date for this for version 3.5??? I have this hack installed and it works GREAT however I wanna upgrade to version 3.5 and I am guessing that this is not compatible with it yet?
Pain86
11-10-2005, 06:15 PM
can anyone help me here.. i get this when i try and and install the msql part
Database error in vBulletin 3.0.7:
Invalid SQL: ALTER TABLE usergroup ADD `displayads` VARCHAR( 5 ) DEFAULT '1' NOT NULL AFTER `passwordhistory`
mysql error: Duplicate column name 'displayads'
mysql error number: 1060
angelo
11-12-2005, 01:51 PM
Is there an updated version of this for 3.5?
Scribbller
12-09-2005, 12:19 AM
Anymore news on this?
Elfo King
12-09-2005, 10:08 AM
Hi all !
I have a problem with the "install_bannerads.php" file...
When i try to "start installation" the file dont run correctly...it charge 1 second and reload the same starting page...
I have tried to reupload the file but not are the solution....
Any can't help me ?
U say the correct MySQL query for manually execution to bypassing this problem ?
THx all
Russ_T
12-10-2005, 02:51 PM
Has work stopped on this now? I am still waiting on a fix for
Warning: Cannot modify header information - headers already sent by (output started at /home/blabla/public_html/forum/includes/adminfunctions.php:223) in /admin/dhcbannerads.php on line 304
like others :) This is a really nice mod though, much appreciated thanks :)
Elfo King
12-15-2005, 04:07 PM
anyone can help me ?
this screen show the only same page, when i try to install....
Elfo King
12-16-2005, 09:15 PM
Any idea for solution ?
Xenatino are missing (via PM, mail, post....)....any help here ??????
Elfo King
12-20-2005, 04:00 AM
Up, i need help to "translate" the starting mysql query...all the query into the file "install_bannerads.php" .
Elfo King
12-20-2005, 09:30 PM
Up................................................ .............
Malke
12-28-2005, 02:10 PM
Very good work. Props.
Factorynl
01-06-2006, 03:16 PM
I'm going to mod this mod myself, can't wait any longer for an update
underESTIMATED
04-08-2006, 06:53 PM
Bump so I can finally get this thing installed!!!!!!!!
tntgroup
03-06-2008, 05:18 AM
plz help me !!! when i setup it! it have error !!
who help me !! thank u !
http://img147.imageshack.us/img147/5020/erroriy2.jpg
tntgroup
03-09-2008, 06:46 AM
up up !! not have who help me !!! huhuuu uuu
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.