TTG Auto Index
TTG 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.
Note: This is the standalone version of TTG Auto Index. TTG Pages already incorporates its own auto index. If you are using TTG Pages, and only wish to have a single gallery index, it is unnecessary to purchase this standalone version. However, if you are using TTG Pages and would like to create multiple indices, or sub-indices to better organize your image galleries, then TTG Auto Index can help.
TTG Auto Index
By installing any purchased or downloaded web engine, plugin or template from The Turning Gate (TTG), You, the user, agree to the End User License Agreement. Make a point to read this document, as it contains important information regarding your purchase and your rights as a user, for which you will be held accountable.
System Requirements
TTG Auto Index is written in Lua. It requires Lightroom 2.4 or higher, and a web server running PHP. Updates are automatic. Coding experience is not necessary.
Recommended server specs: A Linux web server running Apache, PHP 5 or higher with Glob function support.
Setting Up Your Album Index
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 styling your gallery. With images chosen, move to the Web module and select the TTG 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.
Upload the exported folder to your web server using an FTP client.
Adding Galleries
TTG 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.
Manually Adding Items
TTG 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>
The autoindex.xml file can be created manually using a text editor, or can be created using Lightroom with TTG XML Maker.
To better understand how to use the XML file, see Index Behavior, below.
Index Behavior
To make the most of TTG 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.
Reversing Album Order
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.
Video
Changelog
- v3.3.1 ( in development )
- PHP compatibility fixes.
- CSS tweaks for templating purposes.
- v3.3 ( 2010-04-19 )
- Added new “Iconic” grid option for gallery index appearance, plus related styling controls.
- Added favicon.
- Layout and browser compatibility fixes for IE.
- Bug fixes.
- Removed Album URL field from TTG Auto Index options.
- v3.2.1 ( 2010-04-05 )
- Fixed a bug that prevented the gallery index from previewing within LR.
- Update to JQuery 1.4.1.
- v3.2 ( 2010-03-27 )
- Reorganized and updated Header and Footer controls and features to keep step with TTG Highslide Gallery Pro 2.0.
- Added support for variable grid spacing between gallery index items.
- Compatibility improvements to the gallery index PHP script.
- Updated Shadowbox JS to 3.03.
- Lua optimizations.
- Watermark controller now compatible with both LR2 and LR3.
- v3.1 (2009-09-26)
- Implemented Shadowbox support.
- Changed font-stack preferences.
- v3.0 (2009-09-13)
- Redeveloped to match and compliment TTG Pages.
- No longer produces index.html on export; no need to edit the folder contents after export.
- v2.11 (2009-06-13)
- Fixed spacing issue for index items, introduced in 2.1.
- v2.1 (2009-06-08)
- Implemented the new TTG header, as seen in TTG Highslide Gallery.
- Default configuration is set at three columns 960px wide — the standard for a single column layout.
- Added capability to view grid measurement.
- Switched to XHTML Strict DOCTYPE.
- Removed hacks for IE6.
- Slight changes to the PHP for improved compatibility.
- Updated architecture to LR SDK 2.0 standards.
- v2.01 (2009-04-15)
- Bug fix for shadowbox.php.
- v2.0 (2009-03-22)
- Name change: TTG Auto Index.
- Optional Shadowbox capability.
- v1.51 (2008-06-27)
- No longer displays “No Title” or “No Description”. When those fields are left blank, the gallery will display nothing. (untested)
- The archive now contains an alternate version of the index.php file, located in the Alternates folder, that might work on servers on which the standard version does not.
- v1.5 (2008-05-05)
- Bug fixes in index.html for IE6 compatibility, for those using the template in static state on non-PHP servers.
- v1.4 (2008-03-22)
- Added footer w/ options.
- ID Plate alignment now selectable.
- v1.3 (2008-03-17)
- Bug fix.
- v1.2 (2008-03-13)
- Bug fix regarding Collection Description sliders.
- v1.1 (2008-03-08)
- A menu! Five customizable menu items + slideshow + contact.
- TTG Auto Index now supports itself, and can be installed into sub-directories where it will be auto-detected by a parent installation of TTG Auto Index, allowing easy use as an index for separate categories.
- Added a Collection Description.
- v1.03 (2008-02-27)
- Index order now reversible using a toggle in the PHP script, line 15.
- Added some PHP error suppression to accomodate unusual server settings that might otherwise produce errors.
- v1.02 (2008-02-19)
- Initial release.
Acknowledgements
TTG 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.
{ 1 trackback }
{ 243 comments… read them below or add one }
← Previous Comments
@Xav
We were trying to do something very similar. We have multiple galleries using AutoIndex and want to password protect some of them. Password protecting the entire gallery folder because it wanted a password to display the random thumb. I moved one thumb up a directory and changed the autoindex.xml file to always use that thumb, one problem solved. Then I click on the gallery and get a ton of password boxes because it’s trying to open a new box for each file it’s trying to access that’s protected. SOOO… I only protected /gallery1/resources/css and the website works as intended. I understand that it’s not perfectly secure, someone could still access the files with the individual paths but I didn’t know what else to do.
William,
I guess that’s one advantage to using the PHP password protection vs. the web-server password protection. Because the PHP script only protects the page, not the folder, the auto index is able to access the resources it needs without security getting involved.
I purchased TTG Pages 3.x which includes Autoindex. I would like to create a structure where the initial home page with various galleries in the /galleries/ folder. No prob. BUT I also want to include in the /galleries/ folder another TTG Pages 3.x for additional galleries underneath that. And so on.
Will I have to purchase this Auto Index and then how do i incorporate it in the current freebie in TTG Pages?
I bought TTGpages 3.1 and TTG xmlindex 3.1, I want to use multiple autoindex galaries…TTGpages is working just fine, I added another menu link named WildLife and point it to “WildLife/index.php” (this folder is created in Autoindex 3.1), but this is somehow not working as expected (copied all files into WildLife folder under ttgstage root folder)
here’s the test website, can you have a look whats missing?
http://www.starinnovative.com/ttgpages/index.html
Thanks ~ Prakash
Prakash,
When I visit http://www.starinnovative.com/ttgpages/WildLife/index.php, all seems to be in order.
However, your menu item points to http://www.starinnovative.com/ttgpages/WildLife/WildLife.php, which is the incorrect address.
Also, you should avoid using capital letters in your folder names on the web.
I progressively installed simple viewer then autoindex and it worked fine
I added TT stage and subsites are still working fine but the autoindex is now failing giving this error repeated 50 times in the browser
Warning: array_rand() [function.array-rand]: First argument has to be an array in /www/free0host.com/a/l/h/alhadeff/htdocs/index.php on line 70
on my root I have the index.php and autoindex.xml + the resource folder
I tried with and without the thumbnails folder
I have as galleries subfolder
Best
Islande
both have TT stage and simple viewer
http://alhadeff.free0host.com/Islande
Thanks in advance for your help
Marc
Hi Marc,
Your gallery index keeps crashing my browser. Something is seriously wrong, and I have to point the finger at your server; the gallery index has never crashed my browser before. It’s either something to do with your PHP configuration, or maybe something elsewhere on your server, but it’s hard to say, as I can’t get at the page.
REMOVE EVERYTHING.
Tear it all down.
Create a new auto index and install it on your site, then try it empty.
Add content a piece at a time, testing as you go.
Also, check your PHP version. Needs to be 5 or higher.
@theturninggate
I tried it clean it up entirely
empty the autoindex works fine
- as soon as I had one gallery in one folder it crashes
- when I point directly to the folder skipping the autoindex the gallery with TT stage is working fine
- I had autoindex previously without TT stage and is was also working fine but then whithin gallry no possbility to go back to home page this is why I have added the TT stage
in each gallery subfolder I have only
the index.html, autoindex.xml, resources folder and simpleviewer folder
in the simpleviewer folder I have the photos, thumbnails and other xml js, swf files
I am considering as I can not found any solution to find another free web hosting service
do you have one to recommend ?
I solve it what is causing the crash is the fact that I had no thumbnails folder in the TT stage folder ! I thought the one in the subfolder Simpleviewer was enough
Is it possible to have nested Galleries? If so, how would you recommend going about it. I Love the ability to just upload a new gallery, but there are too many galleries and they need some organization.
Thanks,
Sorry for the dumb question, but…when filling out the Menu Item “Web or Mail Link” fields, I want to link back to a directory/file that is in a lower level directory (ie one level closer to the root). What is the method for filling you the filed.
So my Auto Index folder is at, say:
http://www.sitename.com/members/galleryindex/index.php
and I want to link to, say:
http://www.sitename.com/members/blog.html
Many thanks
Rob
../blog.html
@theturninggate
Thanks got it working now – love the galleries and index!!!
Cheers
Rob
Well Marc, seems like this “old” line is not necessary anymore you were right !!!
Please go check my new page http://www.joffrey-carpentier.com/ailleurs/
And if you have 2 minutes have a look at my pictures from Kyoto Japan.
Thanks+++++++++++++++++
Oops and if you take a short look at my py page you will see some size mismatch between differents thumbnails… Ive fixed the size to 400 by 400 (max) in the autoindex and then I use LR flash galleries to make my portfolios. In a 3rd time I use your TTG XML maker w thumbs in order to have the portfolio recognised by Autoindex. In XML I turn the thumbs to 400 by 400.
Can you explain me what to do in order to reach perfection ?
Arrigato gonzaimass (thanks in japanese)
@Jeff
I’m unclear what qualifies as “perfection”. The thumbnails look like they are behaving normally according to the information you have given me, and so I see nothing wrong with your gallery. What are you trying to do in the end?
Well from time to time on this page made with Autoindex v3, some images are not displaying at the right size.
They are all big size but one image/portfolio will stay small. By pressing reload the problem is solved but will reappear in a other place or wont appear at all and all images will show correctly ! It’s not really annoying but it is a bit odd….
Oh and I precise I’m not under psychodysleptic drug effect
Thanks a lot Marc !
@Jeff
Okay, I reloaded the page a few times and finally got to see what you’re talking about. I’m guessing that you have small thumbnails mixed in with the larger thumbnails in your /thumbnails/ folder for the gallery.
You can fix this by removing the small thumbnail images from the folder. If you need them for the image gallery, you can instead set a specific image to be used by the gallery index by assigning an image path to the Album Thumbnail in the gallery’s XML file.
Thanks it’s “perfect” for me now
Great job and amazing kindness to answer us all ! Thanks a lot again
How do I get a space between lines when the album title wraps to a second line? If I use a comic sans font the 2 lines actually merge together. With the Moonspace stack they sit right on top of each other.
Here is a sample of what I am working on:
http://www.scottphotoart.com/gallery_index/index.php
Thanks,
Scott
You will probably need to go into the CSS manually to increase the line-height. Otherwise, shift to a two-column layout and make the boxes wider so that the title fits on one line.
Thank you. Editing the CSS worked. Next question: if I leave the Album thumbnail blank the index is not automatically loading one of the image thumbnails. I looked in the source and it is trying to read from resources/no_thumb.jpg. In fact the thumbnails are buried in the content/ folder. How do I get the index to automatically choose a thumbnail without moving the thumbnails in all of my generated albums?
Thanks,
Scott
@Scott Anderson
For the auto index to find thumbnails, the images need to be located in a /thumbnails/ folder at the gallery root. If they are buried deeper in folders, as seems to be the case for your galleries, it will not find them.
So, you have two choices:
1) Create a /thumbnails/ folder at the root of each gallery.
2) Specify the location of a specific thumbnail in your XML file. You can do this in Lightroom in the “Info for TTG Auto Index” section of the Site Info pane, or you can edit the autoindex.xml file in your exported galleries. The path to the thumbnail should be relative to your gallery root, so written like this:
thumbnails/image.jpg
content/thumbnails/image.jpg
Which gallery are you using?
Ah… I am using a mix of older TTG Slimbox up to version 2.62 and Timothy Armes Elegance 1.1. The older slimbox puts the thumbnails deep into the content folder as does Elegance. Slimbox 2.62 puts them into a thumbnails folder. Of course I was testing with everything but the newer slimbox galleries.
Thanks again.
hello
i need some help i bought the TTG Auto Index 3.1 and for the moment it does not work.
i don’t know how i have to do i’m not a web master
some one can give me some help
thank’s a lot for your help
You need to be more specific than just saying “it does not work”. I made it, so I know it works. If it’s not working for you, then either your host lacks PHP support, or you’re not using it properly. Please write in again, explain to me what you’ve done so far, maybe give me a link to a problematic gallery so that I can see for myself what’s happening, and then I can offer advice. By saying just that “it does not work”, though, I have no idea whether you’re having problems with it in Lightroom, on the web, on your desktop … ?
thank you for your answer ok i’m going to write again
so i began to install the TTG auto index in my lightroom … it is ok
i shoes 5 picture for my gallery when i open the web page i find them (in lightroom)
for the moment i don’t know how i have to do to have picture in my gallery and how can have give the title to the gallery
sorry for my english and i know that it works
@stopname
Okay, what you see in Lightroom is only a mock-up, so that you can see how the index will look when populated, and can style it using the provided options.
When you export, the index will be empty.
Using an FTP client, put your empty index online.
When you create a gallery using a TTG web gallery engine, there is a set of optioned titled “Info for TTG Auto Index”. You will give your gallery a name and description, then export.
Using an FTP client, copy the gallery folder to your website; put it inside the folder for your auto index.
i need more détail please
where i find index ?
@stopname
You make the index; that’s what TTG Auto Index does.
ok
are you speaking about Gallery Index ?
i tried to change yhe title or the text it does not work
@stopname
Let’s start over again. As I understand, you are trying to use TTG Auto Index. In addition to this, you will need an image gallery template. What template are you using for your image galleries?
i would like to une the galerie flash ligtroom
@stopname
By default, the Lightroom Flash Gallery does not work with TTG Auto Index. In order to the index to detect your galleries, you will need to create the autoindex.xml file and a /thumbnails/ folder. You can do this easily according to the documentation above, or you can use the tool TTG XML Maker to create the necessary assets.
ok i have to forget the flash gallery
i need more détail about antoinedex.xml and TTG XML maker i have a white page …
i’m not a web master is it possible to give me more détails ?
@stopname
As stated in the documentation for TTG XML Maker, nothing will show in the preview. Just fill in the Album Title and Album Description, then hit Export.
ok when i do the export i have a new folder in it there is antoindex.xml and a folder thumbnails i found on it seven picture of my collection il lightroom
@stopname
Yep, that’s right. Now, as per the documentation, copy those items into your gallery folder.
You can then use this gallery with TTG Auto Index.
Does the description support any html?
The {br /} in the description kills it for me?
It appears that this page translates html in this document it was a {br /} with html brackets that doesn’t work.
Old Time Baseball in the Summer Time
This set is so nostalgic reminding us of the days when sports were about fun and not about steroids and money. We don’t do this set often, but when we do, parents and grandparents just love the way children interact and play together. Norman Rockwell eat your heart out cause this is what you would love to be doing if you were still with us. {br /}{br /}
Charles Radbourne (Old Hoss) who played pro ball for Boston and Cincinatti in the 1880’s and 90’s is the earliest of our relatives involved in this game.
This is using auto index included with TTG Pages 3.1
Is the standalone one any different?
@Tim
Lightroom allows you to input <br /> and <a>. I’m not sure what other elements may work.
I know it works in the text parts the gallery, the home page text and the contact page text.
What about the description tag of autoindex.xml ??
I tried to paste the whole file above , but the forum swallowed the HTML and made it go away.
When I put “” in the description tag of autoindex.xml it just kills the entire description part of the index.
I know it works in the text parts the gallery, the home page text and the contact page text.
What about the description tag of autoindex.xml ??
I tried to paste the whole file above , but the forum swallowed the HTML and made it go away.
When I put “{br /}” in the description tag of autoindex.xml it just kills the entire description part of the index.
(There it did it again. How do I trick Wordpad into letting me put {br /} with HTML brackets here?)
@Tim
I see, I see. No, you can’t use HTML in the autoindex.xml file.
As for posting code here in the comments, you need to code it. < = < and > = >.
Oh well, I was hoping that the standalone version of Auto Index would help. What about updating the autoindex.xml files from each gallery? Does the standalone version of auto index provide any way to simplify updating the gallery titles and descriptions in the galley index. Presently it would appear that the best way to update titles and gallery descriptions is to go into each gallery’s autoindex.xml file with a text editor.
@Tim
TTG Auto Index and the gallery index included in TTG Pages are functionally identical. The version in TTG Pages is just structured in to work within the context of pages, whereas TTG Auto Index is more portable.
Your options for changing pre-existing titles and descriptions are to either edit the autoindex.xml file directly, or export a new gallery from Lightroom with your changes.
I have followed the instructions above but whenever I use my browser and navigate to the folder in which my TTG Auto Index files reside (with sub-folders each containing a TTG HighSlide Pro gallery), my browser merely downloads the ‘index.php’ file instead of opening the index gallery.
I have not changed anything majorly in the TTG Auto Index settings…is there something I am missing?
thanks in advance for your help!
@raf sanchez
…and if I had just checked whether or not PHP was enabled on the sub-domain on which TTG Auto Index is installed, then I wouldn’t be feeling as much of a fool as I do now (for those reading my comment above, be sure to enable PHP on your domain)!
It happens. I’m glad you’ve gotten it figured out, though.
I just started using TTG pages, I’ve exported a site, and would like to have image galleries on my site… Yet I can’t build them in Lightroom with just TTG pages alone? Would I be able to use just exported lightroom galleries For my site? Or do I need TTG Auto Index to have galleries at all? Also my contact and about page come up as code when I load my site? Sorry for the dumb questions, but i’m new to all of this.
@Nik
TTG Pages includes a gallery index, so you do not need TTG Auto Index except in special cases. For the time being, let’s assume these cases will not apply to you.
The reason your about and contact pages are coming up as code is probably because you have not taken note of a very important part of the usage instructions; it’s easy to miss. When using TTG Pages, you need to have at least three images selected in your filmstrip. These images will be used on the Home, About and Contact pages in that order. If Lightroom can’t find them, it chokes rendering those pages.
And TTG Pages does not create image galleries; just the framework for a website, the titular pages. You will need a separate web engine to produce image galleries. I always recommend TTG Highslide Gallery Pro, as it offers the most possibilities and is also the most up-to-date of my gallery offerings.
Matt,
Thanks for being attentive to your site and providing support even while you are away.
I’m confused about using Auto Index for nested galleries, specifically, how many places the Auto Index galleries needs to be placed on the site, where, and whether relative links need to be in both Auto Index and Highslide Pro galleries. I have the following: Hislide Pro, Pages, and Auto Index.
For example, I have a non-public portion on my site for family galleries that are 4 folders deep away from the root folder: http://www.lumiograph.com/family/reid/slavin/darcy to denote my side of the family (reid), then my mom’s side (slavin) for a gallery I created (darcy) for a recent family event. Does the Auto Index gallery just need to placed in the root for the whole site or do I have to run and place it in each folder until it only needs to look one folder deep for a gallery?
What about relative links. I have Highslide gallery templates with one (../) to four (../../../../) levels of relative links (for index, about, contact, etc) to navigate back to my public website (knowing that visitors won’t be able to navigate back to the non-public portion of the site unless the hit the back button). Do I need to have corresponding relative link templates for Auto Index that also ?
For the public portion of my site, I ran the TTG Pages, then deleted the galleries folder, then ran Auto Index and called that galleries. Then I’ve run Auto Index and called that gallery destination and I place Hislide galleries in the designations folder. Is that correct, as it does work for creating nested galleries?
I think a video on Auto Index and nested galleries would be great, at least for me, to clear up confusion on where, and how many auto index galleries are needed and relative links.
Thanks,
Reid
@Reid
You can basically use TTG Auto Index anywhere and in any way that you want. It sounds like you have a grip on setting relative URLs, and failing that you can always use absolute URLs if you know where things are going to be online.
Using TTG Auto Index to setup sub-indices is discussed in the About & Help section of the site, filed under Getting Started with TTG.
Otherwise, so long as your index is working and you’re happy with your site navigation, I’d say you’re in good shape.
The auto index in TTG Pages is functionally identical to TTG Auto Index, except not portable. It works from that one location, and indexes galleries placed only into the /galleries/ folder. TTG Auto Index, being portable, you simply put it where you want on your server, then dump gallery folders into it.
So, does that answer your question(s)?
The article helps some. Sounds like I don’t need multiple Auto Index templates but I am on the right track for multiple level Highslide galleries templates.
So in the example I gave in my first post, it sounds like I would generate mutiple Auto Index galleries: Run and call it family, then another, call it reid and export to inside family, and repeat the process for slavin, and put the highslide gallery darcy inside slavin?
Or am I making it too complicated? Do I just need to run Auto Index to generate the family folder, and then copy the autoindex.php to the children folders?
Thanks,
Reid
Hello, sorry for my english but i’m french ;
i bought TTG auto index and i tried many times but i always have this error : \Warning: Invalid argument supplied for foreach() in /mnt/146/sdb/a/8/nicolas.cohen/galerie/galleryindex.php on line 81\
I have used .htaccess with \php 1\ or \php 5\ i don’t remember and i’m with php 5 on my server but the problem is still here. How can i solve my problem.
My sub-dir made with TTG pages : http://nicolas.cohen.free.fr/galerie
The probleme is on the next link : http://nicolas.cohen.free.fr/galerie/galleryindex.php
Help me please.
Thank you
@Nicolas:
The links you’ve provided are not working, and I am unable to see the problem. Try again?
← Previous Comments