1 # Generic configuration file for UCW::Gallery
16 my $current_dir = getcwd;
17 if (($base_dir, $gallery) = $current_dir =~ m{(.*)/lib/photos/(.*)}) {
18 # We are called from the generated web tree
19 $static_dir = "$base_dir/static";
20 $lib_dir = "$base_dir/lib";
21 } elsif (($base_dir, $gallery) = $current_dir =~ m{(.*/web)/photos/(.*)}) {
22 # We are called from the source tree
23 $static_dir = "$base_dir/static"; # Expecting symlink to static
26 die "photos/default.cf: Please call me from the right directory\n";
30 use lib "$lib_dir/perl";
32 my $gal = UCW::Gallery->new();
35 OrigDir => '/home/mj/photos',
36 PhotoDir => "$static_dir/gallery/photo/$gallery",
37 CacheDir => "$static_dir/gallery/cache/$gallery",
40 PhotoUrlPrefix => 'photo/', # Rewritten by mod_rewrite later
41 ThumbUrlPrefix => 'thumb/',
42 ThemeUrlPrefix => '/gal/',
44 ParentURL => '/photos/',
45 WebHeadExtras => "<link rel=stylesheet href='/mj.css' type='text/css' media=all>\n",
46 WebBotExtras => sub ($) {
48 return "" if $self->showing_image;
49 my $ziplink = "<p>The whole gallery can be also <button class=gal-zip type=submit name=a value=zip>downloaded as a ZIP archive.</button>";
51 <div class=gal-bottom><p class=gal-sep><hr>
52 <form action='.' method=POST>