Here's the complete text for the download you were just reading about. For those that hate to read documentation, here's a link to DOWNLOAD expirez 0.6.

To return to the Downloads page, click the Downloads button at left.

expirez 0.6

The expirez plugin lets you set an "expiration date" on individual entries by adding a meta-tag in this format:
meta-expire_date: YYYY MM DD
(and so, expirez requires the meta plugin). Permalinks are not affected.

For example, this entry file:

End of the World
meta-expire::2004 07 05

The world will come to an end on July 4, 2004.
would have stopped being displayed on July 5, 2004. <g>

Configuring & Installing expirez

Enter configuration values for the options described below; add expiration dates to suitable entries, in the form YYYY MM DD; drop this file into your blosxom plugins folder; blog on.

Expiration Dates cache file location : leave this empty for automatic configuration using Blosxom's plugins state dir; otherwise, enter the complete disk path to the expiration dates cache file.

Password for re-caching : the expirez cache will not catch modifications to the expiration date of expired entries; the cache must be forced to update before the (previously expired) entry will again display. One way to force a cache update is to delete the cache ;-) Another method is to call blosxom
either with a CGI param of ?expirez=PASSWORD, where PASSWORD is the word you enter for $recache_password.

Server Location adjustment : if your server is distant from the bulk of your readers, articles may expire hours ahead of or behind a reader's local midnight. The $reader_hours_from_server variable is a half-fast means of correcting for this difference. If the bulk of your readers are west of your server, enter a negative integer representing the hours west; if most of your readers are east of your server, enter a positive integer representing the hours east.

To install expirez, just drop the configured file into your Blosxom plugins folder. That's it. (Of course, to get any benefit from expirez, you'll want to add expiration dates to suitable entry files ;-)

Using expirez

To easily check for proper operation after installation, create an entry with an expired expiration date. After uploading the file, call blosxom twice; if the "expired" article is still displaying, you've got a problem. Most likely, expirez can't get permission to write its cache file; to check, add a ?log_expirez_cache_error=1 CGI param to blosxom's URL and call it again, and then check your log (this assumes you have access to your server's error log). For help on setting permissions, post to the blosxom list.

Please note that if you "un-expire" an entry by changing an expired expiration date to an un-expired date, the cache must be forced to update before the story will be displayed. The cache can be forced to update either by trashing the existing cache file, or by calling blosxom with an ?expirez=PASSWORD CGI param, where PASSWORD is the value you configured for $recache_password. (And so, you can only use the CGI re-cache method if a value has been configured for $recache_password.)

Also note that if you add a new entry with an expired expiration date, blosxom will have to be called twice before the article "disappears" from the blog. (The first call loads the expiration date into expirez' cache; once cached, the second call lets expirez hide the entry.)

These "cache cavaets" may seem like a PITA, but they pay a benefit in server-efficiency: expirez makes no unusual memory or file system demands which might lead your host to consider you a cycle-hog.

expirez To-Do

To give expirez better accuracy, it really needs to know the timezone of the calling browser so that it can expire entries on readers' local midnights. And if I knew how to make that happen, I would make that happen. If you know how to make that happen, please let me know; thanx!


expirez was inspired by a post from Justin Simoni to the blosxom list.


DOWNLOAD expirez 0.6