1 # Generic configuration file for UCW::Gallery
14 my $current_dir = getcwd;
15 if (($base_dir, $gallery) = $current_dir =~ m{(.*)/lib/photos/(.*)}) {
16 # We are called from the generated web tree
17 $static_dir = "$base_dir/static";
18 $lib_dir = "$base_dir/lib";
19 } elsif (($base_dir, $gallery) = $current_dir =~ m{(.*/web)/photos/(.*)}) {
20 # We are called from the source tree
21 $static_dir = "$base_dir/static"; # Expecting symlink to static
24 die "photos/default.cf: Please call me from the right directory\n";
28 use lib "$lib_dir/perl";
30 my $gal = UCW::Gallery->new();
33 OrigDir => '/home/mj/photos',
34 PhotoDir => "$static_dir/gallery/photo/$gallery",
35 CacheDir => "$static_dir/gallery/cache/$gallery",
38 PhotoUrlPrefix => 'photo/', # Rewritten by mod_rewrite later
39 ThumbUrlPrefix => 'thumb/',
40 ThemeUrlPrefix => '/gal/',
42 ParentURL => '/photos/',
43 WebHeadExtras => "<link rel=stylesheet href='/mj.css' type='text/css' media=all>\n",
44 WebBotExtras => sub ($) {
46 return "" if $self->showing_image;
47 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>";
49 <div class=gal-bottom><p class=gal-sep><hr>
50 <form action='.' method=POST>