# Blosxom Plugin: StoryTitle # Author(s): Brian Del Vecchio # Version: 0.1 (preliminary) # Copyright 2004 Brian Del Vecchio # Released under the same License as Blosxom package Blosxom::Plugin::StoryTitle; # a simple plugin for Blosxom 3.0 which calculates a nice HTML title # for individual story pages. # installation: # add this to your plugins directory, then add Blosxom::Plugin::StoryTitle::run # to data/.settings/handlers.entry, after Blosxom::read_entry_file # usage: # in head.html # $storytitle sub run { my $self = shift; # the first story promotes the story title. if (! $self->{settings}->{storytitle}) { # this is probably cheating... $self->{settings}->{storytitle} = $self->{settings}->{blog_title} . ' : ' . $self->{state}->{current_entry}->{title}; } else { # subsequent stories reset it to blog_title $self->{settings}->{storytitle} = $self->{settings}->{blog_title}; } 1; } 1;