Apache-Album
view release on metacpan or search on metacpan
subdirectory. You must also make the permissions for each
subdirectory so that the id which runs Apache can write to the
directory.
At this point, if you have PerlMagick installed, you can go to
I<http://your.site/albums/album_name> Apache::Album will create
thumbnails for each of the images, and send the caption.txt file along
with the thumbnails to the client's browser. The thumbnails are links
to the full sized images.
=over 2
=item The caption.txt file
The caption.txt file consists of two parts. The first part is
text/html that will be placed at the top of the html document. The
second part is a mapping of filenames to captions. The module will do
some simple mangling of the image file names to create the caption.
But if it finds a mapping in the caption.txt file, that value is used
instead. The value __END__ signifies the end of the first section and
the beginning of the second.
For example:
Image -> Bob_and_Jenny.jpg
Caption -> Bob and Jenny (the auto-generated caption)
override in caption.txt
Bob_and_Jenny.jpg: This is me with my sister <EM>Jenny</EM>.
Here is a sample caption.txt file:
<H1>My Birthday Party</H1>
<center>This is me at my Birthday Party!.</center>
__END__
pieinface.gif: Here's me getting hit the face with a pie.
john5.jpg: This is <A HREF="mailto:johndoe@nowhere.com">John</A>
=item ThumbNail Types
C<ThumbNailUse> can either be set to "width" or "aspect". If
C<ThumbNailUse> is set to "width", thumbnails that need to be created
will be C<ThumbNailWidth> wide, and the height will be modified to
keep the same aspect as the original image.
If C<ThumbNailUse> is set to "aspect", thumbnails that need to be
created will be transformed by the value of C<ThumbNailAspect>.
C<ThumbNailAspect> can be either a floating point number like 0.25 or
it can be a ratio like 2 / 11.
If an image file is updated, the corresponding thumbnail file will be
updated the next time the page is accessed. In practice I have found
that Netscape will used the cached images even if they are updated. I
normally have to flush the cache and reload to see the new images.
At any time you can C<rm -f tn__*> in the C<AlbumDir>/album_name/
directory, the next time the page is loaded all the thumbnails will be
regenerated. (Naturally image names that start with tn__ should be
renamed before placing them in the album directory.)
=item ThumbDir
URI which points to where the thumbnail hierarchy will live. Note
that in previous versions a thumbs subdirectory would be created.
This made traversal a bit more difficult and always made permission
creating a challenge. By putting all images created by the server in
one place we can easily track diskspace usage and make sure the server
sets up all permissions.
=item DefaultBrowserWidth
A general number of how wide you want the final table to be, not an
absolute number. If the next image would take it past this "invisible
line", a new row is started.
=item NumberOfColumns
Instead of using DefaultBrowserWidth and a guess at the number of
pixels, NumberOfColumns can be set to the maximum number of columns in
a table. The default is 0 (which causes DefaultBrowserWidth to be
used instead).
=item BodyArgs
This entire string is passed in the <BODY> tag. Useful for setting
background images, background color, link colors, etc. If set in the
httpd.conf file, you must put quotes around the value, and escape any
quotes in the value. If this value is set in the .htaccess file, this
is not necessary:
In httpd.conf: PerlSetVar BodyArgs "BACKGROUND=gray.gif text=\"#FFFFFF\""
In .htaccess : PerlSetVar BodyArgs BACKGROUND=gray.gif text="#FFFFFF"
=item OutsideTableBorder
This variable's value is passed to the outer table's BORDER attribute.
=item InsideTablesBorder
This variables's value is passed to all the inner table's BORDER
attributes. Note that the name of the C<InnerTablesBorder> has an 's'
in it, as it modifes all the inner tables.
=item SlideShowDelay
The number of seconds to spend on each picture when viewing a slide
show.
=item Footer
This text/html will placed at the bottom of the page after all the
thumbnails, but before the end of the page. Useful for links back to
a home page, mailto: tag, etc.
=item EditMode
Allows the user to create new albums and upload pictures. Obviously
there are security implications here, so if EditMode is turned on that
location should probably have some kind of security. Albums can share
( run in 0.489 second using v1.01-cache-2.11-cpan-8f98c5d2c55 )