It was a simple enough requirement: We wanted to put photographs of our son's football games online so parents and supporters of the team could buy prints, with the profits going into the team's coffers.
The constraints were that the system would have to look good and be easy to use when implemented, work on most people's computers and be easy to manage. This last issue was crucial because as we have, after weeding out the duds, around 150 photos per game (ah, the wonder of digital cameras) and we're up to our eighth game (we're eight for eight!), management for around 1,000 photos is pretty important.
We decided to look for a Flash-based system because something around 98% of users have Flash installed. We first found a couple that looked promising, but they were too expensive, at more than $200, and not flexible enough.
We finally discovered Darren's $5 Script Archive, which has a section devoted to Flash Image Galleries. These scripts are, indeed, $5 each, and they are really pretty good.
We purchased and fooled around with a number of these galleries and decided the one that looked the nicest and had the best interface was Fast Gallery 2.2. The gallery has thumbnails that can be different from the picture shown in the main window. You can zoom in and out of the main window and drag the zoomed contents around, and if you click on the main window, the full-resolution picture is loaded into a pop-up. Finally, you can print the picture, disable any or all of the controls and change the colors used as well as the layout - four layout versions are included.
Then we had an "ah-ha" moment, as in "oh rats." The reason for this was that the configuration file for the gallery is an XML file that lists all of the images to be displayed. For each photo the XML data looks like this:
<image thumb="thumbsdir/image2-thumb.jpg">imagedir/image2.jpg</image>
<captiontext>image 2 text</captiontext>
<imageurl popupwidth="460" popupheight="425">bigimagedir/image2.jpg</imageurl>
You can use the same file for the thumbnail, the large-scaled image and the pop-up image, but remember we have around 1,000 photos to deal with, so this would be a lot of work to create by hand. Obviously, a bit of programming was in order, and this was a fine time to test a product we've been meaning to write about for a few months: RealBasic from Real Software.
RealBasic is an outstanding version of the BASIC language. It consists of an integrated development environment that supports the creation of application user interfaces by dragging and dropping components onto a window. RealBasic includes more than 40 user interface controls, such as buttons, fields, sliders and progress bars.
There also is a code editor, so that you can attach code to events, and there is support for SSL and database server connectors (Oracle, SQL Server, FileMaker Server and MySQL are included).
Most impressively, RealBasic will generate applications that work consistently on Windows, Macintosh and Linux!
We started building an application, and RealBasic is easy to use ... until you get ambitious. We coded a program that allows you to select a subdirectory, builds an array of filenames and then substitutes the filenames in the XML text.
Then we got ambitious. Because dealing with even 200 files takes a while, we added a report on the files to be processed and included a progress bar. Then we tried to add an editor to allow you to set the various display configuration parameters and an image viewer so you could view and omit photos you didn't like. The configuration editor was easy, but we got hung up figuring out how the image-display component works, and we ran out of time.
More next week. In the meantime, code a comment to gearhead@gibbs.com. Oh yeah, don't forget Gibbsblog.
| Use this form to start a public discussion with other Linux World users on this article. Log In | Register for an account (Why you should) |
Note: Register to have your user name appear; otherwise your comment will show up as "Anonymous."
*Anonymous comments will only appear once they are approved by the moderator.
• Dell puts Linux and Atom in Vostro PCs
• Mozilla names best Firefox 3 add-ons
• Torvalds: Fed up with the 'security circus'
• Dell Latitude ON - big win for Linux
• Open source advocates hail appeals court ruling
LinuxWorld Conference and Expo San Francisco, August 4-7, 2008.
Linux Plumbers Conference Portland, OR, Sept. 16-19, 2008.
FreedomHEC Santa Monica, November 8-9, 2008.