Have you ever had a dream, my dear readers? A modest, not so modest or a
very perverse one? I bet you had. To touch silicon of Pamela Anderson,
or to earn one millon dollars developing software, without selling
heroine or killing someone.. I had a dream too. I'd been wanting a
digital photo camera during last three years. The point is that having
once tried this product of the modern technology I realized that all of
those development, printing and scanning steps were extraneous. Anyway I
scanned printed shots. And if it's possible to press a button and to get
a result immediately, why be bothered with other stuff? However,
everyone knows the situation with electronics of such a kind in Ukraine.
When in shops it's only possible to find expensive models for the
minimum price of 700$. With my incomes there it was absolutely
impossible. It appeared though that in Romania it's the same, as well as
Finally, two days ago I get such a gadget for myself. There was a
company which had a good variety of prices. I chose the HP
, model, the U.S. price of which is about 200$. Here though I
had to pay three hundred and something. But did I have a choice? At least
it had 2.3Mpix, 1800x1200 and an acceptable price.
Had to play around to get it work in Linux. Finally I had to compile the
SCSI and USB storage devices support in the kernel, so now it's just
enough to connect the camera and to mount it as an USB hard disk. A tree
of directories appears, through which it's possible to navigate and to
copy images to the disk.
After there was no problem to fetch the shots from the camera, I got my
hands on another thing - publishing images on the site along with
comments for them. There are a lot of intresting things in everyday
which are worth noticing. And I'm really upset when I do miss them
having a camera with me. Hope now the situation will change. For
example, here in Romania numbers of cars consist of two letters of a
region (IS - Iasi, B - Bucharest, etc), two numbers and other three
letters. Sometimes it's possible too see very funny combinations, like
SUX, TUX, WTF, etc. So, I'm gonna start collecting shots of such stuff.
Anyway, I was speaking of another thing. Had to find a useful toolset
put out photographs. It was not convenient anymore to make
and update HTML code manually. On freshmeat
I found an intresting
called The Gallery
. It was
a set of
PHP scripts which made it possible to make a web gallery. All
interface for a user as well as for an administrator was simple.
Photographs were uploaded through web, and all the transformations were
made "on fly". There was no need to make something by half on the site
of the server. Also, it's easy to install. BTW, the photos
section had turned into a
powered by the tool.
Though, I wish it had been that easy. Since my site is bi-lingual (at
least for now; there can be also a version in Romanian if it will go
well with publications in Romanian computer press), I needed the header
with the menus and stuff to be shown in a language which a user had
chosen browsing pages. Having thinked a little bit, I found a recipe
which I'll share with you now.
Everything's done with a single global variable. It's called lang in my
code. For entering into gallery the "entry point" script language.php is
used (see below). Since it resides in the gallery/ directory, redirection
refers to index.php in the same place.
$HTTP_SESSION_VARS["lang"] = $l;
The gallery link now will look like this:
Once it's done, we have a possibility to use the lang variable in the
header and footer templates. For example, to include files with site
elements in different languages. Here's how I did that:
$GLOBALS["lang"] = "eng";
As to multi-lingual comments and captions for albums and pictures, the
software author answered the following: This would be very
challenging in G1. We *may* do this in G2, but it's been a subject of
much debate on the -devel mailing list. Read the archives and get
involved in the discussion there. Really, it's quite a difficult
task to implement such a feature within an easy to use user interface.
So it needs to be projected well before. However, for now the gallery
suits me perfectly. BTW, about its author. From the project's site there
is a link to his homepage. Worth taking a