« October 2007 | Main | February 2008 »

November 2007 Archives

November 07, 2007

An online gallery generator

I've been spending a large amount of time over the past few weeks designing a website with a focus on photography.  I have several requirements, such as being easy to update, having a simple database, sporting a clean design, as well as displaying only photo content.  What's not on my list is just as important as what is.  I don't want, tagging, comments, blog; any content other than pictures.  But of all the site requirements, the most important is the ease of update, which means I want as automated a process as possible to upload photo galleries.

At first I had 2 choices: I could build the system myself, or I could look for an existing solution.  Not wanting to reinvent the wheel, and lacking any motivation to code from scratch what I was certain already existed, I started rooting about the web for a good application to create my galleries.  I decided any gallery generator should meet certain criteria:

  • It must be an off line generator.  I'm not fond of maintaining a dynamic gallery, and prefer the ability to package a gallery, and treat that as a site object, which meant an offline application to generate the gallery.
  • It must output pages with my choice of file extension.  I want PHP files, and although I don't want a dynamic online system, the site is PHP and integration is important.
  • It must be template based.
  • It must resize images and create thumbnails by itself, to my specifications.
  • All photos must be on my server only.

My first thought was to look at Adobe Lightroom.  I use Lightroom to organize my images, so it seemed logical to me that I'd do best if I could use the Web module to create my gallery.  It failed on all but the first count.  It is an offline generator, but does not allow me to change the file extension (I only get *.html files) so no PHP, and it's not template based.  One can create a custom template for Lightroom, but it's not simple and requires a snowstorm of XML config files, plus XSLT to create the final output.  It's not that XSLT is bad necessarily (a disappointment maybe, but not bad), it's just not my tool for this simple job.

Then I began to search for other solutions.  Of course, the online galleries such as Flickr were out because the require my pictures reside on their servers.  Other systems, such as Zenphoto (an excellent PHP photo gallery) were server side applications where I upload photos via a browser based admin interface and it creates galleries on the fly.

I was really tempted to use Zenphoto, or use it as a starting point and modify it to my own use, but I really prefer not to have a server side solution.  I don't want to have to protect an admin page which grants dangerous access to my content and database.  This only provides an unnecessary attack vector, and I choose peace of mind over possible security concern.  Plus, I don't want the images to be central to the site.  I want each gallery package to be an individual unit, instead of a dynamically generated collection of individual units.

So I kept looking and found little that met my requirements.  Many of the tools I tried fell short on one or more points and I'm not yet willing to compromise.  Some output beautiful, valid XHTML code, with no way to customize to a useful degree.  Others provided no template mechanism, just some built in themes.  Most are quite useful for sharing family photos or vacation shots, but not as the workhorse of a commercial photography website.

I finally demoed Extreme Thumbnail Generator from Extreme Internet Software.  This tool hit the mark on the template requirement, and has enough options to allow me almost full control over gallery generation.  I'm not that pleased to see output in HTML tables, but I can work around that and apply my own style.  I was able to get gallery templates built, configured, saved, and have a gallery generated that integrates perfectly with my PHP site in about an hour and a half.  After a few more tweaks and tests, I was gladly filling out a purchase form for a full license.

My one frustration came in trying to set up the thumbnail page menu bars.  I want the menu bar to show, in order, a link to the first page, a link to the previous page, a link to each page by number, a link to the next page, and a link to the last page.  ETG did everything but the numbered links.  From a usability standpoint, this would have been a showstopper for me, but they do provide a variety of template tags, page count among them, that I can generate number links with just a few lines of PHP script.

I've now got a solution that works, and has enough flexibility to provide me enough room to grow over time as the site (like all eventually do) expands.  I'm able to upload the gallery folder, add the details to the database using the MySQL query tool, and let the site take care of the rest.  Now, on to building the other pages.  Will have code samples up soon, along with links to new site when live.

November 13, 2007

Police on the train

I saw a police officer on the train this morning.  Two, in fact, checking people for valid fare.  For those who haven't experienced it, Portland has an odd light rail system, very convenient, but run entirely on the honor system.  There are no gated platforms, no ticket agent, no conductor.  A passenger buys a ticket from a machine by the tracks, and gets on a train.  The train operator is in a sealed compartment, has no contact with passengers, and the tickets aren't checked.

It doesn't take a genius to figure out all passengers may not have valid fare when riding the train.  Good for them if they can work a system with designed flexibility, and thanks for a system that provides some leeway for folks who might be in a tough spot and still need to get somewhere.  Heck, I've ridden without fare more than once, and appreciate the accommodation.  But the openness of the system invites more than just a free ride, which is why it's surprising to see police on the train so rarely.

Anyone familiar with local propaganda in Portland knows transit crime has been much in the news lately.  The fourth estate has found "outrage" over transit crime, and excitement bubbles from the pages as from children playing with a new toy.  It's good Christmas marketing (shop downtown, you'll be safe), and while tempted to ask, why now, the real question is, why did it take so long to notice?  The system is set up for crime.  There is no security on the train, and between stations, if crime happens, where do you go?

I've been riding public transportation in Portland nearly everyday for 5 years, and saw my first police officer on the train this morning.  In contrast, I've witnessed more than one criminal act, and the first was not recent.  Understand, we are not talking felonies here, just the annoying, pain in the ass behavior no one likes to see.  I saw a fist fight on a bus.  More than once I've seen inebriated and momentarily enamored men fawn over unreceptive young women.  Arguments are plenty, and sometimes domestic.  The level of profanity in loud conversations is near intolerable, and lately, I now get panhandled when riding downtown.  I've seen people smoke on the bus and drink on the train.  None of this is really jail time crime, and not all of it is even crime, but it all adds up to an uncomfortable, unpleasant, journey that, even if not, is easy to perceive as threatening.  Which gets thoroughly compounded by Portland's particular pains in the ass canvassing for political signatures on any number of petitions, OSPRIG drones and Greenpeace obnoxiously cluttering every platform downtown, and the endless, I mean endless, parade of panhandlers.

It's a mess that needs cleaning, and while we thankfully don't have the level of crime as other cities, we are but a step away.  And even though the heat just add an additional hassle to  the ride, their presence may get people to calm down a little.  I question the commitment, however.  When I saw the police officer this morning, he was the first I've seen on a train or bus ever.  The first one in 5 years; the first one in what I estimate at a minimum of 2 trips a day, not always on weekends, and not counting transfers, about 3400 rides.  Not surprisingly, I mentioned it, noting my surprise at finally seeing a cop on the train.  His reply was characteristically direct, "we've been riding the train for 9 years."  The truth is, no they haven't.

In Portland, they hang out in front of Peterson's, or park on the sidewalk next to Starbuck's at the US Bancorp Tower.  In Beaverton, there is more of a police presence at the transit center, and to their credit, they occasionally get out of their cars, but understand that in both Beaverton, and Portland, the police do not ride on the trains.  Gresham authorities are taking a very self congratulating public stand about putting cops on the trains, but, well, no shit.  A 72 year old man was beaten with a baseball bat there last week while getting off the train.  The Gresham police chief's response was, in essence, "we can't be everywhere."  So no kidding they make a big production out of patrolling the transportation system.  Finally

On the West Side, the mayor of Beaverton is trying to organize a transit police department for Washington County.  This is good news, and has apparently been in the works for a while, but Beaverton has always seemed more proactive about transit security than elsewhere.

Overall, however, the commitment isn't real.  Tri-Met, the transit authority, doesn't seem interested in security, and have offered the standard response of pledging to install cameras.  Cameras don't stop a beating, or break up a drug deal.  Plus they've taken a very cool attitude to the appearance of the Guardian Angels.  The Angels have been in Portland a few years, but their interest is in helping people, not protecting property and business, so it's natural authority will not welcome them.  The revisionist attitude displayed by the police officer on the train this morning is the real give away, however.  If it seems they have always been there, the problem, then, must really not be any worse.  And one has to assume it's all for show until transit crime is no longer front page news.  Which should be sometime in early January I suppose.

About

Contact

Recent Posts

Police on the train

An online gallery generator

subscribe Subscribe
[What is this?]

attensa button

Categories

Archives

March 2008

February 2008

November 2007

October 2007

September 2007

August 2007

July 2007

June 2007

May 2007

April 2007

March 2007

January 2007

Links

Kenny Mencher

R. L. Croft

Poochini Pet Portraits

Melody Saunders Photography