2 # Blosxom Plugin: multcat
3 # Author(s): Axel Beckert <blosxom@deuxchevaux.org>
5 # Licensing: GPL v2 or newer, http://www.gnu.org/licenses/gpl.txt
6 # multcat web page: http://noone.org/blosxom/multcat
7 # Blosxom web page: http://www.blosxom.com/
11 # This is a plugin for blosxom.
15 # Just drop it into your blosxoms plugin directory and it should start
16 # working. It needs a symbolic link supporting operating system, so it
17 # may not work under Windows. Unices should work fine, if you don't do
18 # ugly things with file systems. ;-)
22 # It allows to have postings in multiple categories without having
23 # them multiple times on the main page or any category's page which
24 # includes at least two categories, the posting appears in. Designed
25 # to work together with categorytree, which still counts all
26 # occurrences of a posting.
30 # If you change the plugin order and have the categorytree plugin
31 # installed, it must come before multcat to work as intended.
33 # If you have the moreentries plugin installed, you may change it's
34 # position in the plugin order to run after multcat.
38 # 0.01: Initial release
48 my ($pkg, $files_ref) = @_;
51 #grep { m(^$blosxom::datadir/?$blosxom::path_info) }
59 $localfiles{$_} = $files_ref->{$_} if m(/$blosxom::path_info);
62 foreach my $key ( @keys ) {
64 my $dest = readlink($key);
66 $dest = dirname($key)."/$dest";
67 while ($dest =~ m(/../)) {
68 $dest =~ s(/[^/]+/\.\./)(/);
70 $debug2{$key} = $dest;
73 my $destdate = $localfiles{$dest};
75 # The found symlink is not a story which is to be
76 # displayed, so we don't need to extinct it from the
78 next unless $destdate;
80 delete($files_ref->{$key});
85 $debug = Dumper $blosxom::path_info, $files_ref, \@keys, \%localfiles, \%debug, \%debug2, \%debug3;