Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.6 > vBulletin 3.6 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Banner Rotator (Definitive Mod) **UPDATED** Details »»
Banner Rotator (Definitive Mod) **UPDATED**
Version: 1.00B, by andrefedalto andrefedalto is offline
Developer Last Online: Feb 2016 Show Printable Version Email this Page

Category: Miscellaneous Hacks - Version: 3.6.4 Rating:
Released: 12-13-2006 Last Update: 12-14-2006 Installs: 411
DB Changes Uses Plugins Template Edits
Is in Beta Stage  
No support by the author.

New version of https://vborg.vbsupport.ru/showthread.php?t=103477 with minor bugs fixed and added some additions people requested.

So, what does this hack do?
- This mod allows you to add lots of forum banners.
- The banners will be automatically randomized everytime you reload your forums.

How can i work with it?
- It's all controlable through AdminCP.
- NOT NEEDED ftp access to upload banners.
- You CAN upload banners (jpg, gif & png) through AdminCP.
- NEW: You can upload flash (SWF) banners!
- You can set a description for individual banners.
- NEW: You can set size (width & height) for each banner individually
- You can edit the description easily and individually.
- You can delete the banners through AdminCP (this function delete the banner from the ftp)
- You can activate/deactivate you banners.
- Deactivated banners remains in the ftp, but will not be shown on forum home.

Future additions: Add URL for each banner individually, so when users click on it they will be redirected.
How can i install? (Time to install: 1 minute if you are fast enough )
- Upload all the files contained in the "upload" folder inside the zip to your forum root directory.
- Install product-brotator.
- Go to your AdminCP > Style Manager > YOUR SKIN > Edit HEADER template and find:
Code:
<img src="$stylevar[titleimage]" border="0" alt="$vboptions[bbtitle]" />
replace to:
Code:
$banner
- Refresh your admincp index and Banner Rotator menu should appear!

Please, I updated and added new features of this mod in this afternoon, so probably it still have some bugs. So, if you find one please report here.

Thanks!

NOTE: Maybe some of you will have to create folder called "banners" inside folder "images" manually, and then chmod it 0777.

SUPPORT GIVEN ONLY FOR WHO CLICKED "INSTALL"

Show Your Support

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

Comments
  #102  
Old 04-27-2007, 02:13 AM
Vric Vric is offline
 
Join Date: Jul 2004
Posts: 11
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

installed with the link hack and it work wonder. Thanks !
Reply With Quote
  #103  
Old 04-29-2007, 12:59 AM
MPDesignZ MPDesignZ is offline
 
Join Date: Feb 2007
Location: Daytona Beach, FL
Posts: 146
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by WarLion View Post
actually i need that and i made it

find in product-rotator.xml

PHP Code:
CREATE TABLE `". TABLE_PREFIX ."banners` (
                      `
bidsmallint(20UNSIGNED NOT NULL auto_increment,
                      `
namevarchar(255NOT NULL default '',
                      `
widthvarchar(255NOT NULL default '',
                      `
heightvarchar(255NOT NULL default '',
                      `
altvarchar(255NOT NULL default '',
                      `
urlvarchar(255NOT NULL default '',
                      `
flashINT(1UNSIGNED NOT NULL default '0',
                      `
activeINT(1UNSIGNED NOT NULL default '0',
                      
PRIMARY KEY  (`bid`)
                    )
                
"); 
and remplace with this
PHP Code:
CREATE TABLE `". TABLE_PREFIX ."banners` (
                      `
bidsmallint(20UNSIGNED NOT NULL auto_increment,
                      `
namevarchar(255NOT NULL default '',
                      `
widthvarchar(255NOT NULL default '',
                      `
heightvarchar(255NOT NULL default '',
                      `
altvarchar(255NOT NULL default '',
                      `
urlvarchar(255NOT NULL default '',
                      `
linkvarchar(255NOT NULL default '',
                      `
flashINT(1UNSIGNED NOT NULL default '0',
                      `
activeINT(1UNSIGNED NOT NULL default '0',
                      
PRIMARY KEY  (`bid`)
                    )
                
"); 
then find
PHP Code:
} else {
        
$banner =     "<center><img src='" $vbulletin->options[bburl] . $defaultdir "/" $ban['name'] . "' alt='" $ban['alt'] . "' width='".$ban['width']."' height='".$ban['height']."' border='0'></center>";            
    } 
and remplace with
PHP Code:
} else {
        
$banner =     "<a href='".$ban['link']."'><img src='" $vbulletin->options[bburl] . $defaultdir "/" $ban['name'] . "' alt='" $ban['alt'] . "' width='".$ban['width']."' height='".$ban['height']."' border='0'></a>";            
    } 
now you need to add this about line 89
PHP Code:
<phrase name="setting_brotator_default_link_desc" date="1166036111" username="FileWarez" version="1.0b"><![CDATA[Defalt link]]></phrase
and
PHP Code:
<phrase name="setting_brotator_default_link_title" date="1166036111" username="FileWarez" version="1.0b"><![CDATA[Default link]]></phrase
save and import

now you need to edit the admincp/brotator.xml

on line 30 add this
PHP Code:
print_input_row('Link''link'$vbulletin->options['brotator_default_link']); 
find this
PHP Code:
if ($movefile) {
            
$db->query_write("INSERT INTO " TABLE_PREFIX "banners (bid, name, width, height, alt, flash, active) VALUES ('', '$fname', '$_POST[width]', '$_POST[height]', '$_POST[alt]', '$_POST[flash]', '$_POST[active]')");
            
print_cp_message($vbphrase['brotator_add_success'], "brotator.php?do=add""1");
        } else {
            
print_cp_message("There was an error while moving your file. Please retry.");
        } 
and remplace with this
PHP Code:
if ($movefile) {
            
$db->query_write("INSERT INTO " TABLE_PREFIX "banners (bid, name, width, height, link, alt, flash, active) VALUES ('', '$fname', '$_POST[width]', '$_POST[height]', '$_POST[link]', '$_POST[alt]', '$_POST[flash]', '$_POST[active]')");
            
print_cp_message($vbphrase['brotator_add_success'], "brotator.php?do=add""1");
        } else {
            
print_cp_message("There was an error while moving your file. Please retry.");
        } 
find this
PHP Code:
if (!empty($_POST['bid'])) {
            
$db->query("UPDATE " TABLE_PREFIX "banners SET 
                alt = '
$_POST[alt]',
                width = '
$_POST[width]',
                height = '
$_POST[height]',
                flash = '
$_POST[flash]'  
            WHERE bid = '
$_POST[bid]'");
            
print_cp_message($vbphrase['brotator_edit_desc_success'], "brotator.php?do=edit""1");
        } 
remplace with this
PHP Code:
if (!empty($_POST['bid'])) {
            
$db->query("UPDATE " TABLE_PREFIX "banners SET 
                alt = '
$_POST[alt]',
                width = '
$_POST[width]',
                height = '
$_POST[height]',
                link = '
$_POST[link]',
                flash = '
$_POST[flash]'  
            WHERE bid = '
$_POST[bid]'");
            
print_cp_message($vbphrase['brotator_edit_desc_success'], "brotator.php?do=edit""1");
        } 
find this
PHP Code:
                print_cells_row(array(
                    
"<center>".$img."</center>",
                    
"<form name='form1' method='post' action='brotator.php?do=edit'>
                    <input type='text' class='bginput' name='alt' value='
$banner[alt]' class='bginput' size='35'><br><br>
                    Width: <input type='text' class='bginput' name='width' value='
$banner[width]' class='bginput' size='5'> 
                    Height: <input type='text' class='bginput' name='height' value='
$banner[height]' class='bginput' size='5'><br><br>
                    Flash? <label for='flash"
.$banner[bid]."' class='smallfont'><input name='flash' id='flash".$banner[bid]."' type='checkbox' value='1' ".$checked."><strong>Yes</strong></label>
                    <input type='hidden' name='bid' value='
$banner[bid]'>
                    <input type='hidden' name='update' value='1'>
                    <input type='submit' name='Submit' value='  "
.$vbphrase['brotator_edit_update']."  ' class='button'>
                    </form>"
,
                    
$active 
and remplaze with this
PHP Code:
                print_cells_row(array(
                    
"<center>".$img."</center>",
                    
"<form name='form1' method='post' action='brotator.php?do=edit'>
                    <input type='text' class='bginput' name='alt' value='
$banner[alt]' class='bginput' size='35'><br>
                    Link : <input type='text' class='bginput' name='link' value='
$banner[link]' class='bginput' size='28'><br>
                    Width: <input type='text' class='bginput' name='width' value='
$banner[width]' class='bginput' size='5'> 
                    Height: <input type='text' class='bginput' name='height' value='
$banner[height]' class='bginput' size='5'><br><br>
                    Flash? <label for='flash"
.$banner[bid]."' class='smallfont'><input name='flash' id='flash".$banner[bid]."' type='checkbox' value='1' ".$checked."><strong>Yes</strong></label>
                    <input type='hidden' name='bid' value='
$banner[bid]'>
                    <input type='hidden' name='update' value='1'>
                    <input type='submit' name='Submit' value='  "
.$vbphrase['brotator_edit_update']."  ' class='button'>
                    </form>"
,
                    
$active 
save and overwrite

with this you can edit the link too
and thats all works for me on vb 3.6.4


Worked perfectly! Thanks

MP
Reply With Quote
  #104  
Old 05-05-2007, 05:36 PM
juan71287 juan71287 is offline
 
Join Date: Dec 2003
Location: New York
Posts: 194
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hey, I have the STYLE/SKIN Enlighten. Now, the banner is located in the Main CSS. This is how it looks:
HTML Code:
#logo {
background: url(enlighten/misc/header_logo.gif);
width: 197px;
height: 102px; 
float: left;
	margin: 0;
	padding: 0; 
}
How would I be able to make the banner rotate with the other banners I made?
Reply With Quote
  #105  
Old 05-14-2007, 04:32 PM
snakes1100 snakes1100 is offline
 
Join Date: Dec 2001
Location: Michigan
Posts: 3,733
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quick note for ppl that want the banner to open in a new window.

In product-rotator.xml:

Replace:
Code:
} else {
        $banner =     "<center><img src='" . $vbulletin->options[bburl] . $defaultdir . "/" . $ban['name'] . "' alt='" . $ban['alt'] . "' width='".$ban['width']."' height='".$ban['height']."' border='0'></center>";            
    }
Replace with:
Code:
} else {
        $banner =     "<center><a href='".$ban['link']."' target='_blank'><img src='" . $vbulletin->options[bburl] . $defaultdir . "/" . $ban['name'] . "' alt='" . $ban['alt'] . "' width='".$ban['width']."' height='".$ban['height']."' border='0' target='_blank'></a></center>";            
    }
or

In the plugin "Banner Rotator Generator" after its installed:


Replace:
Code:
} else {
        $banner =     "<center><img src='" . $vbulletin->options[bburl] . $defaultdir . "/" . $ban['name'] . "' alt='" . $ban['alt'] . "' width='".$ban['width']."' height='".$ban['height']."' border='0'></center>";            
    }
Replace with:
Code:
} else {
        $banner =     "<center><a href='".$ban['link']."' target='_blank'><img src='" . $vbulletin->options[bburl] . $defaultdir . "/" . $ban['name'] . "' alt='" . $ban['alt'] . "' width='".$ban['width']."' height='".$ban['height']."' border='0' target='_blank'></a></center>";            
    }


Also i'd like to thank both andrefedalto (for the addon) & warlion (for the modification)

Note:
Warlion removed the center tags, i added them back, if you dont want the banner to automagically center, remove the center tags from the code.

Anthony
Reply With Quote
  #106  
Old 05-21-2007, 10:53 AM
tmwamw tmwamw is offline
 
Join Date: May 2007
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi there

I dont want to appear thick BUT I installed banner rotator, and it looked to work fine...

However - the banners go no where - they are just images. How do you add the URL the banner is suppoed to go to?

In edit banner on the mod you can out Alt text, change size etc, but what about the hyperlink?

No point having a banner rotator that just shows nice images, or have I just missed something out?

Please advise...... thanks.
Reply With Quote
  #107  
Old 05-23-2007, 10:27 PM
Stop Stop is offline
 
Join Date: Oct 2005
Location: Riyadh
Posts: 114
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I did the edits WarLion suggested,Here, to be able to add links to the banners but it seems that I missed up in something..

Can somebody please upload the modified version ..

Thanks in advanced..
Reply With Quote
  #108  
Old 06-04-2007, 12:38 AM
Mrdby Mrdby is offline
 
Join Date: Mar 2007
Location: Hades
Posts: 1,298
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Can This Be Linked To Another Page With All The Uploaded Banners?
Reply With Quote
  #109  
Old 06-05-2007, 09:06 PM
phill2003 phill2003 is offline
 
Join Date: Apr 2003
Posts: 217
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Marked as installed thanks. I have to say I would not have installed it but for the other user posting the fix to allow linked banners, Might be worth while putting him in the credits and having the code incorporated to the stock hack.
Reply With Quote
  #110  
Old 06-07-2007, 08:46 AM
kenblat kenblat is offline
 
Join Date: Sep 2006
Posts: 4
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I have installed it and it works great. But when using IE i cannot highlight any words on it and plus mouse's autoscroll too. I think it cannot handle with js.

In FF, it's ok. Moreover, how this mod rotates my banners?
Reply With Quote
  #111  
Old 06-09-2007, 09:26 AM
phill2003 phill2003 is offline
 
Join Date: Apr 2003
Posts: 217
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This does not delete the image from the server, So if you have a banner with the name of 'comp.png' then delete it and try to start a new banner campaign with a different banner called 'comp.png' it uses the old banner.

I had to go and delete the banner from the server manually.
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 04:23 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.06250 seconds
  • Memory Usage 2,411KB
  • 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
  • (6)bbcode_code
  • (1)bbcode_html
  • (13)bbcode_php
  • (1)bbcode_quote
  • (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