I am moving a collection of photographs on to a charity's website. I am not currently using JAlbum.
Each photograph has an associated entry in a database, currently a MySQL database. The data includes date, author, comments, categories and location for each photograph.
I see from the FAQs JAlbum will accept associated information from a text file. Is it possible to drop this data directly into JAlbum from MySQL? Has anyone here attempted anything similar? Would there be any pitfalls or barriers in trying to do this?
Any guidance or advice would be very welcome. Also, is there a limit on how many photgraphs JAlbum can cope with?
Here's one solution--create a text file by hand or via JAlbum for one of your images. Once you have that first sample text file, you can write a small program to read the information from the MySQL database and create similar text files for every image.
Another solution (time consuming if you have a lot of photos) is to manually create the text files yourself, and just query the MySQL database and literally cut-and-paste the info.
If you have access to a database then you're probably on a server that supports some sort of server-side scripting like php or asp, right?
If so, then you could use JAlbum to output php/asp pages instead of static HTML. Just add some code that queries the database for the information given the filename.
Check out the "Bypassing scriptlets" section in the wiki developer docs to see how to output scripting tags needed for asp or php.
Oh - don't forget to change the page extension for your file (the advanced tab in JAlbum)
Thank you for your advice, I will explore these options.
The first suggestion to "create similar text files for every image" sounds a little long winded and not my idea of geting the machine to do the work! My initial port involves 1000 photographs. There is an estimate of 10,000 unique images in the final project. If text files were the only option then JAlbum would not be my choice of software.
Regarding the second post from Engblom: yes you are correct, I have "server-side scripting like php". My initial work has relied heavily on the scripting facilities. The fact that JAlbum supports scripting is the answer I was looking for - thanks. I will investigate this and post my results.
p.s. you have a cool name
I like Engblom's solution as well, I'd go with that one.
As far as text files, however, the computer will still do all the work. You'd just have to write a little routine that queries the database for each image's information and spits it out to a text file. Once you set up the first one, the rest is automated. However, this solution is only useful if you plan to get rid of the MySQL database, which now I understand you intend to keep.