The Ultimate Random Header Mod
Mod Version: 1.0.0, by Jaxel
vB Version: 3.8.x |
Rating: (7 votes - 5.00 average) |
Installs: 53 |
Released: 28 Apr 2009 |
Last Update: 28 Apr 2009 |
Downloads: 249 |
Not Supported
Template Edits
Additional Files
|
This mod has been rewritten for vB4x here: 8WayRun.Com - Random Header
THIS SCRIPT DOES NOT USE JAVASCRIPT!
I wrote this mod for my own website last year (http://www.8wayrun.com/). I was looking for a way to create a random header situation, while also letting people select the random header through their UserCP and FORCE a header depending on what forum they are on. If you go to my website (http://www.8wayrun.com/), a random character will appear on your header, if you ctrl+refresh, a new character will show up... if you go to our character specific forums, the character in the random header will be FORCED to the character of that specific forum... I have done my best to make this script as simple as possible.
Product Demo:http://www.8wayrun.com/
http://www.8wayrun.com/customstyles/exm-blue-dark/header/header.php
Installation Procedure:- Create a dedicated folder on your server where you will be putting your random images.
- Put the included "header.php" script into the folder you created previously in step 1.
- Put the images you want randomized into the folder you created previously in step 1.
Optional Switches:- OPTIONAL: If you want, you can set this script to FORCE a header on specific forum. Its simple, when naming the files for your random images, simply name the file as the forum ID of that forum. So if you want a specific image forced when viewing forum 38, name the file 38.png.
.
- OPTIONAL: If you want, you can let users SELECT which header they want on places where the script would normally randomize.
- Create a new "Single-Selection Menu" profile field in your adminCP, set title and description to whatever you want. If you use numbered filenames like those in step 2, you may want to use the description field to let people know what they are selecting. (see screenshot)
- For each selection option, enter an image's filename WITHOUT the extension, so wolves.png will be just "wolves".
- Set Default: None
- Field Required: No
- Field Editable: Yes
- Private Field: No
- Field Searchable on Members List: No
- Show on Members List: No
- Display Page: Options: Other
After you submit, this field will be given a name (ex: field9). Make sure to remember this name.
.
- OPTIONAL: Open up the included "header.php" script and go to the section flagged "// VALIDATE CURRENT IMAGE DATA, CHECK FID, CHECK PID". By default, the image randomizer will find ANY image with the JPG, PNG or GIF extension. However, the FORCED and SELECT settings will always look for PNG images. If you would like to change this to either JPG or GIF, you must change the two isntances of PNG to the appropriate format. Only ONE filetype is usable with the FORCED or SELECT options.
.
- The script has a heirarchy of importance when searching for images. The first thing it will look for is the FORCED image from step 1. If it doesn't find a forced image, it will use the user defined image in step 2. If the user doesn't have a defined image, it will pick an image at random from the folder it resides in.
Usage Procedure:- Anywhere you want to use this random script, just link to this script, instead of an image.
- <img src="DIRECTORY/header.php?fid=$forumid&pid=$bbuserinfo[field9]" />
- <table background="DIRECTORY/header.php?fid=$forumid&pid=$bbuserinfo[field9]"></table>
.
- The text in BLUE above is the switch for forcing an image based on the forumid. If you don't want to force images depending on the forum, you dont need to include that switch.
.
- The text in RED above is the switch for forcing an image based on user control panel selection. If you don't want to give users the option to select an image manually, you dont need to include the switch. Notice that this switch has a variable called "field9"; this may not be the same in your forum. This variable should be changed to the field name I had you make note of in a previous step.
Don't forget to click INSTALL!
If you want to donate, I'm all for it... as I'm an unemployed computer programmer...
Download
header.php (1.3 KB, 255 downloads)
Screenshots
|