Mail Index


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[ApacheGallery] Apache Gallery Mods




I'm made some modifications to AG that I figured I'd share in case anyone wants to use them. There's also a few bug fixes. All my changes are against snapshot r256.

Bug Fix 1:

When using a User dir (ie http://acmehost.com/~lefty/) the directory structure resides in the user home dir, not document root. Without this change no more images are created in the .cache for ~lefty. I made the fix this way, and it seems to work fine for me so far.
line 118:
-my $filename = $r->document_root().$r->uri();
+my $filename = $r->filename().$r->path_info();

The second bug fix is the title not showing up on the gallery pages, but someone else posted a patch for that last week and I incorporated that into mine too.

The first major modification I did was merge the .comment, .folder and .rotate files. I didn't like that idea of having separate files for all the functions so I changed mine to just use .comment. I've also set it up to Memoize the get_comment function to reduce file access. Order in the file doesn't matter, as any line starting with TITLE:, ROTATE:, or LINK: will get interpreted as those keys, all other lines are assumed to be part of the comment.

---------------------------------
TITLE:  Title of Gallery
ROTATE:  1
LINK:  Folder Link Text Here
Multi-line text description
goes everywhere after.
----------------------------------

The second major modification was to switch to ImageMagick instead of Imlib. Most people probably won't like or want this one. I don't have the X libraries installed and don't plan on installing them, so using Image::Magick makes it easier. This also adds GIF support and some other formats that I haven't coded it to use yet (So yeah the patch also adds GIF to the supported formats list). I'm pretty positive that I've got the Copyright Image and Copyright Text features working like they would be for Imlib, but I haven't tested them super extensively.

I've made a patch available if anyone wants it at:
http://acmehost.com/~lefty/patches/gallery-r256.patch

It's all one big patch for all my changes, so I'm sorry if anyone wanted to pick and choose what they changed. Also as this was mostly just fixes for myself at the time, I haven't fixed many of the comments on the code I changed. So I'm sorry if they are somewhat confusing.


_______________________________________________
users mailing list
users@xxxxxxxxxxxxxxxx
http://ufo.hestdesign.com/cgi-bin/mailman/listinfo/agusers