1 # Blosxom Plugin: zlocaldepth
2 # Author: Fletcher T. Penney
14 my ($pkg, $files) = @_;
16 if ($localdepth ne 0) {
17 @files_list = sort keys %$files;
19 $myroot = $blosxom::datadir ."/" . $blosxom::path_info;
21 $myroot =~ s/\/[^\/]+\.[^\/]+$//;
23 foreach (@files_list) {
24 if ($_ !~ /$myroot([^\/]*\/[^\/]*){0,$localdepth}$/) {
41 Blosxom Plug-in: zlocaldepth
45 This plugin restricts entries to those within the $zlocaldepth::localdepth variable, which works just like blosxom's $depth variable. Except that it is always calculated relative to the current directory. This is useful, because unlike the built-in depth variable, it can be appropriately set from a config file via the config plugin to easily allow different depths in different parts of your site.
48 BTW, the name starts with a z so that it will follow other plugins that affect
49 filters and abide by their settings.
53 None known; please send bug reports and feedback to the Blosxom
54 development mailing list <blosxom-devel@lists.sourceforge.net>.
58 Fletcher T. Penney - http://fletcher.freeshell.org
60 This plugin is now maintained by the Blosxom Sourceforge Team,
61 <blosxom-devel@lists.sourceforge.net>.
63 =head1 VERSION HISTORY
67 Corrected an issue with a depth of 1 and the root directory.
71 This source is submitted to the public domain. Feel free to use and modify
72 it. If you like, a comment in your modified source attributing credit to
73 myself for my work would be appreciated.
75 THIS SOFTWARE IS PROVIDED AS IS AND WITHOUT ANY WARRANTY OF ANY KIND. USE AT