diff -Naur Apache-Gallery-1.0RC2/lib/Apache/Gallery.pm Apache-Gallery-1.0RC2.static/lib/Apache/Gallery.pm --- Apache-Gallery-1.0RC2/lib/Apache/Gallery.pm 2005-06-01 09:17:36.000000000 +0200 +++ Apache-Gallery-1.0RC2.static/lib/Apache/Gallery.pm 2006-06-22 13:05:24.000000000 +0200 @@ -113,9 +113,11 @@ # Selectmode providing checkboxes beside all thumbnails my $select_mode = $cgi->param('select'); + + my $url_base = $r->dir_config('GalleryURLBase'); # Let Apache serve icons without us modifying the request - if ($r->uri =~ m/^\/icons/i) { + if ($r->uri =~ m/^$url_base/) { return $::MP2 ? Apache2::Const::DECLINED() : Apache::Constants::DECLINED(); } # Lookup the file in the cache and scale the image if the cached @@ -206,6 +208,7 @@ $tpl_vars{TITLE} = "Index of: $uri"; $tpl_vars{META} = " "; + $tpl_vars{URL_BASE} = $url_base; unless (opendir (DIR, $filename)) { show_error ($r, 500, $!, "Unable to access directory $filename: $!"); @@ -1521,6 +1524,15 @@ No default value, this option is required. +=item B<GalleryURLBase> + +Base URL for all static files (icons, stylesheets, etc...) served by apache +directly. This option can be used both in your global configuration and in +.htaccess files, this way you can have different layouts in different parts of +your gallery. + +No default value, this option is required. + =item B<GalleryInfo> With this option you can define which EXIF information you would like diff -Naur Apache-Gallery-1.0RC2/templates/default/directory.tpl Apache-Gallery-1.0RC2.static/templates/default/directory.tpl --- Apache-Gallery-1.0RC2/templates/default/directory.tpl 2004-01-02 13:45:06.000000000 +0100 +++ Apache-Gallery-1.0RC2.static/templates/default/directory.tpl 2006-06-22 13:04:39.000000000 +0200 @@ -1 +1 @@ - <div id="folder"><a href="{ $FILEURL }/"><img border="0" src="/icons/gallery/agfolder.png"><br>{ $FILE }</a></div> + <div id="folder"><a href="{ $FILEURL }/"><img border="0" src="{ $URL_BASE }agfolder.png"><br>{ $FILE }</a></div> diff -Naur Apache-Gallery-1.0RC2/templates/default/file.tpl Apache-Gallery-1.0RC2.static/templates/default/file.tpl --- Apache-Gallery-1.0RC2/templates/default/file.tpl 2004-01-02 14:18:12.000000000 +0100 +++ Apache-Gallery-1.0RC2.static/templates/default/file.tpl 2006-06-22 13:04:39.000000000 +0200 @@ -1 +1 @@ - <div id="folder"><a href="{ $FILEURL }"><img border="0" alt="{ $ALT }" src="/icons/gallery/{ $FILETYPE }.png"><br>{ $FILE }</a></div> + <div id="folder"><a href="{ $FILEURL }"><img border="0" alt="{ $ALT }" src="{ $URL_BASE }{ $FILETYPE }.png"><br>{ $FILE }</a></div> diff -Naur Apache-Gallery-1.0RC2/templates/default/layout.tpl Apache-Gallery-1.0RC2.static/templates/default/layout.tpl --- Apache-Gallery-1.0RC2/templates/default/layout.tpl 2004-01-02 13:45:06.000000000 +0100 +++ Apache-Gallery-1.0RC2.static/templates/default/layout.tpl 2006-06-22 13:04:39.000000000 +0200 @@ -4,7 +4,7 @@ <html> <head> <title>{ $TITLE }</title> - <link rel="stylesheet" href="/gallery.css"> + <link rel="stylesheet" href="{ $URL_BASE }/default.css"> { $META } </head> diff -Naur Apache-Gallery-1.0RC2/templates/new/directory.tpl Apache-Gallery-1.0RC2.static/templates/new/directory.tpl --- Apache-Gallery-1.0RC2/templates/new/directory.tpl 2004-01-02 13:45:06.000000000 +0100 +++ Apache-Gallery-1.0RC2.static/templates/new/directory.tpl 2006-06-22 13:04:42.000000000 +0200 @@ -1 +1 @@ - <div class="folder"><a href="{ $FILEURL }/"><img src="/icons/gallery/agfolder.png" alt="* { $FILE }"><br>{ $FILE }</a></div> + <div class="folder"><a href="{ $FILEURL }/"><img src="{ $URL_BASE }agfolder.png" alt="* { $FILE }"><br>{ $FILE }</a></div> diff -Naur Apache-Gallery-1.0RC2/templates/new/file.tpl Apache-Gallery-1.0RC2.static/templates/new/file.tpl --- Apache-Gallery-1.0RC2/templates/new/file.tpl 2004-01-02 14:18:12.000000000 +0100 +++ Apache-Gallery-1.0RC2.static/templates/new/file.tpl 2006-06-22 13:04:42.000000000 +0200 @@ -1 +1 @@ - <div class="folder"><a href="{ $FILEURL }"><img border="0" alt="{ $ALT }" src="/icons/gallery/{ $FILETYPE }.png "><br>{ $FILE }</a></div> + <div class="folder"><a href="{ $FILEURL }"><img border="0" alt="{ $ALT }" src="{ $URL_BASE }{ $FILETYPE }.png "><br>{ $FILE }</a></div> diff -Naur Apache-Gallery-1.0RC2/templates/new/layout.tpl Apache-Gallery-1.0RC2.static/templates/new/layout.tpl --- Apache-Gallery-1.0RC2/templates/new/layout.tpl 2004-01-02 13:45:06.000000000 +0100 +++ Apache-Gallery-1.0RC2.static/templates/new/layout.tpl 2006-06-22 13:04:42.000000000 +0200 @@ -4,7 +4,7 @@ <html> <head> <title>{ $TITLE }</title> - <link rel="stylesheet" href="/gallery.css"> + <link rel="stylesheet" href="{ $URL_BASE }/new.css"> { $META } </head>