ae84ba571878cd6f13a3fd7c239599f1e5dbed6d
[matthijs/upstream/blosxom.git] / debian / plugins / 00RssLimit
1 # Blosxom Plugin: RssLimit        # vim:ft=perl:fdm=marker:
2 # Author: Gerfried Fuchs <rhonda@deb.at>
3 # Version: 0.2.0
4 # Documentation: See the bottom of this file or type: perldoc RssLimit
5
6 package RssLimit;
7
8 use strict;
9
10 use CGI qw(param);
11
12 use vars qw(
13   $rss_num_entries
14 );
15
16 # --- Configurable variables -----
17
18 # how many entries for rss feeds?
19 $rss_num_entries = 10;
20
21 # --------------------------------
22
23 sub start {         # set num_entries {{{
24     if ($blosxom::flavour eq 'rss') {
25         $blosxom::num_entries = $RssLimit::rss_num_entries;
26     }
27     1;
28 }   # }}}
29
30 1;
31
32 __END__
33 {{{
34
35 =head1 NAME
36
37 RssLimit - blosxom plugin to limit RSS feeds tighter than others
38
39 =head1 DESCRIPTION
40
41 RssLimit allows you to limit your RSS feed tigher (or wider, if you so
42 like) than what's displayed usual on your webpage version of your blog.
43
44 =head1 CONFIGURATION
45
46 The following package variables can be configured:
47
48 =over 4
49
50 =item C<$RssLimit:rss_num_entries>
51
52 Number of entries in the RSS feed. Default is 10.
53
54 =back
55
56 =head1 USAGE
57
58 RssLimit should propably be loaded early to not confuse other plugins
59 that make use of $num_entries, like paging plugins.
60
61 =head1 SEE ALSO
62
63 Blosxom: L<http://blosxom.sourceforge.net/>
64
65 =head1 BUGS
66
67 Please address bug reports and comments to the Author.
68
69 =head1 AUTHOR
70
71 Gerfried Fuchs L<mailto:rhonda@deb.at>,
72 L<http://rhonda.deb.at/projects/blosxom/>
73
74 =head1 LICENSE
75
76 Copyright (c) 2004 Gerfried Fuchs
77
78 Permission is hereby granted, free of charge, to any person obtaining a
79 copy of this software and associated documentation files (the "Software"),
80 to deal in the Software without restriction, including without limitation
81 the rights to use, copy, modify, merge, publish, distribute, sublicense,
82 and/or sell copies of the Software, and to permit persons to whom the
83 Software is furnished to do so, subject to the following conditions:
84
85 The above copyright notice and this permission notice shall be included
86 in all copies or substantial portions of the Software.
87
88 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
89 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
90 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
91 THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
92 OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
93 ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
94 OTHER DEALINGS IN THE SOFTWARE.