Version: 1.02, by AnhTuanCool
Developer Last Online: Sep 2006
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.
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
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");
// 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");
@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
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).
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.