Random Folder Image (maybe javascript?)

This forum is now closed. Please ask all styles-related questions in the phpBB 3.0 Styles Support & Discussion Forum.
Locked
TheColbyJack
Registered User
Posts: 136
Joined: Tue May 09, 2006 1:15 am

Random Folder Image (maybe javascript?)

Post by TheColbyJack » Tue Sep 05, 2006 1:38 pm

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!

User avatar
Arty
Former Team Member
Posts: 16654
Joined: Wed Mar 06, 2002 2:36 pm
Name: Vjacheslav Trushkin
Contact:

Post by Arty » Wed Sep 06, 2006 8:01 am

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)];
Vjacheslav Trushkin / Arty.
Free phpBB 3.1 styles | New project: Iconify - modern SVG framework

TheColbyJack
Registered User
Posts: 136
Joined: Tue May 09, 2006 1:15 am

Post by TheColbyJack » Sun Sep 10, 2006 3:53 pm

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!

Locked

Return to “[2.0.x] Styles Development & Discussion”