|
This website (Phototour of Minneapolis/cgstock.com)
is generated from picture information and other
content stored in a database. New pictures are added
using a graphic perl program I call "tkphotos".
It was created with perl-tk, see the screen shots below.
The GUI has three frames, which can display various lists
or fields of data:
- The left frame displays picture thumbnails.
- The center frame has two modes, picture
data and regular text content. When a picture is
clicked on, the center frame shows fields for
the picture's title, date, and links that should
go under it, keywords, and other fields.
The center frame will display a different
form for editing webpages. It changes to this mode when
a page is selected in the right frame. There are two tabs,
the first is a large text window, the second has fields
for meta-data such as title, description, and keywords.
Below is a screenshot with the center frame in the text-editing
mode, while I'm editing this page(the center frame has been
expanded to cover the left frame).
- The right frame has a text list,
which can display all the links in the database
or list all the text-based pages in the database
(pages without photos, like this one).
Double-clicking a page or hyperlink makes it
possible to edit it.
The tkphotos script is 2600 lines, and requires
Photos.pm and all of the following perl modules:
use DBI;
use Tk;
use Tk::JPEG;
use Tk::Pane;
use Tk::Dialog;
use Tk::NoteBook;
View source code
The link below will display the entire script for tkphotos as
a textfile. This version is from 2002, and is not meant
for end users, but might be useful to those with
perl experience. It requires MySQL and the database
tables I've designed.
tkphotos.txt
Photos.pm.txt (a module required by tkphotos)
|