[Digikam-users] PHP Script for HTML Album

Thorben Kröger thorbenk at gmx.net
Wed Jan 25 23:07:30 GMT 2006


Hello,
I recently got a digital camera and began to use Digikam. It's a great 
program, I particularly like that you can assign tags to photos.

However, the HTML export isn't that great (yet; it will be rewritten at some 
point, I was told in the IRC channel).

What I missed most was that the tags where not exported to HTML, so I wrote 
the attached PHP script to be run on a webserver to view the photos and be 
able to browse them by tags or album.

The script queries the SQLite database of digikam directly.
-> On the front page, there are links to all the albums you wanted to be 
exported plus a tree of all the tags that these images have.
-> Clicking on a tag or album will show you all those images associated with 
the tag / album.
-> When viewing a thumbnail page, there is the list of tags under every image, 
for example [IMG] has People -> Friends -> XYZ and Locations -> ABC. Every 
entry is a link, so you can browse all the photos of your friends etc...

I wrote this script over the weekend, so don't expect too much from it.
It works for me.
But you need to run the script on a webserver using PHP5 and configure the 
script to fit your needs. Please have a look at the comments at the beginning 
of the file.
Using wget or something, you could also mirror the generated pages and create 
a static version of them to be burned on a CD...

At the moment I don't have a lot of time, so if anyone finds this idea useful, 
please improve the script :-)
Maybe the idea of being able to browse your photos by tags could even be 
incorporated in the new HTML export plugin (just as an idea, I've no idea how 
one could do that)

Thorben
-------------- next part --------------
A non-text attachment was scrubbed...
Name: phpdigikam.php
Type: application/x-php
Size: 14670 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/digikam-users/attachments/20060125/d4c74041/attachment.bin>


More information about the Digikam-users mailing list