Timebased Header Image
Header Image rotates based on time. This script can also possibly awaken ideas for other script generated images for use throughout VB4.
OK this hack is based on two others I saw here long ago... 1. One hack generated images on the fly. 2. One hack rotated title (header) images based on the user's time. I dug and dug and can't seem to find them again, so if anyone remembers where the ideas came from please let me know. This hack will provide a bit of fun for your site and demonstrate the appearance of updates/changes. To begin, you must have atleast two images for use with your header. I have a title image for morning, afternoon, and night. I used photoshop and adjusted red/green/blue varibles and added some elements for each period. Other than the color adjusts, my images are identical. Included in the zip are two php files. The purpose of these files is to replace your header image and your background image. So title.php should call your header title image while titleb.php should call the repeating background image. Obviously if you don't have different colors for the background, you may not need to use titleb.php. Besides inserting the images in the code, you may need to adjust one other portion. This is in the final few lines and sets the output type. PHP Code:
header('Content-type: image/png');
Once you have title and titleb adjusted, upload to your server and run the files, you should see the image displayed. If all is well, procede to adjust your style vars to call the new images. (see attached images) The main reason for this release is to stir some ideas with image handling within VB4. Feel free to use/hack/slash this code for your own needs. TO USE: Make changes to title.php PHP Code:
if ( $sevenam > $currentusertime)
If using different backgrounds, make changes to titleb.php PHP Code:
if ( $sevenam > $currentusertime)
Make change to header ('Content') Upload files to where ever you wish. Change the varible areas in admincp as indicated in the thumbnails below. Download
title.zip (1.2 KB, 36 downloads) Screenshots |