#!/usr/bin/perl -w # Blosxom Plugin: statictitler # Author: Michael Still (mikal@stillhq.com) # Version: 0+1i # Blosxom Home/Docs/Licensing: http://www.raelity.org/blosxom # Categories plugin Home/Docs/Licensing: # http://www.stillhq.com/cgi-bin/blosxom/blosxom/ package statictitler; # --- End of Configuration Section --- sub start { return 1; } # From http://www.devdaily.com/perl/edu/qanda/plqa00016/ sub hashValueDescendingNum { $blosxom::files{$b} <=> $blosxom::files{$a}; } sub head{ $title = ""; $others = 0; return undef; } sub date{ if($title eq ""){ my($FH); open FH, "< $blosxom::datadir/$blosxom::path/$blosxom::fn.$blosxom::file_extension" or die "Couldn't determine title for $blosxom::datadir/$blosxom::path/$blosxom::fn.$blosxom::file_extension"; $title = ; chomp($title); chomp($title); close(FH); } elsif($others == 0) { $others = 1; $title = "$title, and other posts"; } return undef; } sub last{ $blosxom::output =~ s/\%title\%/$title/g; } 1;