Skip to content

Latest commit

 

History

History
77 lines (50 loc) · 2.12 KB

README.pod

File metadata and controls

77 lines (50 loc) · 2.12 KB

NAME

Blosxom Plug-in: potd (picture of the day)

SYNOPSIS

Randomly selects a photo that has been posted in the blog to be the "picture of the day" (for an arbitrary value of day). Provides the template variables:

* $potd::potd -- the URL to the POTD
* $potd::potd_source -- permalink to the entry containing the POTD

VERSION

0.01

Customization

Configuration variables

$image_pattern is a regular expression used to pick images which may be candidates for the POTD. The intent is typically to restrict to images hosted in the same URL space as the blog, although the default is simply any file with a jpg, jpeg, or gif suffix.

$from_pattern and $to_pattern are used to transform the original url of the image in order to generate the POTD. This would typically be used if you want to display full-size images in the main blog and thumbnails for the POTD. If either pattern is undef, no transformation will be done

$cache_expire is the frequency with which to pick a new POTD. The default is 1 day. This can be set to 0 to disable caching and pick a new image for each request.

$debug_level can be set to a value between 0 and 5; 0 will output no debug information, while 5 will be very verbose. The default is 1, and should be changed after you've verified the plugin is working correctly.

AUTHOR

Kevin Scaldeferri (kevin+blosxom at scaldeferri dot com) http://kevin.scaldeferri.com/

BUGS

Probably; address bug reports and comments to me or to the Blosxom mailing list http://www.yahoogroups.com/groups/blosxom.

TODO

  • make img tag parsing more robust

  • provide potd_alt containing any alt text for the image

Giving Credit

The basic concept for this plugin was stolen from Tim Bray's "Ongoing", http://www.tbray.org/ongoing/

LICENSE

POTD Blosxom Plug-in Copyright 2005, Kevin Scaldeferri

This code is released under the same license as Perl, namely the Artistic License: http://www.perl.com/pub/a/language/misc/Artistic.html. (Note that this is different from the license which Blosxom is distributed under.)