I am wanting to put something together where every time the script executes
it looks into a set directory for photos and then builds a web page with
those photos, or even a enlargeable thumbnail of the photo, in kind of a
photo album way. I don't know if something like this can be done in CGI or
not, and figure I would ask and see what everyone here says before I give it
a try, if it is possible maybe someone would have any tips or pointers that
would be helpful.
photo albums are a common CGI application , I think there may be some CPAN
modules all ready written that handle lots of stuff for you.
Writing one from scratch is a good learning experience , You can take a
modular approach or do a monolithic script .
Some stuff you might want to include is a template system like HTML::Template
and Image magick or perl magick image manipulation programs , to do stuff
like resize images making thumbs of full size images.
a lot of code is out on the net , do a search to start out and you will see
the diffrent approaches to this.
A lot depends on your server , and what they will permit . If you have
control then you can do just about anything CGI wise.
good luck
Greg
print start_html(-title=>"Photo Viewer v$version",
-author=>'ven...@vendion.net',
-meta=>{'copyright'=>'copyright 2009 Adam Jimerson'},
-style=>{'src'=>'/default.css'},
-script=>$jscript);
To get the javascript in the $jscript variable I am currently using a
here doc statement. I'm sure due to the length of my javascript code it
is slowing down my page being made. If linking to the code in the
header is possible then I'm sure it would be better than what I have now.