$(call lib-copy, UCW/Gallery.pm UCW/Gallery/Web.pm)
-$(call copy, $(addprefix nrt-blue/,back.png bot.png left.png next.png prev.png right.png top.png theme.pm style.css))
+$(call copy, $(addprefix nrt-blue/,back.png bot.png left.png next.png prev.png right.png top.png style.css))
+$(call lib-copy, nrt-blue/theme.pm)
our %CF;
-BEGIN {
- # FIXME: Check config
- $CF{'Title'} = 'An Unnamed Gallery',
- $CF{'HeadExtras'} = "",
- $CF{'TopExtras'} = "",
- $CF{'BotExtras'} = "",
- $CF{'ParentURL'} = '../',
- $CF{'BackURL'} = "",
- $CF{'FwdURL'} = "",
- $CF{'ImageSubpages'} = 1,
- $CF{'AllowArchives'} = 1,
- $CF{'PhotoUrlPrefix'} = "",
- $CF{'ThumbUrlPrefix'} = "",
- $CF{'MetaDataDir'} = '.',
- $CF{'PhotoDir'} = '.',
- # FIXME: Who sets GalDir?
-
- $CF{'ScanDefaultTransform'} = 's';
- $CF{'OrigDir'} = '.';
- $CF{'PhotoDir'} = 'photo';
- $CF{'CacheDir'} = 'cache',
- $CF{'PhotoMaxWidth'} = 1024,
- $CF{'PhotoMaxHeight'} = 1024,
- $CF{'ThumbFormats'} = {},
-}
+BEGIN { %CF = (
+ # Directories
+ OrigDir => '.', # Original images
+ PhotoDir => 'photo', # Scaled-down photos for web
+ CacheDir => 'cache', # Cache with meta-data and thumbnails
+ ThemeDir => 'gal', # Themes
+
+ # URL prefixes
+ PhotoUrlPrefix => 'photo/',
+ ThumbUrlPrefix => 'thumb/',
+ ThemeUrlPrefix => 'gal/',
+
+ # Processing machinery settings
+ ScanDefaultTransform => 's',
+ PhotoMaxWidth => 1024,
+ PhotoMaxHeight => 1024,
+ ThumbFormats => {}, # Set up by themes
+
+ # HTML output settings
+ Title => 'An Unnamed Gallery',
+ HeadExtras => "",
+ TopExtras => "",
+ BotExtras => "",
+ ParentURL => '../',
+ BackURL => "",
+ FwdURL => "",
+ ImageSubpages => 1,
+); }
sub LoadConfig() {
my $cfg = "./gallery.cf";
my $v = shift @_;
$CF{$o} = $v;
if ($o eq "Theme") {
- require $CF{"GalDir"} . "/$v/theme.pm";
- UCW::Gallery::Theme::Init($CF{"GalURL"} . "/$v");
+ require $CF{'ThemeDir'} . "/$v/theme.pm";
+ UCW::Gallery::Theme::Init($CF{'ThemeUrlPrefix'} . $v);
}
}
}