Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
DHC Banner Ads - Upgrade [1.4] Details »»
DHC Banner Ads - Upgrade [1.4]
Version: 1.4, by Xenatino Xenatino is offline
Developer Last Online: Dec 2006 Show Printable Version Email this Page

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.

Comments
  #2  
Old 04-10-2005, 09:39 PM
Marco van Herwaarden Marco van Herwaarden is offline
 
Join Date: Jul 2004
Posts: 25,415
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Xenatino
Bad start already, forgot to attach the ZIP File
Just edit your first post and add the file please.
Reply With Quote
  #3  
Old 04-10-2005, 09:45 PM
Marco van Herwaarden Marco van Herwaarden is offline
 
Join Date: Jul 2004
Posts: 25,415
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #4  
Old 04-10-2005, 09:46 PM
eXtremeTim eXtremeTim is offline
 
Join Date: Jun 2002
Location: eXtremewebtech.com
Posts: 1,201
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Does this hack check secondary user groups?
Reply With Quote
  #5  
Old 04-10-2005, 09:52 PM
Xenatino Xenatino is offline
 
Join Date: Feb 2005
Posts: 21
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Just edit your first post and add the file please.
Have done, feel free to delete my reply.

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.
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...

Quote:
Does this hack check secondary user groups?
Not in this version no, I will arrange for that to be coded into the next version
Reply With Quote
  #6  
Old 04-10-2005, 10:15 PM
Nordinho Nordinho is offline
 
Join Date: Aug 2004
Location: Netherlands
Posts: 288
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

this looks very promising!!
Reply With Quote
  #7  
Old 04-10-2005, 10:24 PM
007's Avatar
007 007 is offline
 
Join Date: Jan 2003
Location: United States
Posts: 872
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #8  
Old 04-10-2005, 10:26 PM
Xenatino Xenatino is offline
 
Join Date: Feb 2005
Posts: 21
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #9  
Old 04-11-2005, 01:55 AM
tp214 tp214 is offline
 
Join Date: Sep 2004
Posts: 12
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

UPDATED!


alright well i fixed it for the controls to be put in the admincp

find: (in admincp/index.php)

Code:
$printhr = false;
	if (can_administer('canadminstyles'))
	{	$printhr = true;
add below:

Code:
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:
Code:
<br />
<div class="smallfont" align="center">$vbphrase[all_times_are_gmt_x_time_now_is_y]</div>
replace with:
Code:
<br />
<div align="center">$banner_ad &nbsp;</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...
Reply With Quote
  #10  
Old 04-11-2005, 02:18 AM
jugo jugo is offline
 
Join Date: Feb 2004
Location: Reading your emails.
Posts: 573
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Very Awesome..>Can't wait for the PayPal integrated version...This will be very cool.
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 12:35 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.19561 seconds
  • Memory Usage 2,298KB
  • Queries Executed 23 (?)
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
  • (4)bbcode_code
  • (4)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
  • (2)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (10)postbit_onlinestatus
  • (10)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