Content last modified Tuesday 24 August 2021
hop to #bottom
Categories:
Author:
Current version:
1.0
About It:
Get it:
Rate it:
  • Helpful?
  • 0 Yes
  • 0 No
Flag it:

If you'd like to provide updated information and do not have access to directly edit, please contact the site admin; thanks!

mdp_rotating_image

Display a image that changes on a time interval.

This plugin will display an image, randomly chosen from all of your TXP images or just a certain category, for a set amount of time. It will display the same image for an hour, a day, week, month, or even year. Once the chosen variable changes, a new image is chosen.

Options for the plugin are as follows:

  • rotate : defines the period on which to rotate, default is a single “day”. Other choices are “hour”,“week”,“month”,“year”.
  • category : Restricts the image to only those that are in this category. (note: I will add the ability to do multiple categories soon).
  • usethumb : Outputs the thumbnail of the image, if available.
    class : Adds a class to the outputted image tag.
  • id : Adds an ID to the outputted image tag. Also needed if you want to have more than one rotating image on your site.

This plugin writes a small file in your images directory that contains information on when to rotate. If you wish to remove this file (if you change a setting) you can either delete the file manually, or go to a page where the rotating image is and append ?flush=1 onto the end of the URL (if you’re using messy mode: &flush=1).

An example of the tag is this:
<txp:mdp_rotating_image category="misc" rotate="day" />

This would produce:
<img src="/images/2.jpg" alt="Some image" />

See the Information URL below to see an example of the plugin in action.

Article Request Count:

Archived [?]: orphaned

Initially released:
2004-10-15
Posted here:
24 Mar 2005

You know you want to visit the Archives.
Published with Textpattern