[KPhotoAlbum] PHP-web-frontend

Torben Menke tokes at web.de
Thu Jun 26 12:36:20 BST 2008


Hi folks,
I just rediscovered KPhotoalbum, haven't used it much for years, I just 
updated it with most of my pictures and I was quite surprised by all the  
cool new features! 

Ages ago I had the idea of writing a very simple php-based web frontend that 
does not use a sql-database (so no sql-server needed) but the index.xml-file. 
Yesterday I decided to give it a new try and I am quite satisfied with the 
result. It is still quite buggy, but it works :-)

You can check it out here:
http://tokes.to.funpic.de/kphotoalbum-export/index.php

my scripts can be found here:
http://tokes.to.funpic.de/kphotoalbum-export/php-frontend.zip

How it works:
1. you have to copy the images you want to publish on the web to a 
temp-folder, keeping the original file-structure (as stored in the xml file)
 - at this point it may be a good idea to rescale the images -
2. place a copy of your KPhotoAlbum-Datafile index.xml there.
3. run my perl script export.pl to generate a smaller version of the xml file. 
The script checks which of the images stored in the xml file are present in 
the temp. folder, removing all unused entries. Images are sorted 
by "startDate".
4. copy the new xml-file (index-php.xml) and your images (with all subfolders) 
to a webserver 
5. place the 2 .php files (index.php + display.php) there to
-done-

The scripts and my sample index-php.xml can be found here:
http://tokes.to.funpic.de/kphotoalbum-export/php-frontend.zip

As I did decided not to use a database-backend the webserver might get a 
little slow if one exports too many pictures, but I haven't chacked that yet. 
I think one should not try to export 1000 pictures for one web-frontend, but 
a few hundred should not be a problem.

Some missing features are: 
-only cats "Persons", "Locations" and "Keywords" are supported. Don't know if 
it would be easy to moify it for custom ones. 
-I did not start to work on super-cats

Greetings and thanks for KPhotoAlbum / KimDaBa

Torben Menke



More information about the Kphotoalbum mailing list