Back to vBulletin 4.x Template Modifications

Randomize your background every refresh!
Mod Version: 1.01, by LGKeiz

vB Version: 4.0.x Rating: (2 votes - 4.50 average) Installs: 19
Released: 10 May 2010 Last Update: 24 May 2010 Downloads: 138
Not Supported Re-usable Code Translations  

this is a simple .php file, and small "Style Vars" edit to make it so your background changes on your forum every time you refresh the page, using the popular extensions, such as .jpg, and .png.

rotate.php

PHP Code:
<?PHP 
$dir 
'images/blood/backgrounds/'//change this to the directory where your background images are from the root directory!
$images = array(); 
$extensions = array('png''jpg''gif'); 
 
if (!
file_exists($dir)) 
 die(
'directory not found'); 
 
$fp = @opendir($dir); 
 
while (
$file = @readdir($fp)) 

 
$info pathinfo($file); 
 if (
in_array($info['extension'], $extensions)) 
  
$images[] = $file

 
@
closedir($fp); 
 
$bg mt_rand(0count($images) - 1); 
header('Location: ' $dir $images[$bg]); 
?>
put this file into your root directory.

Make sure to change the directory to the background images you want!

Changing the Style Var via doc_background
  1. Go to your admincp, click "Style Manager"
  2. select your favorite skin on the drop down menu select "Style Vars"
  3. in the Style Vars menu, search for "doc_background"
  4. Once there replace the Background Image field with url(location of your rotate.php) ex: url(phpfiles/rotate.php) then hit save.

And your finished!

Demo: http://gamingsync.com

Credits
http://gamingsync.com/member.php?3-cryptic
I did not create this, but tested it, and had the idea for it, had permission to share this.

Download

File Type: %1$s rotate.php (528 Bytes, 107 downloads)

Supporters / CoAuthors

  • Darkness

Similar Mods

Miscellaneous Hacks Randomize your Adsense Ad Colour Palette on Page Refresh vBulletin 3.7 Template Modifications
Forum Home Enhancements Category Background on FORUMHOME . put a Background for every forum . vBulletin 3.8 Template Modifications

vblts.ru supports vBulletin®, 2022-2024