vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   DHC Banner Ads - Upgrade [1.4] (https://vborg.vbsupport.ru/showthread.php?t=79738)

Xenatino 04-09-2005 10:00 PM

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

Marco van Herwaarden 04-10-2005 09:39 PM

Quote:

Originally Posted by Xenatino
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

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

Nordinho 04-10-2005 10:15 PM

this looks very promising!!

007 04-10-2005 10:24 PM

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)

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

jugo 04-11-2005 02:18 AM

Very Awesome..>Can't wait for the PayPal integrated version...This will be very cool.


All times are GMT. The time now is 02:03 PM.

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.01202 seconds
  • Memory Usage 1,740KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_code_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete