# -*- perl -*- # Blosxom Plugin: section # Author(s): Axel Beckert , http://noone.org/blog # Version: 0.01 # Licensing: GPL v2 or newer, http://www.gnu.org/licenses/gpl.txt # Dept plugin web page: http://noone.org/blog?-tags=dept # Dept plugin download: http://noone.org/blosxom/dept # Blosxom web page: http://blosxom.ookee.com/ ### Documentation: # # This is a plugin for blosxom. # # Installation: # # Just drop it into your blosxoms plugin directory and it should start # working. If you want, change some of the configuration variables # below. # # What it does: # # It allows you to reformat the posting path into a section display, # e.g. for the slash expansion for RSS feeds. # # Including the section line into templates: # # Use $section::section in your templates. # # Known bugs and other ugly obstacles: # # + None yet. :-) # # Version History: # # 0.01: Initial release, losely based on my dept plugin. package section; ### ### Config ### #my $slash_replacement = ' → '; my $slash_replacement = ' » '; # End of configuration. # Global variables $section = ''; # Code sub start { 1; } sub story { my($pkg, $path, $filename, $story_ref, $title_ref, $body_ref) = @_; $section = $path; $section =~ s(^/+|/+$)(); $section =~ s(/)($slash_replacement)g; $section =~ s(\&)(\&)g; $section =~ s(\')(\')g; $section =~ s(\")(\")g; $section =~ s(<)(\<)g; $section =~ s(>)(\>)g; return 1; } 1;