Go Back   vb.org Archive > vBulletin Modifications > Archive > Modification Graveyard
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Banner Ads System Details »»
Banner Ads System
Version: 1.00, by tnguy3n tnguy3n is offline
Developer Last Online: Sep 2010 Show Printable Version Email this Page

Version: 3.5.2 Rating:
Released: 01-03-2006 Last Update: Never Installs: 210
DB Changes Uses Plugins Template Edits
Additional Files  
No support by the author.

Banner Ads System
Author: Thinh Nguyen (tnguy3n)
Support: www.vbviet.org

###############
Banner Ads System Expanded version supports Adsense, Adbrite, Flash, Inframe, etc.
Click on the link below for more info & to purchase:
http://www.vbviet.com/index.php?act=...od&productId=8
###############

This simple rotational banner ads system get random ads from your database and display globally under navbar on your board.
It's been fully tested on vb 3.5.2, but it should work fine for all 3.5 Gold version.

FEATURES:
- Banner stats tracker
- Ability to enable/disable
- Admin ability to add/modify/delete banners
- Admin ability to view banner stats/detail for each banner
- more

#################
STRUCTURE:
- New Files: 3
- New Template: 1
- New db tables: 2
- Product: 1


#################
INSTALLATION:

1. Upload files to appropriate dir in your forumroot
2. UPload product xml file in your Product Manager

#################
If you find this hack useful or wish to sponsor/support future development of the hack, you can donate to


If you need custom version of this hack, pls contact me.

:::::UPDATE:::::
The product xml above will add 2 plugins and the ads stays fixed under navbar. This, however, may not be working with some custom skins if navbar template's codebit are changed. To fix that problem, open Banner System plugin (at global_start hook), replace the whole content with:

PHP Code:
// Banner Ads System by tnguy3n
if($vbulletin->options['bannersys_mode'])
{
    
$getads $vbulletin->db->query_read("SELECT * FROM " TABLE_PREFIX "

bannersys_banners WHERE status = '1' ORDER BY RAND() LIMIT 1"
);
    
$ads $vbulletin->db->fetch_array($getads);

    
// print banner ads
    
eval('$bannerads = "' fetch_template('bannerads') . '";');

    
$vbulletin->db->free_result($getads);
    unset(
$getads);

Next step, you'll have to modify some templates in order to display the ads, place this following code:
HTML Code:
$bannerads
anywhere you want to show the ads.
If you want to show the ads globally on your forums, put that code in either header or navbar or footer template.

To enable/disable or change other settings of Banner System: vBulletin Options -> Banner System Settings
- Banner System Mode: yes = enable, no = disable
- Show Banners to Logged In Users: yes = everyone (including logged in users), no = only guests
- Ads In New Window: yes = open in new window, no = open in same window

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #32  
Old 01-08-2006, 11:23 AM
tnguy3n's Avatar
tnguy3n tnguy3n is offline
 
Join Date: May 2003
Location: U of I, Iowa
Posts: 846
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'll write the docs for this later. For those who want to show the ads somewhere else, alter the codes in Banner System plugin.
Reply With Quote
  #33  
Old 01-08-2006, 04:16 PM
djkristoff djkristoff is offline
 
Join Date: Jan 2006
Posts: 2
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Database error in vBulletin 3.5.3:

Invalid SQL:
CREATE TABLE IF NOT EXISTS bannersys_banners (
bannerid int(10) NOT NULL auto_increment,
bannername varchar(200) NOT NULL,
bannerdesc varchar(250) NOT NULL,
bannerurl varchar(250) NOT NULL,
imgurl varchar(250) NOT NULL,
bwidth mediumint(4) NOT NULL,
bheight mediumint(4) NOT NULL,
status tinyint(1) NOT NULL default '1',
PRIMARY KEY (bannerid)
) ENGINE=MyISAM AUTO_INCREMENT=1;

MySQL Error : You have an error in your SQL syntax near 'ENGINE=MyISAM AUTO_INCREMENT=1
' at line 11
Error Number : 1064
Date : Sunday, January 8th 2006 @ 11:15:54 AM
IP Address : 68.148.132.214
Username : kristoff
Classname : vb_database
Reply With Quote
  #34  
Old 01-08-2006, 04:34 PM
djkristoff djkristoff is offline
 
Join Date: Jan 2006
Posts: 2
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

works fine after you remove the MyISAM etc ...

A few suggestions that would really help boost this package would be:

- Scheduled Banner Expiration (give a start / end date to which the banner is valid)
- Allow the banners to be uploaded to the board into a folder or the db, instead of linking from an external source
- if there is no link for the banner, remove the <a href> and just show it as a normal image. some people just dont have a website to link to and are just interested in showing their banner.

other than that great job! nice package. helps alot.
Reply With Quote
  #35  
Old 01-08-2006, 05:09 PM
TheAllusionist TheAllusionist is offline
 
Join Date: Apr 2005
Posts: 101
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by tnguy3n
I'll write the docs for this later. For those who want to shade the ads somewhere else, alter the codes in Banner System plugin.
Thanks! This is a sweet plugin thanks for sharing it.
Reply With Quote
  #36  
Old 01-08-2006, 06:19 PM
tnguy3n's Avatar
tnguy3n tnguy3n is offline
 
Join Date: May 2003
Location: U of I, Iowa
Posts: 846
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by djkristoff
works fine after you remove the MyISAM etc ....
thanks, will fix that. I used MyISAM as default engine.
Reply With Quote
  #37  
Old 01-08-2006, 11:33 PM
guyfox guyfox is offline
 
Join Date: Jul 2005
Posts: 8
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I actually had to click no then yes again to get it to work lol. Works great though. Does exactly what it needs to, well done.
Reply With Quote
  #38  
Old 01-09-2006, 11:48 AM
EchoZA EchoZA is offline
 
Join Date: Apr 2005
Posts: 31
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by djkristoff
works fine after you remove the MyISAM etc ...

A few suggestions that would really help boost this package would be:

- Scheduled Banner Expiration (give a start / end date to which the banner is valid)
- Allow the banners to be uploaded to the board into a folder or the db, instead of linking from an external source
- if there is no link for the banner, remove the <a href> and just show it as a normal image. some people just dont have a website to link to and are just interested in showing their banner.

other than that great job! nice package. helps alot.

I had the same problem, removed the MyISAM line, re-upload the .xml file and all ran fine, but now when I try log into my ADMIN CP I get the following error,

Code:
Database error in vBulletin 3.5.3:

Invalid SQL:
SELECT * FROM bannersys_banners WHERE status = '1' ORDER BY RAND() LIMIT 1;

MySQL Error  : Table 'vbulletin_treatingyourself_com.bannersys_banners' doesn't exist
Error Number : 1146
Date         : Monday, January 9th 2006 @ 08:46:34 AM
Script       : http://www.treatingyourself.com/vbulletin/login.php
Referrer     : 
IP Address   : 209.203.59.78
Username     : Administrator
Classname    : vb_database
Please help!
Reply With Quote
  #39  
Old 01-09-2006, 12:24 PM
EchoZA EchoZA is offline
 
Join Date: Apr 2005
Posts: 31
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

^^^ I'm going to install phpmyadmin see if I can add the tables manually, looks like the tables were not added
Reply With Quote
  #40  
Old 01-09-2006, 01:05 PM
EchoZA EchoZA is offline
 
Join Date: Apr 2005
Posts: 31
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If I add the code from the .xml in via phpmyadmin, as follows.

Code:
("CREATE TABLE IF NOT EXISTS " . TABLE_PREFIX . "bannersys_banners (
  bannerid int(10) NOT NULL auto_increment,
  bannername varchar(200) NOT NULL,
  bannerdesc varchar(250) NOT NULL,
  bannerurl varchar(250) NOT NULL,
  imgurl varchar(250) NOT NULL,
  bwidth mediumint(4) NOT NULL,
  bheight mediumint(4) NOT NULL,
  status tinyint(1) NOT NULL default '1',
  PRIMARY KEY (bannerid)
) 
");
I get the following error,

Code:
#1064 - You have an error in your SQL syntax near '("CREATE TABLE IF NOT EXISTS " . TABLE_PREFIX . "bannersys_banners (
  bannerid' at line 1
Please could I have some help, I'm a little new at this
Reply With Quote
  #41  
Old 01-09-2006, 02:04 PM
tnguy3n's Avatar
tnguy3n tnguy3n is offline
 
Join Date: May 2003
Location: U of I, Iowa
Posts: 846
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by EchoZA
If I add the code from the .xml in via phpmyadmin, as follows.

Code:
("CREATE TABLE IF NOT EXISTS " . TABLE_PREFIX . "bannersys_banners (
  bannerid int(10) NOT NULL auto_increment,
  bannername varchar(200) NOT NULL,
  bannerdesc varchar(250) NOT NULL,
  bannerurl varchar(250) NOT NULL,
  imgurl varchar(250) NOT NULL,
  bwidth mediumint(4) NOT NULL,
  bheight mediumint(4) NOT NULL,
  status tinyint(1) NOT NULL default '1',
  PRIMARY KEY (bannerid)
) 
");
I get the following error,

Code:
#1064 - You have an error in your SQL syntax near '("CREATE TABLE IF NOT EXISTS " . TABLE_PREFIX . "bannersys_banners (
  bannerid' at line 1
Please could I have some help, I'm a little new at this
because you didn't get the database table right.
try:
PHP Code:
CREATE TABLE IF NOT EXISTS bannersys_banners (
  
bannerid int(10NOT NULL auto_increment,
  
bannername varchar(200NOT NULL,
  
bannerdesc varchar(250NOT NULL,
  
bannerurl varchar(250NOT NULL,
  
imgurl varchar(250NOT NULL,
  
bwidth mediumint(4NOT NULL,
  
bheight mediumint(4NOT NULL,
  
status tinyint(1NOT NULL default '1',
  
PRIMARY KEY (bannerid)

and if you have table prefix, add it before the table name.
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 01: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.04963 seconds
  • Memory Usage 2,334KB
  • Queries Executed 25 (?)
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
  • (5)bbcode_code
  • (1)bbcode_html
  • (2)bbcode_php
  • (4)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)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