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_rotator_20050207.zip

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:
  • snippet_rotator.php
  • readme_rotator.txt (this file)
Usage:
  1. unpack this package in your extensions/snippets/ folder.
  2. place a tag in any of your template files.
  3. 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.
Description:
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'.
 
Your information

Settings

Remember personal info?


Your email address will only be used for feedback purposes and will never be shown. If needed you can use Textile to markup your comment.
Leave your comment