Revert rss20 to using $ENV{PATH_INFO} in self link.
[blosxom-plugins.git] / barijaona / modiftime
blobc3640e75b2eabdafad39d132886b941283808c3a
1 # Blosxom plugin: modiftime
2 # Author(s): Barijaona Ramaholimihaso
3 # Version: 20040802
4 # Documentation: see bottom of file or perldoc title
6 package modiftime;
8 use File::stat;
11 # ---------------------------------------------------------
13 sub start { 1; }
15 sub story {
16   my ($pkg, $path, $filename, $story_ref, $title_ref, $body_ref) =@_;
17         my $mtime;
18         $file = "$blosxom::datadir$path/$filename.$blosxom::file_extension";
19         $mtime = stat("$file")->mtime;
20         my($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst) = localtime($mtime);
21                                         $year += 1900;
22                                         $mon += 1;
23                                         $hour = sprintf("%02d",$hour);
24                                         $min = sprintf("%02d",$min);
25                                         $sec = sprintf("%02d",$sec);
26         $modiftime ="$mday/$mon/$year $hour:$min";
31 __END__
32 =head1 NAME
34 Blosxom Plug-in: modiftime
36 =head1 SYNOPSIS
38 Allows you to include the date and time when the file was last modified.
40 Useful if you want to include this info, while using a date caching plugin like entries_index or entriescache.
42 =head2 QUICK START
44 Put title in your plug-ins directory.
46 If required adapt the $modiftime variable.
48 Just place $modiftime::modiftime where you want to display the date and time when your story was last modified.
50 =head1 VERSION
52 20040802
54 =head2 CHANGES
56 20040802 - First "official" release
58 =head1 AUTHOR
60 Barijaona Ramaholimihaso <blosxom@barijaona.com>, http://homepage.mac.com/barijaona/
62 =head1 SEE ALSO
64 Blosxom Home/Docs/Licensing: http://blosxom.sourceforge.net
66 Blosxom Plugin Docs: http://blosxom.sourceforge.net/plugins/
68 =head1 BUGS
70 None known; please send bug reports and feedback to the Blosxom development mailing list <blosxom-devel@lists.sourceforge.net>.
72 =head1 COPYRIGHT
74 This program is free software; you can redistribute
75 it and/or modify it under the same terms as Perl itself.
77 =cut