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.
Archived [?]: orphaned









If there is a comment form at the Information URL, you may want to leave your comments/questions there for quicker feedback. Otherwise, comment away:
Subscribe to this article's comments RSS feed. [ ? ] View Recent Comments across the site. Get a Gravatar.