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
Banners & Ads System Details »»
Banners & Ads System
Version: 1.02, by AnhTuanCool AnhTuanCool is offline
Developer Last Online: Sep 2006 Show Printable Version Email this Page

Version: 3.0.5 Rating:
Released: 01-18-2005 Last Update: 01-27-2005 Installs: 108
DB Changes
 
No support by the author.

Banners & Ads System
---------------------------------
by AnhTuanCool

Fully Tested on vb 3.0.5

Description:
Banners & Ads System allows you to have a slot on every pages in your forum for showing banners and ads. Banners and ads in database will randomly pickout to show everytime new page is loaded. Admin options in admincp allow you to fully administrate your banners and ads.

Feautures:
- Show Random Banner or Ad on everypage
- Clickable Link (of course )

Admin Feautures:
- Master Switch on/off
- Fully Add/Edit/Delete Banners, Ads Factors (such as title, dimension, links, etc...)
- Enable/Disable Banners To Be Shown (if you set Disable to a banner, it will not show)
- Banner Template Layout Alterable
- Show Banner Anywhere on your global templates

Updates:
Jan 28th - Add update to display banner anywhere rather than the nav

Install Instruction and Screenshots:
See attachments.

If you find this hack useful, also get informed by any new release & update, please click INSTALL. Thanks,

Show Your Support

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

Comments
  #42  
Old 01-31-2005, 01:52 AM
Rastus Rastus is offline
 
Join Date: Jun 2004
Location: San Antonio, Texas
Posts: 30
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok... thanks I have it working now. I just switched from phpBB to Vbulletin and there are couple of minor differences in the control panel. :smoke:

thanks for your help
Reply With Quote
  #43  
Old 01-31-2005, 01:59 AM
LauraFL LauraFL is offline
 
Join Date: Jan 2005
Location: Florida
Posts: 39
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I have done the update. It is still not working for me.
Reply With Quote
  #44  
Old 01-31-2005, 02:32 AM
PAWS PAWS is offline
 
Join Date: Oct 2004
Posts: 4
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks for the reply but I get this error now:

Invalid SQL: SELECT title, html, url, type, status, width, height FROM banners WHERE status = '1' AND adid != ORDER BY RAND() LIMIT 1
mysql error: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'ORDER BY RAND() LIMIT 1' at line 1

mysql error number: 1064
Reply With Quote
  #45  
Old 01-31-2005, 03:33 AM
AnhTuanCool's Avatar
AnhTuanCool AnhTuanCool is offline
 
Join Date: Jul 2004
Location: Albuquerque
Posts: 263
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok, sorry for the inconvenience, please do this,
Select the whole thing you've added, REPLACE by this
PHP Code:
// Start banner rotating by Anhtuancool
if ($vboptions['enbanners'])
{
    
// select random banner and display it
    
$getbanner $DB_site->query_first("SELECT adid, title, html, url, type, status, width, height FROM " TABLE_PREFIX "banners WHERE status = '1' ORDER BY RAND() LIMIT 1");
    
    eval(
'$banner = "' fetch_template('banner') . '";');
    
$avoidid $getbanner['adid'];
    unset(
$getbanner);

    
// select random banner and display it secplace
    
$getbanner $DB_site->query_first("SELECT title, html, url, type, status, width, height FROM " TABLE_PREFIX "banners WHERE status = '1' AND adid != $avoidid ORDER BY RAND() LIMIT 1");
    
    eval(
'$banner2 = "' fetch_template('banner') . '";');
    unset(
$getbanner);
}
// End banner 
Thanks,
Reply With Quote
  #46  
Old 01-31-2005, 02:49 PM
PAWS PAWS is offline
 
Join Date: Oct 2004
Posts: 4
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Awesome work, thank you very much!
Reply With Quote
  #47  
Old 01-31-2005, 06:11 PM
Rastus Rastus is offline
 
Join Date: Jun 2004
Location: San Antonio, Texas
Posts: 30
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

the banners look fine in IE, but not in Firefox. here's a link http://www.texas4x4.org/index.php
Reply With Quote
  #48  
Old 01-31-2005, 06:44 PM
zurih zurih is offline
 
Join Date: Nov 2004
Location: Israel
Posts: 130
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

just a quicktip: to save 1 query on every page

Open global.php
FIND 'phpinclude_end',

Below ADD
'banner',

Reply With Quote
  #49  
Old 01-31-2005, 08:20 PM
AnhTuanCool's Avatar
AnhTuanCool AnhTuanCool is offline
 
Join Date: Jul 2004
Location: Albuquerque
Posts: 263
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

@PAWS - you're welcome

@Rastus - I looked your forum source code and I figured out that you want the banners to be centered. So you changed the default banner template a bit but you somehow missed and it just 'goes out of bound' If you want the banner to be center aligned, do this,
REPLACE your banner template with this
[html]
<!-- Banner Rotation by AnhTuanCool -->
<div class="smallfont" align="center">
<if condition="$getbanner[type] == 1">
<a href="$getbanner[url]" target="_blank"><img src="$getbanner[html]" width="$getbanner[width]" height="$getbanner[height]" alt="$getbanner[title]" border="0" align="center" /></a>
<else />
<OBJECT CLASSID="clsid27CDB6E-AE6D-11cf-96B8-444553540000" WIDTH="$getbanner[width]" HEIGHT="$getbanner[height]" CODEBASE="http://active.macromedia.com/flash6/cabs/">
<PARAM NAME="MOVIE" VALUE="$getbanner[html]">
<PARAM NAME="PLAY" VALUE="true">
<PARAM NAME="LOOP" VALUE="true">
<PARAM NAME="QUALITY" VALUE="high">
<embed src="$getbanner
HTML Code:
" width="$getbanner[width]" height="60" play="true" loop="true" quality="high" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></embed>
		</OBJECT>
	</if>
</div>
<!-- Banner Rotation by AnhTuanCool -->
Save

@zurih - thanks much for the tip, I'll consider adding it for the next version. Thanks,
Reply With Quote
  #50  
Old 02-01-2005, 05:07 PM
Beaux Beaux is offline
 
Join Date: Jan 2005
Posts: 3
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hey AnhTuanCool,
I'm a real rookie to PHP but I'm really excited about this mod. I'm was clipping along fine until i ran into step 5. I'm confused as to what to do. Do I make a new file with nothing else? If so, does it matter what I name it? Does this go into a specific file ( I don't see any file name).

Thanks for the hack and for your help.

Here is the instruction I'm confused with:


5. Add New Template

Title: banner

Template:

==================================

<!-- Banner Rotation by AnhTuanCool -->

<div class="smallfont" style="float:left">

<if condition="$getbanner[type] == 1">

<a href="$getbanner[url]" target="_blank"><img src="$getbanner[html]" width="$getbanner[width]" height="$getbanner[height]" alt="$getbanner[title]" border="0"/></a>

<else />

<OBJECT CLASSID="clsid27CDB6E-AE6D-11cf-96B8-444553540000" WIDTH="$getbanner[width]" HEIGHT="$getbanner[height]" CODEBASE="http://active.macromedia.com/flash6/cabs/">

<PARAM NAME="MOVIE" VALUE="$getbanner[html]">

<PARAM NAME="PLAY" VALUE="true">

<PARAM NAME="LOOP" VALUE="true">

<PARAM NAME="QUALITY" VALUE="high">

<embed src="$getbanner[html]" width="$getbanner[width]" height="60" play="true" loop="true" quality="high" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></embed>

</OBJECT>

</if>

</div>

<!-- Banner Rotation by AnhTuanCool -->

==================================
Reply With Quote
  #51  
Old 02-01-2005, 08:05 PM
AnhTuanCool's Avatar
AnhTuanCool AnhTuanCool is offline
 
Join Date: Jul 2004
Location: Albuquerque
Posts: 263
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I get what you say, here is how you Add New Template

Get in your AdminCP > Style Manager > Click on the drop-down menu next to the style title and cho Add New Template (see attachment for detail) and do as I described in the instruction.
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 10:39 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05238 seconds
  • Memory Usage 2,321KB
  • 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
  • (1)bbcode_html
  • (1)bbcode_php
  • (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
  • (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