2 # Author: Nelson Minar <nelson@monkey.org>
4 # http://www.nelson.monkey.org/~nelson/weblog/
5 # License: Public Domain
7 # The file plugin loads files from a directory and defines them as
8 # variables for use in your stories. Ie: if you have a file named
9 # "foo", then the variable $file::foo will be set to the contents
10 # of the file "foo" and will be substituted in your stories and such.
11 # Files are loaded from $plugin_dir/filedata
17 # Startup - scan filedata dir, read files into variables
19 $datadir = $blosxom::datadir . "/filedata";
21 if ( $datadir and opendir D, $datadir ) {
22 foreach my $f (readdir D) {
23 next unless -f "$datadir/$f";
24 open F, "$datadir/$f";