# Blosxom Plugin: num_entries_for_flavour # Author: KITAMURA Akatsuki # Version: 2006-06-21 # Blosxom Home/Docs/Licensing: http://www.blosxom.com/ package num_entries_for_flavour; use strict; # --- Configurable Variables ----------- # フレーバに対する$num_entriesの値 my %num_entries = ( 'html' => 5, 'rss' => 10, ); # --- Plug-in package variables -------- # -------------------------------------- sub start { defined $num_entries{$blosxom::flavour}; } sub filter { my $files_ref = $_[1]; if ($num_entries{$blosxom::flavour} == -1) { $blosxom::num_entries = keys %$files_ref; } else { $blosxom::num_entries = $num_entries{$blosxom::flavour}; } 1; } 1; __END__ =encoding utf8 =head1 NAME Blosxom Plug-in: num_entries_for_flavour =head1 DESCRIPTION 表示する記事の数($num_entries)をフレーバごとに変更します。 =head1 INSTALLATION このプラグインファイルをプラグインディレクトリ($plugin_dir)に 置いて下さい。 =head1 CONFIGURATION フレーバ拡張子と、それに対する記事数を以下のように設定します。 my %num_entries = ( 'html' => 5, 'rss' => 10, 'foo' => -1, ); -1に設定すると、存在する記事を全て表示します(無制限)。 設定していないフレーバを使った場合には、blosxom.cgiで設定した $num_entries の値がそのまま使われます。 =head1 VERSION 2006-06-21 =head1 AUTHOR 北村曉 (KITAMURA Akatsuki) , http://www.akatsukinishisu.net/ =head1 LICENSE This Blosxom Plug-in Copyright (c) 2006, KITAMURA Akatsuki Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.