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
  #222  
Old 07-15-2006, 10:21 PM
BTTF.com BTTF.com is offline
 
Join Date: Jun 2005
Location: BTTF.com
Posts: 13
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by BTTF.com
It also supposedly supports Flash, but I've found that the code doesn't support Flash on IE -- just Netscape.
Nevermind -- they've got it working now for IE.
Reply With Quote
  #223  
Old 07-17-2006, 08:59 AM
rluna559 rluna559 is offline
 
Join Date: Jul 2006
Posts: 14
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Heres how to show banners within the header of your forums and how to get it to work to show correctly on your CMPS page.

First replace all the content of the Banner System plugin (at global_start hook) with this code below:

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);

	$searchtext = '<!-- / banner ads -->';
	$vbulletin->templatecache['header'] = str_replace($searchtext,
	$searchtext.fetch_template('bannerads'), $vbulletin->templatecache['header']);

	$vbulletin->db->free_result($getads);
	unset($getads);
}
Then edit your header template and place the following code where you would like your banners to appear.

Code:
<!-- / banner ads -->
Lastly add banner.php to your Header Replacement settings in your CMPS settings.

Note if you want to place the banners within your footer, replace templatecache value from header to footer, add the code where you want to show your banners, then add banner.php to your Footer Replacement settings.

Thats it! Enjoy.

Also I'm having a problem of my own. The settings to edit banners does not show in the control panel. I only see the settings that you would see under banneradmin.php?do=settings .

If I want to edit my banners I have to manually enter the url to banneradmin.php?do=manage

Seems like the cpnav_bannersystem.xml file isn't working correctly for me. Anyone know how to fix this? I can't get around the problem with entering the urls myself but I rather be able to do it in the admin control panel.
Reply With Quote
  #224  
Old 07-21-2006, 02:54 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 rluna559
Also I'm having a problem of my own. The settings to edit banners does not show in the control panel. I only see the settings that you would see under banneradmin.php?do=settings .

If I want to edit my banners I have to manually enter the url to banneradmin.php?do=manage

Seems like the cpnav_bannersystem.xml file isn't working correctly for me. Anyone know how to fix this? I can't get around the problem with entering the urls myself but I rather be able to do it in the admin control panel.

Adding this codebit somewhere in includes/xml/cpnav_vbulletin.xml file:
Code:
<navgroup text="Banner System" hr="true" displayorder="35">
		<navoption displayorder="10">
			<text>Banner Settings</text>
			<link>banneradmin.php?do=settings</link>
		</navoption>
		<navoption displayorder="20">
			<text>Banner Manager</text>
			<link>banneradmin.php?do=manage</link>
		</navoption>
		<navoption displayorder="30">
			<text>Banner Stats</text>
			<link>banneradmin.php?do=stats</link>
		</navoption>	
	</navgroup>
Reply With Quote
  #225  
Old 07-21-2006, 06:42 PM
mix_boy mix_boy is offline
 
Join Date: May 2006
Posts: 7
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thenks man ... i click install ;p
Reply With Quote
  #226  
Old 07-23-2006, 01:32 PM
Distance's Avatar
Distance Distance is offline
 
Join Date: Jul 2006
Location: Boston, Uk
Posts: 725
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I have installed this hack fine but...

nobody can see them in ie ( internet explorer )


?????


Vb 3.5.4
CMPS 2.1

www.hullchat.co.uk
Reply With Quote
  #227  
Old 07-23-2006, 02:23 PM
Oap JTRipper Oap JTRipper is offline
 
Join Date: Oct 2004
Posts: 59
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

working fine for me

vb 3.6 rc2
vba 2.2

www.oapsquad.com/forums/

if your using custom themes have you done this
PHP Code:
Thishowevermay 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:

// 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);

Reply With Quote
  #228  
Old 07-24-2006, 11:50 AM
Distance's Avatar
Distance Distance is offline
 
Join Date: Jul 2006
Location: Boston, Uk
Posts: 725
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

yes i have

www.hullchat.co.uk

can anyone else see this in ie?
Reply With Quote
  #229  
Old 07-24-2006, 01:07 PM
Oap JTRipper Oap JTRipper is offline
 
Join Date: Oct 2004
Posts: 59
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i can see them

at the bottom of your page

both in firefox & ie
Reply With Quote
  #230  
Old 07-25-2006, 01:40 AM
rluna559 rluna559 is offline
 
Join Date: Jul 2006
Posts: 14
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I figured out what my problem was. I have bad eyes, I found where the banners can be edited.

On another note, I noticed that custom user groups the banner appears as a dot (at least for my site). The problem was fixed when I changed the banner links to open in a new window. If anyone is having problems viewing the banners, try changing the links to open in a new window.

Oh and you can see how mine is running at CaliberSRT4.net Forums
Reply With Quote
  #231  
Old 07-25-2006, 01:41 AM
burntire burntire is offline
 
Join Date: Jun 2006
Posts: 141
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is there a way to place the banner in the header area on the right side?
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 05:56 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.06195 seconds
  • Memory Usage 2,325KB
  • 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
  • (3)bbcode_code
  • (1)bbcode_html
  • (2)bbcode_php
  • (2)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