#!/usr/bin/perl # Blosxom Plugin: list_archives # Author: Lukasz Grabun, www.grabun.com # Version: 0.1 # Blosxom Home/Docs/Licensing: http://www.raelity.org/blosxom # Plugin populates $list_archives::archives variable with list consisting of titles of your entries # in a month-year order. package list_archives; # --- Configurable Variables --- # Do you want the list sorted in reverse chronological order? my $reversechron=1; # Set to whatever you want your HTML to be indented with. Leave blank for nothing. my $indent="\t"; # Customize your month names here if you want to. my @monthname=('January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'); # Set to whatever you want to have day separated from month with. my $sep = "/"; # ------------------------------ $archives = ''; sub start { return 1; } sub filter { my ($pkg, $files) = @_; my %archive; foreach (keys %{$files}) { open(FH, "<$_"); chomp(my $title = ); close(FH); my @date = localtime($files->{$_}); my $month = $date[4]; my $year = $date[5] + 1900; my $day = $date[3]; my $hour = $date[2]; my $min = $date[1]; my $m = $month + 1; if ($m<10) { $m = "0" . "$m"; } my $d = $day; if ($d<10) { $d = "0" . "$d"; } s/$blosxom::datadir/$blosxom::url/; s/$blosxom::file_extension$/$blosxom::flavour/; $archive{$year}{$month}{$day}{$hour}{$min} = qq{$indent$indent
  • $m$sep$d - $title
  • \n}; } my $results = qq{
    "; $archives = $results; } 1;