Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Web photo album, is this possible in CGI

1 view
Skip to first unread message

Adam Jimerson

unread,
May 9, 2009, 11:43:45 PM5/9/09
to beginn...@perl.org
Hi all,

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.

Greg Jetter

unread,
May 10, 2009, 2:46:44 PM5/10/09
to beginn...@perl.org

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

Bruce Ferrell

unread,
May 10, 2009, 7:25:49 PM5/10/09
to beginn...@perl.org

It's not CGI per se but it looks promising

http://search.cpan.org/~woody/Apache-Album-0.95/Album.pm

Adam Jimerson

unread,
May 23, 2009, 6:50:01 PM5/23/09
to beginn...@perl.org
It seems that my posts haven't been making it to the list, or have been
moderated for some reason. I would like to thank everyone for their
replies to my question I have have a starting place up and running. One
question that is bugging me now is how to link to an external javascript
file in the html header of the script? The page is here
http://vendion.net/cgi-bin/photoviewer.cgi but as you can see I have the
javascript directly in my page

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.

0 new messages