vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Design and Graphics Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=253)
-   -   Rotating Logo on only some styles? (https://vborg.vbsupport.ru/showthread.php?t=237296)

Theda 03-02-2010 03:42 PM

Rotating Logo on only some styles?
 
I want to use a rotating logo for *some* of the styles on my forums, but not all of them. This has nothing to do with advertising banners, just the main logo at the top of the page.

Is anyone familiar with a mod that will work to do that with 4.0.x?

--------------- Added [DATE]1267552025[/DATE] at [TIME]1267552025[/TIME] ---------------

Someone posted this on vbulletin.com, could i use this to make it work for a specific style?

Code:

<HTML><HEAD>
<TITLE>Rotating banners with links</TITLE>

<script type="text/javascript"><!--
      //Javascript Created by Computerhope http://www.computerhope.com
      //store the quotations in arrays
      images = new Array(5);

images[0] = "<div align='center'><a href="path/to/source" target='_blank'> <img

src="path/to/image.gif" border='0'></a></div>";

images[1] = "<div align='center'><a href="path/to/source" target='_blank'> <img

src="path/to/image.gif" border='0'></a></div>";

images[2] = "<div align='center'><a href="path/to/source" target='_blank'> <img

src="path/to/image.gif" border='0'></a></div>";

images[3] = "<div align='center'><a href="path/to/source" target='_blank'> <img

src="path/to/image.gif" border='0'></a></div>";

images[4] = "<div align='center'><a href="path/to/source" target='_blank'> <img

src="path/to/image.gif" border='0'></a></div>";

index = Math.floor(Math.random() * images.length);
document.write(images[index]);
      //done
      // --></script>

</BODY>
</HTML>

--------------- Added [DATE]1267557067[/DATE] at [TIME]1267557067[/TIME] ---------------

maybe this isn't the right forum? should it be in the coding? (can someone move it?) :)

mmoore5553 03-03-2010 01:04 AM

so what are you wanting to do ..is it just a static image or what ? and per forum ID you want the image to change ? actually that would work or you could put in array like this

Code:

<vb:if condition="in_array($GLOBALS['forumid'], array(1,2,3,9,10))">
      <div align="center">  <img src="images/banners/{vb:raw $GLOBALS.forumid}.png" align="center" alt="banners" border="0" /> </div>
</vb:if>

you would have to name your images the same as the forum id .png

example

forum id 1

1.png

Theda 03-07-2010 01:09 AM

yes a static image to be replaced (at random), but only that style. if there were multiple styles it should only change the logo on the one style.

say i had a green style and a grey style and a black style. i only want to change the logo on the green style. i guess i could use that in the template for that style? i'm not sure forum ID... maybe style ID?


All times are GMT. The time now is 05:07 PM.

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.00910 seconds
  • Memory Usage 1,716KB
  • 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
  • (2)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (3)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete