Rotator
As requested on the pivot forums, this snippet will show a random image out of an user-specified directory. Just unzip the files to your extensions/snippets/ folder, put the [ [rotator] ] tag somewhere and fill the images/rotator/ (by default) directory with images and that's it!
Have fun with it, any question, bug-reports, suggestions or wishes post them on the pivot forums.
Snippet-title: Rotator v1.0
Creator: Bram "Tenshi" Nijmeijer
E-mail: bram@nijmeijer.org
Website: http://bram.nijmeijer.org
Creation date: 7 February 2005
Content of zipped file:
Usage:
- snippet_rotator.php
- readme_rotator.txt (this file)
Description:
- unpack this package in your extensions/snippets/ folder.
- place a tag in any of your template files.
- make a directory called rotator/ inside your images upload directory (set with 'File Upload Path' in your Pivot Configuration).
- make sure the directory is readable for the webserver, CHMOD'ding it to 755 should work fine!
- and ofcourse add JPG or GIF images to your directory.
- if you want to use a different named directory then set it with the first parameter.
- if you want to use a directory outside of your images upload directory then enable the second parameter.
This tag will show an image (JPG or GIF) randomly picked out of an user specified directory.
Parameters:
- Parameter 1: If you don't want the default directory rotator/, then add your own named directory here (without the ending slash).
- Paramater 2: If you want to use a directory which is not inside your images upload dir then set the second parameter to '1'.
