# Blosxom3 Plugin: StopTheFuture # Author: Bernie Simon # Version: 2005-06-03 # More notes at the bottom of this file or type: perldoc StopTheFuture.pm use strict; package Blosxom::Plugin::StopTheFuture; #---------------------------------------------------------------------- # call from handlers.entry sub run { my $self = shift; $self->{state}->{stop}->{handlers}->{entry} ++ if time() < $self->{state}->{current_entry}->{mtime}; } 1; __END__ =head1 NAME StopTheFuture.pm =head1 SYNOPSIS Prevent files with dates in the future from being displayed =head1 DESCRIPTION Blosxom assumes the modification date of the file is the time it was created and displays them from newest to oldest. Th modification date of a file is set when it is created or changed. It can olso be changed by the Unix utility touch by using the command touch -t YYMMDDhhmm file.txt So the touch command allows files to be given future dates. This plugin will prevent these files from being displayed. This allows you to write files, modify them with touch, and not have them be visible to the user until after the date you gave in the touch command. =head1 CONFIGURABLE VARIABLES There are none. =head1 INSTALLATION Place this file in the plugins directory. Edit the .settings/handlers.entry file and place the line Blosxom::Plugin::StoTheFuture::run somewhere after the line Blosxom::read_entry_file and before the line Blosxom::render_entry =head1 AUTHOR Bernie Simon (http://carelesshand.net) =head1 LICENSE Copyright Bernard Simon, 2005. You may use this file as you wish as long as this copyright notice is maintained.