I have put together a rotator snippet which:
- rotate banners / images (tower or horizontal banners)
- display random images which change on page load
- show static banners or images
This snippet has been tested using IE6 and FF and works fine. I would like some input from users with different browsers to make sure everything is up to snuff before I add it to the library.
I have written a page of documentation at my site so instead of writing it all again here, visit my rotator info page and check it out. Usage tips, snippet call examples, working examples, and a link to my RTM site which I added the snippet to check validation can be found there. To ensure validation, the snippet only outputs the images, you must wrap it in an appropriate container.
http://www.frsbuilders.net/rc3/rotator01.html
You can use the snippet multiple times on a page or template using the Random, Static, or default methods but only 1 occurence of the Tower or Horiz method can be used per page due to the javascript code. A workaround would be to have two templates and alternate between them with your content...
Files included in the zip:
rotator1_22_2130.php
rotator1_22_2130_code_only.php
-- orig_scripts
----- jscript_rotator.txt
----- random_rotator.php
rotator1_22_2130.php is the snippet with all the comments left in, while the rotator1_22_2130_code_only.php has all comments removed (saves about 3kb) so that is the file to use for your snippet. The files found in the orig_scripts folder are the original scripts I used parts of for the snippet. Have a look at the random_rotator.php file, it can do alot more than rotate images and may itself be useful.
Rotator_v01.zip 7.82K
105 downloadsAll feedback would be much appreciated...











