# Blosxom Plugin: archives # Author: Brian Akins # Version: 0+5i # Blosxom Home/Docs/Licensing: http://www.blosxom.com/ # 2004-09-04 # modified for ModBlosxom.pm by Makamaka # # Blosxom Home/Docs/Licensing: http://www.blosxom.com/license.html package ModBlosxom::plugin::Archives; # -------------------------------------- sub new { bless {}, shift; } sub start { return 1; } sub filter { my $self = shift; my $blosxom = shift; my $files = shift; my %archive; my ($reverse,$indent,$url) = $blosxom->settings([qw/reverse indent url/]); my @monthname = @{ $blosxom->settings('archives_monthname') }; foreach (keys %{$files}) { my @date = localtime($files->{$_}); my $month = $date[4]; my $year = $date[5] + 1900; $archive{$year}{'count'}++; $archive{$year}{$month}{'count'}++; } my $results = qq{\n"; $blosxom->param('archives::archives' => $results); 1; } 1;