CGI::Application::PhotoGallery 0.05 released

LTjake on 2005-09-13T12:53:14

I've neglected it for over 2 years but (finally) I've done some updates to my first CPAN module: CGI::Application::PhotoGallery

Updates of interest:

  • using Cache::FileCache rather than my (horrible) caching scheme
  • HTTP caching (Last-Modified => If-Modified-Since)
  • no more thumbnail size restrictions
  • captions are stored in 1 file only
  • using File::Find::Rule and MIME::Types to find and pick out images
  • no more gallery structure limitations - point it at a directory and it will find photos and photos in any sub-directory (and it will do so recursively as you navigate)
  • nicer looking templates -- now with 100% fewer tables

Even though I've added some extra dependencies, I'm very happy with the end result.


How strange..!

ajt on 2005-09-13T19:19:22

Someone asked me about web photo catalogue software earlier today. While checking something else on CPAN I spotted your module. I saw it last time I looked for a photo catalogue, but didn't bother with it as it looked old and unmaintained. I'll have to try it out now it's just had a refresh.

Re:How strange..!

LTjake on 2005-09-14T11:45:14

Please do! Let me know what you think -- good/bad/whatever -- so i can fix things up for another release.

It's meant to be low-barrier in terms of setup and usage, so I hope that comes across :)

Cheers.

Set up and working...

Phred on 2005-09-14T04:05:03

Cool stuff, pretty easy to setup and get going. I did run into a small bug though - my directory structure is /var/www/mywebsite.com, and in the main source package, line 298
$directory =~ s/\.//g;
filtered out my photos_dir so I changed it to
$directory =~ s/^\.//g;
and that did the trick.

Re:Set up and working...

LTjake on 2005-09-14T11:32:06

Hi! Thanks for checking out my module.

That error is the result of my failed attempt to not allow relative paths from the user.

So, rather, those few surrounding lines should probably be:

my $user_dir  = $self->query->param( 'dir' ) || '';

$user_dir     =~ s/\.\.//g;
$user_dir     =~ s/\/$//;

my $directory = $photo_dir . $user_dir ;

I've made this change in my CVS -- This will show up in the next release unless someone gives me a better way to do it :)

Thanks again!

Re:Set up and working...

Phred on 2005-09-14T18:28:02

I'll implement that and ping you if there are any issues.

On another note, I ran into some issues with using the default templates - on my setup the app croaked saying it couldn't find them. I don't have the exact error handy, but what would have really helped a lot in getting this going would be example usage of photos_index.tmpl and photos_single.tmpl in the Synopsis PARAMS section. I'd be willing to bet most users will want to customize those.