• Feb
  • 03

TTG XML Album Index

Current version 1.41

Every tool has at least one intended purpose. Most of the best tools also have a number of unintended purposes. For example, the screwdriver’s intended purpose is to drive and remove screws. But it can also be used to pry open paint cans, as a pick to break things, or as a weapon, to name but a few of its myriad other unorthodox uses.

The intended purpose of the Adobe Lightroom Web module is to produce standalone web photo galleries. With a bit of finagling, however, it can also produce a photo gallery index that joins your Lightroom-produced, standalone galleries together.

TTG XML Album Index does the finagling for you.

TTG XML Album Index 1.41


Download | Sample Gallery | Forum Thread | Installation

New Hotness vs. Old’n Busted

XML – like fairy magic – makes good things better.

TTG XML Album Index serves the same purpose as the (now discontinued) TTG Gallery Index. It creates an album index, a table of contents, linking all of your web galleries together.

The original TTG Gallery Index suffered from a fatal flow, however. To update the index with new galleries, the entire index had to be regenerated and uploaded anew to the website. Hardly practical.

With TTG XML Album Index, updates are a breeze. The user creates and uploads their index once. To add galleries to the album index, the user need only upload a thumbnail image and set a handful of attributes for the gallery in the album index’s XML file. Yes, you’ll need a text-editor, but no coding experience is necessary. Read below for details.

System Requirements

TTG XML Album Index is written in Lua. It requires Lightroom 1.3 or higher, and a web server running PHP. Updates require an FTP client and a text-editor. Coding experience is not necessary.

TTG XML Album Index outputs valid XHTML and CSS.

Getting Started

TTG XML Album Index isn’t difficult to use, but neither is it as straight forward as other Web module plugins. Follow these guidelines, though, and you’ll have your index together in no time.

To begin with, produce some galleries. Use any type of gallery you want. When setting up the galleries, though, it’s probably a good idea to set Contact Info, located in the Labels pane, to “Gallery Index” and set the web link to the future location of your TTG XML Album Index index.html file. This will allow users to jump back to the gallery index from your individual galleries.

Once you have your galleries made, it’s time to bind them!

The first and most important steps of TTG XML Album Index creation happen in the Library module, so that’s where you need to begin.

Create a new collection or use the Quick Collection. For each of your galleries, select a representative image and add that image to the collection. These images will become the thumbnails in your index, so develop them however you’d like your thumbnails to show up. If you want square thumbnails, use the Develop module to crop them with a 1:1 ratio.

When you’re finished developing your thumbnails, return to the Library module and open your Metadata pane. Under metadata, fill in the following items according to these guidelines:

Title – Gallery title.

Caption – Gallery description.

CopyrightURL of the gallery the image is representing. URLs may be relative or absolute, but should point to each gallery’s index.html file.

That done, move to the Web module and select TTG XML Album Index from the Gallery pane in the upper right. Configure the gallery however you’d like.

Under the Image Settings pane, you will find three items: Title, Caption and GalleryLink. Ensure that all three items are enabled.

One-by-one, set the drop-list for each item to “Custom Settings” and select “Edit” to specify the output.

Title should be set to output the IPTC field “Title”.

Caption should be set to output the IPTC field “Caption”.

GalleryLink should be set to output the IPTC field “Copyright”.

This done, you’re ready to Export your Album Index. Before you can use it, however, there’s something needs be done.

Open the exported album index folder and Delete the index.html file. The index.html file exists only for the Lightroom Web module preview. On the web, the index.php file is the one that will be used to run the gallery.

That done, upload the gallery to your web server and take it for a test drive.

Adding new galleries

Updating your album index with new galleries is easy. Each gallery listed in your album index is powered by a piece of code in the galleries.xml file that looks like this:

<album>
<thumbnail>thumbnails/thumbnail.jpg</thumbnail>
<title>Gallery Name</title>
<description>Gallery Description</description>
<url>/galleryURL/</url>
</album>

To add a gallery, you need but add a new instance of the code above, filling in your individual album details.

Use Lightroom to generate a new album index containing only the gallery or galleries you’d like to add to your existing index. You don’t need to waste your time configuring the gallery appearance, so just setup your metadata as described above in Getting Started, develop your thumbnail(s) and hit export.

In the newly exported index, we’re interested in two things only: the thumbnails and the galleries.xml file.

Using your FTP client, upload the new thumbnails to your web server; add them to the thumbnails folder of your pre-existing album index.

Next, open the newly exported galleries.xml file in your text-editor. Copy all of the album settings from the file, then append them to the contents of the existing galleries.xml residing on your website.

Flexibility

TTG XML Album Index can be used to index image galleries of any kind, be they TTG, LRG, LR default or otherwise.

In fact, TTG XML Album Index can be used to create an index of just about anything, not just photo galleries. There’s nothing to prevent users from setting links to other types of content, other websites, etc.

Changelog


v1.41 (2008-03-28)

Fixed something broken in the last release; gallery outputs XML file again.

v1.4 (2008-03-22)

Added footer w/ options.

ID Plate alignment now selectable.

v1.1 (2008-03-17)

Brought up-to-date with current line of releases.

Supported by TTG XML Auto Index.

v1.02 (2008-02-19)

For IE6 compatibility, updated Dean Edwards’ IE7 Javascript Library to version 2.0 (beta).

v1.01 (2008-02-04)

Adding color controls for the header and contact info background. The original omission was unintentional.

Minor tweak to index.php.

v1.0 (2008-02-03)

Initial release.

Acknowledgements

TTG XML Album 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.

Make a Donation

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 »

Comment »

Seb
3 February 08 / permalink / feed

Hello,

I test your template, but if I modify only the galleries.xml , this is don’t change the index.htlm and my new index don’t appear.

You understand my english and my problem ?

3 February 08 / permalink / feed

Seb,

You need to DELETE index.html. It’s used only to preview the gallery in Lightroom’s Web module.

On the web, you’ll be using index.php, which will reflect any changes made to the XML file.

Seb
3 February 08 / permalink / feed

Ok, I think. The url’s index can point to “index.php” and not to the .html ;-)

Seb

Seb
3 February 08 / permalink / feed

Thank you Matthew ;-)

I go describe your new template for the frenchies ;-)

3 February 08 / permalink / feed

Cool, Seb.

You can set the URL without the file, something like:

http://www.domain.com/gallery/

The index.php file should be picked up automatically by the browser in the absence of the index.html file.

4 February 08 / permalink / feed

Hi Matthew. Firstly, thanks so much for these amazing Lightroom galleries you’ve created/adapted – they are simply brilliant!

This new version of the Gallery Index looks good, but I’ve noticed that you haven’t included the ability to edit the colours of the Title and Contact backgrounds as you have done before. Do you plan to add this to a later version?

4 February 08 / permalink / feed

I also cannot find color controls for the Site and collection bar titles.

I’m also unclear what the Page Title does.

I put my first gallery index in its own subdirectory and did not have to delete the index.html file for the whole thing to work

I’m very impressed with the automation this adds to the LR web module.

Thanks

4 February 08 / permalink / feed

James,
An oversight. I’ll add the controls in an update sometime this week.

Don,
Page Title (a.k.a. HTML <title>) sets the text that users will see in the title bar of the browser window when viewing the site, or on browser tabs. If you look up at the top of your browser window now, you’ll see that it reads “The Turning Gate” in the application title bar. That’s where the Page Title will appear on your galleries.

As for the index.html file, it will show the first set of albums you publish, but will not update when you change the XML file. The XML file is only read by the index.php file. Delete that html file; delete it!!

5 February 08 / permalink / feed

Just checked back here to read the latest comments and to my surprise you’ve created a new version with the colour controls! Wow, thanks Matthew!

7 February 08 / permalink / feed

My workflow is to regenerate the entire index every time I add a link.

I will eventually get around to deleting the indexes, but I have a bunch of pages to convert and update and everything actually appears to be working…

I was having some trouble seeing my updates, update, but after I began clearing my catch, that problem disappeared.

My question today is what happens when an index page has a bunch of links… is paging automatically instituted o do the old links fall off the bottom of the screen?

Thanks

7 February 08 / permalink / feed

Galleries will be displayed in the order they are listed in the XML file. If there are too many to fit on a single screen, a scroll bar will allow you to scroll the page. No pagination.

Pat
11 February 08 / permalink / feed

Hi Matthew

I’ve been looking at your work for a few months now and its been very helpful. Unfortunately, I’m having trouble viewing my XML Album Index site after deleting index.html. It doesn’t seem to be rolling over to index.php. I’ve tried viewing the site with both Safari and Firefox but no luck.

I put index.html back in as index2.html. So the first link below works fine, but the second one fails to find index.php.

http://homepage.mac.com/patrickbaude/main2/index2.html
http://homepage.mac.com/patrickbaude/main2/

Does this sound familiar to you at all?

Thanks so much.

11 February 08 / permalink / feed

Pat,

You’re using a .Mac account. It’s difficult to find specific information on .Mac services, but what I’ve found indicates that .Mac does not support PHP, which would explain why the index.php file isn’t working for you.

To use the XML album index properly, you’ll need a new host that supports PHP. Otherwise, you can use the album index the old way – keep the index.html file and generate a new album index in its entirety every time you update.

Pat
11 February 08 / permalink / feed

Cheers Matthew. That was what I was afraid of. Thanks for the input.

Mike
7 March 08 / permalink / feed

Hi Matthew, that’s another really great template.
On one aspect I still prefer the discontinued TTG Gallery Index though.
I like to have the gallery titles to be just under the thumbnails with no description and this was happening automatically when the GalleryBoxWidth was not big enough to have the name on the right.
On this new template if I choose a smaller box width the gallery name disappears instead of moving to the bottom.
For that reason I am glad I still have your old template on my system!
Anyway thanks for the amazing work you are doing here!
M.

7 March 08 / permalink / feed

Mike,

You were exploiting an error I never meant to be in the gallery in the first place. ;-P

I’ll try to think about whether there’s anything I can do to get the behavior back in in an official way, rather than in a buggy way.

15 March 08 / permalink / feed

Oh… I tried again and it works…. at 2 a.m. i should sleep, not work at my page…

sorry!!!

you side is really greate! :-)

Chris
17 March 08 / permalink / feed

Matthew,

I get errors on this page (and other pages on your site)
Besides that, I can see the Sample Gallery of this tool.

Something wrong with your page?

17 March 08 / permalink / feed

Strange. I’m seeing them too. They weren’t happening yesterday, and I haven’t changed a thing. I’ll have to check in with my hosting provider. Thanks.

seb
28 March 08 / permalink / feed

Hello,

I don’t see galleries.xml with the new version….

28 March 08 / permalink / feed

My God, you’re right. Wasn’t thinking and seem to have screwed this one up royally. I’ll try to get it fixed soon.

Seb
28 March 08 / permalink / feed

;-)

28 March 08 / permalink / feed

Seb, fixed.

seb
29 March 08 / permalink / feed

Yep !

Uwe
1 April 08 / permalink / feed

Hallo,

the templates are great. I am builing my new homepage with your templates TTG LG Pages and Slimbox Gallery. For the startpage I want to use TTG LR Pages 1.11. In this page I want to include an identity plate that is 925×105 pixels big. I do not want to use any text. After creating the page, the identity plate covers the menu line. What must I do, to have a space between the top of the page and the menu line of 105 pixels?

I also want to build in Google AdSense. the content pages should be between the menu in the text/pictures and the search page after the footer. Can I change the templates, so that the google inserts are integrated after creating the webpage with lightroom? And where should I integrate the script?

I am sorry for my english, but I hope you can help me.

Uwe

1 April 08 / permalink / feed

@Uwe: The first is an easy fix. There’s a slider for Header Height that you can adjust to move the menu down and extend the height of the header.

As for the AdSense, you’ll need to add that to the galleries after they have been exported. LR doesn’t like trying to reach out to external resources from within the Web module, and every time you load the gallery template, it will be trying to contact Google, with LR pitching a fit.

Uwe
2 April 08 / permalink / feed

Thank you for the info. I tried to use the Header Heihght slider, but there is no function. Only when I use Side and Collection Title and changing the font size to 50px I have enough space for the identity plate.

2 April 08 / permalink / feed

You’re using IE6, right?

Uwe
2 April 08 / permalink / feed

YES

2 April 08 / permalink / feed

Yar. IE6 doesn’t support the CSS attribute min-height, which I believe is what I used, and that would explain why it’s not working for you the way it ought to. Hates IE6, I does. Hates it and hates it. Here’s what I reckon you should do. Crack open any of my TTG galleries with that same header, and search the galleryInfo.lrweb file for this:

[“appearance.header.min-height”]

Change it to this:

[“appearance.header.height”]

That should set you straight in IE6, I should think. I might have a play with this and see whether it’s worth doing in my official releases.

David
18 April 08 / permalink / feed

I had a problem finding the hidden folders in Vista as there does not seem to be any visible option to display hidden folders. The easiest solution I found is to click start and type in “appdata” in the search bar. This displays the appdata folder even if it is hidden at the top which you can open and then easily navigate into Lightroom Web Galleries folder to transfer the template files.

David.

4 June 08 / permalink / feed

Hi,

Thank for the great templates, it makes my life easier as I am useless when it comes to web stuff.

I am trying to use the XML Album Index with the Slimbox Gallery and Pages. I have followed your instructions for making the Gallery and then I create the Album Index, again following the instructions (or at least I think I am).

On uploading to my site everything displays in the Gallery Index, which is on the page www.galleryindex.davidbakerphotography.co.uk but on clicking the thumbnail, which should take it to www.eastanglia.davidbakerphotography.co.uk it won’t open the page it tries to open www.galleryindex.davidbakerphotography.co.uk/ww.eastanglia.davidbakerphotography.co.uk

Any ideas, as I said I am useless when it comes to this stuff so apologies if it is a simple problem.

Regards

David

4 June 08 / permalink / feed

If you’re using absolute URLs, you need to precede the URLs with “http://”. Try this:

http://www.eastanglia.davidbakerphotography.co.uk

Cheers,
Matt

7 June 08 / permalink / feed

Thanks a lot for this. I’ve just set up a couple of galleries using Shadowbox & Auto Index and can’t believe how easy you’ve made it for me.

Still got a lot of tweaking here and there to make my site look the way I want it to but you’ve given me a great base to work off.

Uwe
13 June 08 / permalink / feed

Hallo,

as you can see on my homepage I am using you templates with lightroom. Opening my homepage with IE6 or IE7 browser everything is perfect. Using the browser Firefox, Opera or Safari the identity plate covers the menu line. As I am not very good in progamming homepages, please help me. What must I do, that the indentity plate does not cover the menu line? What I did for a quick solution is, that I just changed the hight of the picture in all my index.html files.

Thanks and kind regards

Uwe

13 June 08 / permalink / feed

Uwe,

The template was designed with smaller ID plates in mind. Yours is rather large. Were I you, I’d separate the animals and text. Use the text as the ID plate, and then manually set the animals as a non-repeating background image via CSS.

Eli
7 August 08 / permalink / feed

You make beautiful stuff.
I use a page wide indentity as a running header. Loading is awfully slow if I use TTG, probably coz it is a large PNG file, rather than JPG.
Also on smaller screens, the text disappears under the ID plate.
Would it be possible to specify a Z-index for the div, so that the text is on top and doesn’t disappear?

Name:

Email:

URL:

Comments support Textile formatting & Gravatars.

my personal information