vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Graveyard (https://vborg.vbsupport.ru/forumdisplay.php?f=224)
-   -   Rotating Banners in FORUMDISPLAY (https://vborg.vbsupport.ru/showthread.php?t=129623)

HMBeaty 10-20-2006 10:00 PM

Rotating Banners in FORUMDISPLAY
 
Ok, first off, of course, go to your admincp panel > styles and templates > style manager > open your style > edit the FORUMDISPLAY template.


In there, you will find:

HTML Code:

        <td class="vbmenu_control" id="forumsearch" nowrap="nowrap"><if condition="$show['quicksearch']"><a href="$show[nojs_link]#goto_forumsearch" rel="nofollow">$vbphrase[search_this_forum]</a> <script type="text/javascript"> vbmenu_register("forumsearch"); </script><else /><a href="search.php?$session[sessionurl]f=$foruminfo[forumid]" rel="nofollow">$vbphrase[search_this_forum]</a></if></td>
        </if>
</tr>
</table>

Directly AFTER that bit of code, add this:

HTML Code:

<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center" style="border-bottom-width:0px">
<td class="alt2" align="center">
<!-- Banner Rotator by Redline -->
<SCRIPT LANGUAGE="Javascript"><!--
function banner() {
};
banner = new banner();
number = 0;
// bannerArray
banner[number++] = "<a href='REDIRECT_URL' target='_blank'><img src='BANNER_URL' border='1'></a>"
banner[number++] = "<a href='REDIRECT_URL' target='_blank'><img src='BANNER_URL' border='1'></a>"
banner[number++] = "<a href='REDIRECT_URL' target='_blank'><img src='BANNER_URL' border='1'></a>"
banner[number++] = "<a href='REDIRECT_URL' target='_blank'><img src='BANNER_URL' border='1'></a>"

increment = Math.floor(Math.random() * number);

document.write(banner[increment]);
//-->
</SCRIPT>
</td></table>


PLEASE CLICK INSTALL IF YOU LIKE IT.

Online DEMO

ChavMagnet 10-21-2006 08:17 PM

Havnt you released this before mate? 1st post WOOT

HMBeaty 10-21-2006 08:39 PM

No. I've released SOMETHING like this but never this or anything in this template.

Jealousy10312 10-22-2006 02:57 PM

Thank you.

bluegum 10-23-2006 11:50 PM

did not work for me at all
?

HMBeaty 10-24-2006 12:08 AM

Do you have javascript disabled? Also, can you paste your code up so I can have a look?

bluegum 10-24-2006 10:13 AM

Code:

HTML Code:
        <td class="vbmenu_control" id="forumsearch" nowrap="nowrap"><if condition="$show['quicksearch']"><a href="$show[nojs_link]#goto_forumsearch" rel="nofollow">$vbphrase[search_this_forum]</a> <script type="text/javascript"> vbmenu_register("forumsearch"); </script><else /><a href="search.php?$session[sessionurl]f=$foruminfo[forumid]" rel="nofollow">$vbphrase[search_this_forum]</a></if></td>
        </if>
</tr>
</table>

Directly AFTER that bit of code, add this:


HTML Code:

<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center" style="border-bottom-width:0px">
<td class="alt2" align="center">
<!-- Banner Rotator by Redline -->
<SCRIPT LANGUAGE="Javascript"><!--
function banner() {
};
banner = new banner();
number = 0;
// bannerArray
banner[number++] = "<a href='http://jdcbaits.com/' target='_blank'><img src='http://jdcbaits.com/catalog/images/banner1-420.gif' border='1'></a>"
banner[number++] = "<a href='REDIRECT_URL' target='_blank'><img src='BANNER_URL' border='1'></a>"
banner[number++] = "<a href='REDIRECT_URL' target='_blank'><img src='BANNER_URL' border='1'></a>"
banner[number++] = "<a href='REDIRECT_URL' target='_blank'><img src='BANNER_URL' border='1'></a>"

increment = Math.floor(Math.random() * number);

document.write(banner[increment]);
//--></SCRIPT>
</td></table>

I dont think i have java disabled?
i am using a theme called aquateen
my site is here
http://www.basslurereviews.com/bassforums/index.php
it shows up no where?
how would , do i enable java?
I only added 1 banner to test.. as above

HMBeaty 10-24-2006 08:31 PM

Try either filling in those empty banner links, or just remove the last 3 of these:

HTML Code:

banner[number++] = "<a href='REDIRECT_URL' target='_blank'><img src='BANNER_URL' border='1'></a>"
banner[number++] = "<a href='REDIRECT_URL' target='_blank'><img src='BANNER_URL' border='1'></a>"
banner[number++] = "<a href='REDIRECT_URL' target='_blank'><img src='BANNER_URL' border='1'></a>"


bluegum 10-24-2006 09:41 PM

Ok i am at a total loss

I aded it to the default and to aquateen both
FORUMDISPLAY template
did a find for
Code:

        <td class="vbmenu_control" id="forumsearch" nowrap="nowrap"><if condition="$show['quicksearch']"><a href="$show[nojs_link]#goto_forumsearch" rel="nofollow">$vbphrase[search_this_forum]</a> <script type="text/javascript"> vbmenu_register("forumsearch"); </script><else /><a href="search.php?$session[sessionurl]f=$foruminfo[forumid]" rel="nofollow">$vbphrase[search_this_forum]</a></if></td>
        </if>
</tr>
</table>

and it found it fine
then after I added the following
Code:

<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center" style="border-bottom-width:0px">
<td class="alt2" align="center">
<!-- Banner Rotator by Redline -->
<SCRIPT LANGUAGE="Javascript"><!--
function banner() {
};
banner = new banner();
number = 0;
// bannerArray
banner[number++] = "<a href='http://jdcbaits.com/' target='_blank'><img src='http://www.basslurereviews.com/images/banners/jdcbaits.gif' border='1'></a>"
banner[number++] = "<a href='http://bearpawshandpouredbaits.com/' target='_blank'><img src='http://www.basslurereviews.com/images/banners/bearbanner.gif' border='1'></a>"
banner[number++] = "<a href='http://www.kicknbass.com/' target='_blank'><img src='http://www.basslurereviews.com/images/banners/kicknbass.gif' border='1'></a>"
banner[number++] = "<a href='http://sinkobaits.com/' target='_blank'><img src='http://www.basslurereviews.com/images/banners/sinkobaits.jpg' border='1'></a>"

increment = Math.floor(Math.random() * number);

document.write(banner[increment]);
//--></SCRIPT>
</td></table>

is there something i am missing?
something else i need to edit?

bluegum 10-24-2006 09:52 PM

holy crap it shows up on opening each forum
not at the main page

NOW I SEE IT and yes u can yell at me

i thought it would show up on the page without opening up a forum
You have to click on a forum to see the banners
i am so sorry
this script works
just a bit different then i thought..

I wanted this static on the front page not when opening up a forum :(


All times are GMT. The time now is 08:13 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.01138 seconds
  • Memory Usage 1,750KB
  • 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
  • (3)bbcode_html_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
  • (10)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