# UpdateAuthoredOn.pl # UpdateAuthoredOn plugin for Movable Type # by Kevin Shay # http://www.staggernation.com/mtplugins/UpdateAuthoredOn/ # last modified 8/22/05 use strict; package MT::Plugin::UpdateAuthoredOn; use vars qw( $VERSION ); $VERSION = '1.01'; require MT::Plugin; require MT; my $plugin = MT::Plugin->new({ name => "UpdateAuthoredOn", description => 'Update the Authored On timestamp of an entry by clicking a button.', doc_link => 'http://www.staggernation.com/mtplugins/UpdateAuthoredOn/', author_name => 'Kevin Shay', author_link => 'http://www.staggernation.com/', version => $VERSION }); MT->add_plugin($plugin); MT->add_callback('bigpapi::template::edit_entry', 9, $plugin, \&_template); sub _template { my ($cb, $app, $template) = @_; my $help_label = ($$template =~ m/item_authored_on/) ? 'item_authored_on' : 'date'; my $old = qq{?}; $old = quotemeta($old); my $new = <<"HTML"; ? "> HTML $$template =~ s/$old/$new/; } 1;