The PhotoKorNer @ the JoeKorNer has been operational
since 2004. It is based on a CGI PERL script that contains a list of photos and
captions and lists them randomly every ten minutes. The visitor may view the
photo in a new larger window by clicking on the photo. A new photo may be
displayed by reloading the frame or clicking on the new photo link.
In its original form, the full photo was displayed in
a new window as a plain URL. I was not happy with that and wanted to improve
the way it appears. I had thought that a second CGI script would be the key. By
passing the file name and caption to a new script, I thought I could build a
full size document. After two weeks of searching various sources, I
concluded that what I wanted was possible, but I couldn't understand the
method. Finally, I found a reference that showed me how to pass varibles
into a regular web page! it's so simple that it's scary. Though the direct
instructions didn't seem to work, using the split keyword in
Javascript. However it gave me a clue as to how to do it. If a
? is in the URL, the file will load, but ignore the stuff after
the ?. Here are the remaining steps:
Using Javascript, set a variable to the value of the
whole URL using the location.href key word.
? separates the document from the photo URL.
^ separates the photo URL from the caption.
Use the indexOf and lastIndexOf key words
to find the ? and the / for the beginning of the
photo's URL and end of the directory that it is in.
Use the indexOf to find the position of the
^ that begins the caption
Use the For and If-Else to find the
annoying %20 that replace spaces in the URL. For
example: West%20End%20W%20train%20at%20Ninth%20Ave needs to be changed to West End W train
at Ninth Ave
Add the H1 tag around the whole page. including the
short file name, the IMG tag around the URL of the photo, and the
converted caption into the whole package.
In the CGI script change the HREF in the
A tag to the blank document and concatenate the ?
with the url of the photo and the ^ with the caption.
Then I went to town with it on other types of displays.
The
Dining
Car Menus now are sized to a maximum of about 1000 pixels wide, the Don
Harold photos are displayed slightly larger than the scanned size, a number of
other drawings are also expanded. All with this same method.
On 8/25/06, I added a way to deactivate the PhotoKorNer
(though I can't figure out why anyone would do that!)