2 # Author(s): Fletcher T. Penney http://fletcher.freeshell.org
4 # Based on exclude plug-in by Breyten Ernsting
6 # Modified version to only hide files when find plugin is not active.
7 # In other words, allow files to be shown when searching, but not browsing...
11 # --- Configurable variables -----
15 # --------------------------------
16 use CGI qw/:standard/;
19 $ign_fp = ($blosxom::path_info) ? "$blosxom::datadir/$blosxom::path_info" : "$blosxom::datadir";
20 $ign_ext = (-e "$ign_fp/${ign_file}.${blosxom::flavour}") ? ".${blosxom::flavour}" : "";
21 $ign_fn = "$ign_fp/$ign_file$ign_ext";
23 open(EXCLUDE, "< $ign_fn") or 1;
26 push(@excludes, "$ign_fp/$_") if $_;
33 my ($pkg, $files_ref) = @_;
34 my @files_list = keys %$files_ref;
36 return 0 if ((param('plugin') eq 'find') || (param('find')));
38 foreach $exclude (@excludes) {
39 foreach $ign_cf (@files_list) {
40 $ign_cf !~ m/^$exclude/ or delete $files_ref->{$ign_cf};
57 Purpose: Allows you to hide stories and categories from view while browsing, but still allow them to appear in the results of a search via my find plugin
65 C<$ign_file> name to use for hide files. Defaults to
70 Your C<hide> should look like this:
75 One entry per line. You should be able to use regexes. Works just like exclude in this regard.
79 None known; please send bug reports and feedback to the Blosxom
80 development mailing list <blosxom-devel@lists.sourceforge.net>.
84 Fletcher T. Penney, http://fletcher.freeshell.org
86 This plugin is now maintained by the Blosxom Sourceforge Team,
87 <blosxom-devel@lists.sourceforge.net>.
91 original exclude Blosxom Plug-in
92 Copyright 2003, Breyten Ernsting
94 (This license is the same as Blosxom's)
96 Permission is hereby granted, free of charge, to any person obtaining a
97 copy of this software and associated documentation files (the "Software"),
98 to deal in the Software without restriction, including without limitation
99 the rights to use, copy, modify, merge, publish, distribute, sublicense,
100 and/or sell copies of the Software, and to permit persons to whom the
101 Software is furnished to do so, subject to the following conditions:
103 The above copyright notice and this permission notice shall be included
104 in all copies or substantial portions of the Software.
106 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
107 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
108 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
109 THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
110 OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
111 ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
112 OTHER DEALINGS IN THE SOFTWARE.