Some users have the comments for images stored in an external database and want JAlbum to use this info. Here's how to connect JAlbum to an external database. The example assumes that you are able to create an "ODBC datasource" for the database. In Windows you do this using the Control Panel. The datasource in this example is called "commentdb" and it happens to point to an MS Access database (could be any database) that contains a table called "comments". The table has two columns, one "filename" and one "comment" column. Here's how to read the data from this table into JAlbum and add the right comment to each image:
Step 1 Create a comments table in a database with the two columns "filename" and "comment".
Step 2. Fill the table with some data.
Step 3, create an ODBC datasource called "commentdb" pointing to your database (With MS Access you point the name to the .mdb file itself).
Step 4, start JAlbum, select a skin you wish to modify and add the following to the top of the index.htt file of the skin:
The whole contents of the "comments" table is now stored in the Map type object called "comments". Now edit the slide.htt file and add the comment for each image where you want it to show. Write like this:
I am new to Jalbum. I have taken many many photos and would like to organize it in digital album by using browser to view them. I 've been trying to use your code to bring in comments from a Access table. But it did not work form. The comments did not show in the album.
Here is what I did:
1. Create an Access Database file with a table named as "comments"
2. In the table "comments", I defined 3 columns: ID, fileName, comments
I also tried to delete one column (ID). It did not work either.
3. Cut and paste your code in "index.htt", in the directory: C:\jAlbum74\skins\Chameleon
4. placed <%= comments.get(fileName) %> in "slide.htt" file as illustrated below.