# Blosxom Plugin: continues_more; # Blosxom Plugin: relative_path_binary; # Author(s): Watanabe Chihiro < chihiro at deram dot com > # http://www.watanet.org/~chihiro/ # http://www.watanet.org/~chihiro/linux/ # Version: 20080228 # Documentation: See the bottom of this file or type: perldoc continues_more package continues_more; use strict; use vars qw($more_text $replace_strings); # --- Configurable variables ----------- # you can change "continues more ..." message # english $more_text="continues more ..."; # japanese #$more_text="続きを読む..."; # --- Plug-in package variables -------- # none # -------------------------------------- sub start { # always enable return 1; } sub story { my($pkg, $path, $fn, $story_ref, $title_ref, $body_ref) = @_; #################### # if pattarn 1 # if you want print fulltext at only single view # ("continues more" message show main list view, year/month/day, category) if ( $blosxom::path_info !~ /\.$blosxom::flavour$/ ) { #################### #################### # if pattarn 2 # print "continues more" message at only main list view # if "not set" $blosxom::path_info , current page is top list page. # chop document by more tag. # if ( ! $blosxom::path_info ) { #################### my $url = qq!$blosxom::url$path/$fn.$blosxom::default_flavour!; # chop document and replace more tag to linked "continues more ...". $replace_strings=<

${more_text}

EOF $$body_ref =~ s|().+|${1}\n${replace_strings}|si; }else{ # show fulldocument and replace more tag to "name=${url}#more" tag) $replace_strings=<

EOF $$body_ref =~ s|()|${1}\n${replace_strings}|si; } return 1; } 1; __END__ =head1 NAME Blosxom Plug-in: continues_more =head1 SYNOPSIS Write tag in document. =head1 AUTHOR Watanabe Chihiro < chihiro at deram dot com > http://www.watanet.org/~chihiro/ http://www.watanet.org/~chihiro/linux/ =head1 INSTALLATION Drop continues_more into your plugins directory.