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
66 http://fletcher.freeshell.org
71 C<$ign_file> name to use for hide files. Defaults to
76 Your C<hide> should look like this:
81 One entry per line. You should be able to use regexes. Works just like exclude in this regard.
85 original exclude Blosxom Plug-in
86 Copyright 2003, Breyten Ernsting
88 (This license is the same as Blosxom's)
90 Permission is hereby granted, free of charge, to any person obtaining a
91 copy of this software and associated documentation files (the "Software"),
92 to deal in the Software without restriction, including without limitation
93 the rights to use, copy, modify, merge, publish, distribute, sublicense,
94 and/or sell copies of the Software, and to permit persons to whom the
95 Software is furnished to do so, subject to the following conditions:
97 The above copyright notice and this permission notice shall be included
98 in all copies or substantial portions of the Software.
100 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
101 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
102 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
103 THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
104 OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
105 ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
106 OTHER DEALINGS IN THE SOFTWARE.