1 # Blosxom Plugin: fullcategory
2 # Author(s): Mark Ivey <zovirl@zovirl.com>
4 # Documentation: See the bottom of this file or type: perldoc fullcategory
8 # --- Configurable variables -----
10 # --------------------------------
12 # print debug messages or not?
22 my($pkg, $files_ref) = @_;
24 my $path = "$blosxom::datadir/$blosxom::path_info";
26 # if there is a flavor, this is a story and we don't have to help blosxom
27 return if ($path =~ m!\.[^/]*?$!);
29 # the / on the end of $path is what prevents partial matches
31 $path =~ s!//$!/!; # remove extra trailing /'s
33 warn "fullcategory: path is [$path]\n" if $debug >= 1;
35 foreach my $file (keys %$files_ref)
37 my $string = "fullcategory: checking file [$file]: ";
38 unless ($file =~ m!^$path!)
40 delete $files_ref->{$file};
41 $string .= "deleted\n";
47 warn $string if $debug >= 1;
61 Blosxom Plug-in: fullcategory
65 Changes blosxom behavior so full category names are required (partial names
74 Mark Ivey <zovirl@zovirl.com>, http://zovirl.com
76 This plugin is now maintained by the Blosxom Sourceforge Team,
77 <blosxom-devel@lists.sourceforge.net>.
81 fullcategory fixes blosxom so only complete category names will work.
82 By default, blosxom will return results for partial category name matches.
83 For example, if "telephone" is a category, these would all return posts about
85 http://example.com/telephone
86 http://example.com/telepho
87 http://example.com/tele
89 (If "television" was also a category, that last example would include
90 posts from both the television & telephone categories)
94 Blosxom Home/Docs/Licensing: http://blosxom.sourceforge.net/
96 Blosxom Plugin Docs: http://blosxom.sourceforge.net/documentation/users/plugins.html
98 parsedate() taken from Fletcher T. Penney's entriescache plugin:
99 http://www.blosxom.com/plugins/indexing/entries_cache.htm
103 None known; please send bug reports and feedback to the Blosxom
104 development mailing list <blosxom-devel@lists.sourceforge.net>.
108 fullcategory Blosxom Plugin Copyright 2004, Mark Ivey
110 Permission is hereby granted, free of charge, to any person obtaining a
111 copy of this software and associated documentation files (the "Software"),
112 to deal in the Software without restriction, including without limitation
113 the rights to use, copy, modify, merge, publish, distribute, sublicense,
114 and/or sell copies of the Software, and to permit persons to whom the
115 Software is furnished to do so, subject to the following conditions:
117 The above copyright notice and this permission notice shall be included
118 in all copies or substantial portions of the Software.
120 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
121 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
122 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
123 THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
124 OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
125 ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
126 OTHER DEALINGS IN THE SOFTWARE.