PDA

View Full Version : Rotating Logo on only some styles?


Theda
03-02-2010, 03:42 PM
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 1267552025 at 1267552025 ---------------

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

<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 1267557067 at 1267557067 ---------------

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


<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?