Page 1 of 1

Random Folder Image (maybe javascript?)

Posted: Tue Sep 05, 2006 1:38 pm
by TheColbyJack
Is there anyway to have a set of random folder images to display when there isn't a new post, but when a new post is made, the folder image will change to a given folder image?

For example, instead of this image displaying when there is no posts, it will be a random image:
Image

And, when there is a new post, this image will always show up:
Image


I want to incorporate this into a style I am developing, so please don't move this to Mod Requests. Thanks!

Posted: Wed Sep 06, 2006 8:01 am
by Arty
In subSilver.cfg find this code:

Code: Select all

$images['forum'] = "$current_template_images/folder_big.gif";
and modify it to use random images.

For example:

Code: Select all

$folder_images = array('folder_big.gif', 'folder_big2.gif', 'folder_big3.gif');
$images['forum'] = $current_template_images . '/' . $folder_images[mt_rand(0, count($folder_images) - 1)];

Posted: Sun Sep 10, 2006 3:53 pm
by TheColbyJack
CyberAlien wrote: In subSilver.cfg find this code:

Code: Select all

$images['forum'] = "$current_template_images/folder_big.gif";
and modify it to use random images.

For example:

Code: Select all

$folder_images = array('folder_big.gif', 'folder_big2.gif', 'folder_big3.gif');
$images['forum'] = $current_template_images . '/' . $folder_images[mt_rand(0, count($folder_images) - 1)];


Thank you very much!