
TTG XML Auto Index automatically generates an album index, a table of contents, for your Lightroom web photo galleries. You add a gallery, the index adds an entry automatically. It's magic PHP.
Download | Sample Gallery | Forum Thread | Installation
TTG XML Auto Index is written in Lua. It requires Lightroom 1.3 or higher, and a web server running PHP. Updates are automatic. Coding experience is not necessary.
TTG XML Album Index outputs valid XHTML and CSS.
Select a handful of images from the Lightroom Library module. Which images aren't important; ultimately, they won't be a part of your album index. You'll just be using them as visual representations while stylizing your gallery. With images chosen, move to the Web module and select the TTG XML Auto Index from the Galleries list.
Configure the album index's appearance to your liking and hit the Export button. Export the gallery to your desktop.
Open the exported gallery folder. Delete the index.html file and the thumbnails folder. You won't need them.
Upload the remaining contents to a folder on your web server using an FTP client.
TTG XML Auto Index will automatically detect supported gallery types residing in the album index's folder on your web server. To add a gallery to the index, simply upload a supported web gallery to the index's folder on your server using an FTP client, or export the gallery directly from the Web module to your server using Lightroom's inbuilt Upload feature.
Support will soon be added to other TTG galleries.
TTG XML Auto Index is not limited to indexing supported gallery types, however. Other galleries, or any other type of media, can be added to the album index manually.
The album index will create entries for any sub-folder containing an autoindex.xml file. The file can be empty, just so long as it exists. To make the most of the index, however, the XML file accepts the following information:
<album>
<thumbnail>Path to thumbnail image</thumbnail>
<title>Album Title</title>
<description>Album Description</description>
<url>Path to content</url>
</album>
To better understand how to use the XML file, see Index Behavior, below.
To make the most of TTG XML Auto Index, advanced users may want to know exactly how it works.
The album index runs from the index.php file. When loaded into the browser, the page includes the head.html and header.html files. Page headers may be customized by editing the header.html file. Do not edit the index.php file, or you may forfeit its functionality.
On load, the album index searches through all of its sub-folders to a depth of one level. For each folder in which it finds an autoindex.xml file, it will create an album entry. The autoindex.xml file can be completely empty, or can be filled out as shown above, just so long as it exists. If the file is found, the album entry will be created according to the following guidelines:
1) If a thumbnail image is specified, that thumbnail will be displayed. If no thumbnail is specified, the album index will select an image at random from the thumbnails folder contained within that sub-folder. If no thumbnails exist, the album item will display the default thumbnail image.
The thumbnail path should be written relative to the gallery root, usually "thumbnails/filename.jpg".
2) If a title is specified, that title will be displayed. If no title is specified, the album item will display the text "No Title".
3) If a description is specified, that description will be displayed. If no description is specified, the album item will display the text "No Description".
4) If a relative or absolute URL is specified, the album entry will link to that URL. If no URL is specified, the album entry will default to the sub-directory. The browser will serve index.html or index.php by default. If no URL is specified, and no index file exists, the album entry will probably lead to a Page Not Found error.
By default, albums will be listed in numeric-alpha order, normal behavior for files listed in a folder. This order can be reversed by opening the index.php folder and changing the boolean value on line 15.
TTG XML Auto Index would not be possible without the excellent PHP written by my good friend Zach Bardon. In addition to his scripting prowess, Zach is also an excellent musician. Give him a listen.
If you enjoy my work and would like to pay for it, I accept donations via PayPal. Donations are wholly unnecessary, but would be greatly appreciated. Thank you!
Send this article to a friend »
« Next Article | ... ... | Previous Article »