vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=194)
-   -   Miscellaneous Hacks - Banner Rotator (Definitive Mod) **UPDATED** (https://vborg.vbsupport.ru/showthread.php?t=133954)

andrefedalto 12-13-2006 10:00 PM

Banner Rotator (Definitive Mod) **UPDATED**
 
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"

Shazz 12-13-2006 11:36 PM

Looks very nice :)
The 3.5 version of this was my fav. back then

AMG021 12-13-2006 11:51 PM

Nice

Barakat 12-14-2006 12:01 AM

so nice ....

Barakat 12-14-2006 12:23 AM

emmm while uploading a simple banner in ext. of jpg or png it gives this

The selected file type is not allowed.

Dante_elitE 12-14-2006 08:22 AM

Muito obrigado, esse hack ? muito bom, como eu lhe disse no MSN vai ajudar muita gente.

English :
Very obliged, this hack is very good, as I said to it in the MSN I go to help much people.

radarhunter 12-14-2006 09:14 AM

has someone installed this on their website if yes can we please see it`s working ???????

as how it will look on the site is not shown in the screenie that author has given :D

projectego 12-14-2006 09:19 AM

Awesome. Thanks!

andrefedalto 12-14-2006 09:36 AM

Quote:

Originally Posted by Barakat (Post 1138158)
emmm while uploading a simple banner in ext. of jpg or png it gives this

The selected file type is not allowed.

I changed a thing in the brotator.php. Please redownload the pack and replace your brotator.php that is in admincp folder for the one in the zip file. Now when you get the error that file type is not allowed, it will also show the type of the file, so you copy it, go to vBulletin Options in AdminCP, find "Banner Rotator" and then add the new extension there. That should work. If not, report here again please :)

Quote:

Originally Posted by radarhunter (Post 1138366)
has someone installed this on their website if yes can we please see it`s working ???????

as how it will look on the site is not shown in the screenie that author has given :D

Sorry, my mistake. Check here to see how it looks in the website:
https://vborg.vbsupport.ru/attachmen...chmentid=57595
Everytime you refresh or change the page, the banner will be replaced by other randomly.

Tuga?? 12-14-2006 02:43 PM

in my one i dont find

PHP Code:

<img src="$stylevar[titleimage]border="0" alt="$vboptions[bbtitle]/> 

any help ?
thank you

PHP Code:

<META http-equiv=Page-Exit content=BlendTrans(Duration=0)>
<
META http-equiv=Page-Enter content=BlendTrans(Duration=0)>
<
script type="text/javascript" src="snow.js"></script>
<!-- 
logo -->
<
a name="top"></a>
<
center>
<
table border="0" width="100%" cellpadding="0" cellspacing="0" align="center" background="$stylevar[imgdir_misc]/head_back.gif">
<
tr>
<
td valign="top" width="965"><a href="$vboptions[forumhome].php$session[sessionurl_q]"><img src="$stylevar[imgdir_misc]/head_left.gif" width="965" border="0"></a></td>
</
tr>
</
table>
</
center>

<!-- /
logo -->
<!-- 
Navigation bar -->
    <
table width="100%" style="background-image:url($stylevar[imgdir_misc]/nav.jpg)" align="center" border="0" cellpadding="0" cellspacing="0">
    <
tr>
    <
td align="left" valign="top" height="87">
        
<
table width="50%"  align="center" border="0" cellspacing="0" cellpadding="0">
  <
tr>
               <
td align="left" valign="top" width="100" height="87"><a href="$vboptions[forumhome].php$session[sessionurl_q]accesskey="1"><img src="$stylevar[imgdir_misc]/nav_home.jpg" width="100" height="87" border="0" alt="" /></a></td>
                <if 
condition="$show['registerbutton']">
        <
td width="100" height="87"><a href="register.php$session[sessionurl_q]rel="nofollow"><img src="$stylevar[imgdir_misc]/nav_reg.jpg" width="100" height="87" border="0" alt="" /></a></td>
        <else />
        <
td width="100" height="87"  id="usercptools"><a href="$show[nojs_link]#usercptools"><img src="$stylevar[imgdir_misc]/nav_link.jpg" width="100" height="87" border="0" alt="" /></a><script type="text/javascript"vbmenu_register("usercptools" ,1); </script></td>
        </if>
        <
td align="left" valign="top" width="100" height="87"><a href="memberlist.php$session[sessionurl_q]"><img src="$stylevar[imgdir_misc]/nav_member.jpg" width="100" height="87" border="0" alt="" /></a></td>
        <
td align="left" valign="top" width="100" height="87"><a href="usercp.php$session[sessionurl_q]"><img src="$stylevar[imgdir_misc]/nav_usercp.jpg" width="100" height="87" border="0" alt="" /></a></td>
        <
td align="left" valign="top" width="100" height="87"><a href="calendar.php$session[sessionurl_q]"><img src="$stylevar[imgdir_misc]/nav_cal.jpg" width="100" height="87" border="0" alt="" /></a></td>
        <
td align="left" valign="top" width="100" height="87" id="navbar_search"><a href="search.php$session[sessionurl_q]accesskey="4" rel="nofollow"><img src="$stylevar[imgdir_misc]/nav_search.jpg" width="100" height="87" border="0" alt="" /></a><script type="text/javascript"vbmenu_register("navbar_search" ,1); </script></td>
        <
td align="left" valign="top" width="100" height="87"><a href="faq.php$session[sessionurl_q]accesskey="5"><img src="$stylevar[imgdir_misc]/nav_faq.jpg" width="100" height="87" border="0" alt="" /></a></td>
    
  </
tr>
</
table>
        </
td>
    </
tr>
</
table>

<if 
condition="$show['popups']">
<!-- 
NAVBAR POPUP MENUS -->
    
    <if 
condition="$show['searchbuttons']">
    <!-- 
header quick search form -->
<
div class="vbmenu_popup" id="navbar_search_menu" style="display:none">
<
form action="search.php?do=process" method="post">
<
table cellpadding="4" cellspacing="1" border="0">
<
tr>
<
td class="thead">$vbphrase[search_forums]</td>
</
tr>
<
tr>
<
td class="vbmenu_option" title="nohilite">
<
input type="hidden" name="do" value="process" />
<
input type="hidden" name="quicksearch" value="1" />
<
input type="hidden" name="s" value="$session[sessionhash]/>
<
div><input type="text" class="bginput" name="query" size="25" tabindex="1001" /><input type="submit" class="button" value="$vbphrase[go]tabindex="1004" /></div>
</
td>
</
tr>
<
tr>
<
td class="vbmenu_option" title="nohilite">
<
label for="rb_nb_sp0"><input type="radio" name="showposts" value="0" id="rb_nb_sp0" tabindex="1002" checked="checked" />$vbphrase[show_threads]</label>
&
nbsp;
<
label for="rb_nb_sp1"><input type="radio" name="showposts" value="1" id="rb_nb_sp1" tabindex="1003" />$vbphrase[show_posts]</label>
</
td>
</
tr>
<
tr>
<
td class="vbmenu_option"><a href="search.php$session[sessionurl_q]accesskey="4" rel="nofollow">$vbphrase[advanced_search]</a></td>
</
tr>
<if 
condition="$show['member']"
<
tr>
<
td class="vbmenu_option"><a href="search.php?$session[sessionurl]do=getnew" accesskey="2">$vbphrase[new_posts_nav]:</a></td>
</
tr
<else /> 
<
tr>
<
td class="vbmenu_option"><a href="search.php?$session[sessionurl]do=getdaily" accesskey="2">$vbphrase[todays_posts]:</a></td>
</
tr>
</if>
</
table>
</
form>
</
div>
<!-- / 
header quick search form -->
    </if>

    <if 
condition="$show['member']">
    <!-- 
user cp tools menu -->
    <
div class="vbmenu_popup" id="usercptools_menu" style="display:none">
        <
table cellpadding="4" cellspacing="1" border="0">
        
        <
tr><td class="thead">$vbphrase[quick_links]</td></tr>        
        <if 
condition="$vboptions['enablesearches']"><tr><td class="vbmenu_option"><a href="search.php?$session[sessionurl]do=getdaily">$vbphrase[todays_posts]</a></td></tr></if>
        <
tr><td class="vbmenu_option"><a href="forumdisplay.php?$session[sessionurl]do=markread">$vbphrase[mark_forums_read]</a></td></tr>
        <
tr><td class="vbmenu_option"><a href="#" onclick="window.open('misc.php?$session[sessionurl]do=buddylist&amp;focus=1','buddylist','statusbar=no,menubar=no,toolbar=no,scrollbars=yes,resizable=yes,width=250,height=300'); return false;">$vbphrase[open_buddy_list]</a></td></tr>
                
        <
tr><td class="thead"><a href="usercp.php$session[sessionurl_q]">$vbphrase[user_control_panel]</a></td></tr>
        <if 
condition="$show['siglink']"><tr><td class="vbmenu_option"><a href="profile.php?$session[sessionurl]do=editsignature">$vbphrase[edit_signature]</a></td></tr></if>
        <!--<if 
condition="$show['avatarlink']"><tr><td class="vbmenu_option"><a href="profile.php?$session[sessionurl]do=editavatar">$vbphrase[edit_avatar]</a></td></tr></if>-->
        <
tr><td class="vbmenu_option"><a href="profile.php?$session[sessionurl]do=editprofile">$vbphrase[edit_profile]</a></td></tr>
        <
tr><td class="vbmenu_option"><a href="profile.php?$session[sessionurl]do=editoptions">$vbphrase[edit_options]</a></td></tr>
        
        <
tr><td class="thead">$vbphrase[miscellaneous]</td></tr>
        <if 
condition="$show['pmstats']"><tr><td class="vbmenu_option"><a href="private.php$session[sessionurl_q]rel="nofollow">$vbphrase[private_messages]</a></td></tr></if>
        <
tr><td class="vbmenu_option"><a href="subscription.php$session[sessionurl_q]rel="nofollow">$vbphrase[subscribed_threads]</a></td></tr>
        <
tr><td class="vbmenu_option"><a href="member.php?$session[sessionurl]u=$bbuserinfo[userid]">$vbphrase[my_profile]</a></td></tr>
        <if 
condition="$show['wollink']"><tr><td class="vbmenu_option"><a href="online.php$session[sessionurl_q]">$vbphrase[whos_online]</a></td></tr></if>
        
        </
table>
    </
div>
    <!-- / 
user cp tools menu -->
    </if>
<!-- / 
NAVBAR POPUP MENUS -->

<!-- 
PAGENAV POPUP -->

    <
div class="vbmenu_popup" id="pagenav_menu" style="display:none">
        <
table cellpadding="4" cellspacing="1" border="0">
        <
tr>
            <
td class="thead" nowrap="nowrap">$vbphrase[go_to_page]</td>
        </
tr>
        <
tr>
            <
td class="vbmenu_option" title="nohilite">
            <
form action="$vboptions[forumhome].php" method="get" onsubmit="return this.gotopage()" id="pagenav_form">
                <
input type="text" class="bginput" id="pagenav_itxt" style="font-size:11px" size="4" />
                <
input type="button" class="button" id="pagenav_ibtn" value="$vbphrase[go]/>
            </
form>
            </
td>
        </
tr>
        </
table>
    </
div>

<!-- / 
PAGENAV POPUP -->
</if>
<!-- / 
Navagation bar -->

<!-- 
content table -->
$spacer_open

$_phpinclude_output
$marquee 


andrefedalto 12-14-2006 03:54 PM

Tuga: Giveme your forum address please

Barteken 12-14-2006 06:16 PM

does this hack also handle javascript? because i have a pool with banners at tradedoubler...

PoetJA-1975 12-15-2006 03:45 AM

Quote:

Originally Posted by Barteken (Post 1138610)
does this hack also handle javascript? because i have a pool with banners at tradedoubler...

Good question! I'd like this to work for google scripts and others...
ALSO - I assume that the $banner can be placed anywhere in say the navbar template?

Looks nice though - Thanx for the share!

Jacquii.

andrefedalto 12-15-2006 10:23 AM

Sorry, this handles only images (jpg, png, gif...) and flash (swf).

PoetJA-1975: Yes, it will show the images/flash wherever you place $banner ;)


Don't forget to click install!

Barakat 12-15-2006 10:29 AM

still have the same bug while trying to upload a banner with ext. jpeg or png .

The selected file type is not allowed.

Darat 12-15-2006 11:55 AM

Quote:

Originally Posted by Barakat (Post 1139064)
still have the same bug while trying to upload a banner with ext. jpeg or png .

The selected file type is not allowed.

I've got the same bug - the banners folder is there, chmod'd to 777, the types are defined in the settings but all uploads return an error saying "The selected file type is not allowed. image/gif"

Attitude 12-15-2006 12:06 PM

Invalid SQL:
UPDATE banners SET active = '1' WHERE bid = '1';

MySQL Error : Table 'mydatabasename.banners' doesn't exist
Error Number : 1146

my table prefix is not mydatabasename though it is testvb

cant figure out what to do ?

NFLfbJunkie 12-15-2006 03:08 PM

When trying to edit/update or deactivate banner, the following message occurs:

Database error in vBulletin 3.6.4:

Invalid SQL:
UPDATE banners SET active = '0' WHERE bid = '1';

MySQL Error : Table 'databasename_forums.banners' doesn't exist
Error Number : 1146

andrefedalto 12-15-2006 04:24 PM

Barakat: Download and put the newest brotator.php in admincp folder. When the error appears, it must show the file type like it did with Darat, that showed "image/gif"

Darat: Go to vBulletin Options, Banner Rotator and add this "image/gif" to file types allowed. Dont forget to put | between file types.

Attitude & Junkie: It was my mistake. I forgot to add table prefix in some queries. Everything is ok now. Please download the zip file again and replace ONLY /admincp/brotator.php in your host. Thanks for reporting the bugs!

Please post here again if it works, and dont forget to click install!

phovanxua 12-15-2006 04:46 PM

Thanks very much ....this is look kick ass .

NFLfbJunkie 12-15-2006 07:47 PM

Everything is working now; thanks. One other thing. How can I get my banner the same width as the forum width. For the default theme, that would be from the white area from the left to the right - I guess this is the "Main Table Width". When I change the table width to the same width of the banner, the banner is not centered, so it has the appearance of it being off-centered. Any hints?

NFLfbJunkie 12-15-2006 09:40 PM

I installed this MOD at work on my work computer and everything was okay. I come home and nothing is working on my computer. The banner I created does not show on the forum home page and the banner does not show in the admincp when going to edit the banner. Is this a browser issuer? I have IE7.

Rick 12-16-2006 01:34 AM

Nice hack, but I need one more feature before I can use it. I need to be able to determine the "weight" of each banner so that some can be shown once per rotation, others once every other rotation etc...

Any chance of adding that in a future version?

Aeolian 12-16-2006 02:26 AM

Hello there
Very handy addon but i wanna keep my forum image along with banner, kinda like.. http://forum.vbulletinsetup.com/
how do i achieve that with this mod?

thanks

andrefedalto 12-19-2006 11:46 PM

Quote:

Originally Posted by Junkie (Post 1139338)
Everything is working now; thanks. One other thing. How can I get my banner the same width as the forum width. For the default theme, that would be from the white area from the left to the right - I guess this is the "Main Table Width". When I change the table width to the same width of the banner, the banner is not centered, so it has the appearance of it being off-centered. Any hints?

Try adding $banner between <center></center> tags. Or if its in a table, add "align=center" to the line/column.

Quote:

Originally Posted by Junkie (Post 1139424)
I installed this MOD at work on my work computer and everything was okay. I come home and nothing is working on my computer. The banner I created does not show on the forum home page and the banner does not show in the admincp when going to edit the banner. Is this a browser issuer? I have IE7.

Did you check if "banner" folder was created inside images folder? Do the script has permission to read/write from the folder?

Quote:

Originally Posted by Rick (Post 1139517)
Nice hack, but I need one more feature before I can use it. I need to be able to determine the "weight" of each banner so that some can be shown once per rotation, others once every other rotation etc...

Any chance of adding that in a future version?

I dont see that feature being added in the future. Sorry, if you can do that, feel free to edit my modification and then release it here ;)

Quote:

Originally Posted by Aeolian (Post 1139540)
Hello there
Very handy addon but i wanna keep my forum image along with banner, kinda like.. http://forum.vbulletinsetup.com/
how do i achieve that with this mod?

thanks

Instead of replacing your forum banner to the code "$banner", you just need to place "$banner" wherever you want and dont remove your main banner code.

Talisman 12-20-2006 12:36 AM

Quote:

Originally Posted by Rick (Post 1139517)
Nice hack, but I need one more feature before I can use it. I need to be able to determine the "weight" of each banner so that some can be shown once per rotation, others once every other rotation etc...

As a temporary solution until someone here comes up with the code for that, this would do it if an approximate weight that's still random would work for you. This is a very cumbersome and somewhat annoying way to do this, but it'll swap them out closer to what you want .. while you're waiting:

Just upload multiple copies of the same image you want shown more frequently and just a single copy of the headings.

1. Banner 1a
2. Banner 1b
3. Banner 1c
4. Banner 2
5. Banner 3
6. Banner 4
7. Banner 5a
8. Banner 5b
9. Banner 5c
10. Banner 6

Banner 1 will appear (approximately) 30% of the time. Banner 5 will be there 20% of the time. And the remaining 4 banners just 10%.

Thank you so much for the hack, andrefedalto! :bunny:

NFLfbJunkie 12-20-2006 12:36 PM

Quote:

Originally Posted by Junkie
I installed this MOD at work on my work computer and everything was okay. I come home and nothing is working on my computer. The banner I created does not show on the forum home page and the banner does not show in the admincp when going to edit the banner. Is this a browser issuer? I have IE7.

Did you check if "banner" folder was created inside images folder? Do the script has permission to read/write from the folder?
The banner folder is in the images folder correctly with 777 mod. The banner shows up at work on IE6, but not on home cpu with IE7.

djawir 12-22-2006 11:14 AM

The selected file type is not allowed. image/gif

aerogear2002 12-25-2006 09:07 AM

the root folder is that the www folder

Frimon86 01-02-2007 10:30 PM

Cool mod!

Cobro 01-08-2007 01:50 AM

Database error in vBulletin 3.6.4:

Invalid SQL:
SELECT * FROM vbulletinbanners ORDER BY bid DESC;

MySQL Error : Table 'homepage_vb.vbulletinbanners' doesn't exist
Error Number : 1146
Date : Sunday, January 7th 2007 @ 08:47:20 PM
Script : http://forum.homepage.net/admincp/br....php?do=delete
Referrer : http://forum.homepage.net/admincp/index.php?do=nav
IP Address : xxx.xxx.xxx.xx
Username : libre
Classname : vb_database

:confused: some help plz

KURTZ 01-08-2007 02:43 AM

reserved for future use :)

Cobro 01-08-2007 06:57 PM

:confused: what are you talking about ?? reserved for later ??????

MediaMisfit 01-10-2007 07:40 PM

Anyways that we can make the banners linkable??? That would be cool.

Cove_new 01-14-2007 06:07 PM

This mod is rather nicem, but...
1) No gif support - i tried to edit options - no resault
2) Need a field with link, so it can be used with flash only

Immortal_Shades 01-16-2007 05:04 PM

I uploaded a flash banner a.k.a SWF but not only is not long enough.
(Where can I change banner size/hard core?) But it just doesn't appear at all and all I get is a black box with a Red X.

krazycivik 01-20-2007 07:01 PM

how do i add banners?? i install it but now what cant find anything

Thechipleaders 01-23-2007 02:48 AM

I keep getting the following error. Can anyone help? The error goes for any file type nust just a gif

The selected file type is not allowed. image/gif

Thechipleaders 01-25-2007 03:05 PM

bump

still hoping for some help. This program sounds Great!!!

mktrilogy 02-02-2007 05:02 AM

I think its the skin im using, i cant seem to find the
Code:

<img src="$stylevar[titleimage]" border="0" alt="$vboptions[bbtitle]" />


All times are GMT. The time now is 06:32 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.01678 seconds
  • Memory Usage 1,990KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_code_printable
  • (2)bbcode_php_printable
  • (10)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete