# TTG XML Auto Index



## theturninggate

Lightroom 1.' was released on February 19, 2''7, making it one year old today. Marking the occasion of Lightroom's first birthday, The Turning Gate is proud to present the release of two new Web module templates, *TTG Shadowbox Gallery* and *TTG XML Auto Index*.

====

*TTG XML Auto Index* makes keeping an album index, or table of contents, of web photo galleries easier than ever. Set it up once; the rest gets done automatically. Add galleries any time, simply by uploading a supported web gallery to the auto index directory on your web server.

The following galleries currently support TTG XML Auto Index out-of-the-box:

TTG Shadowbox Gallery
TTG HTML Gallery
TTG Slimbox Gallery
TTG Selection Gallery
TTG Client Response Gallery

Other galleries will soon be updated to support this new index; unsupported gallery types and other types of media can also be indexed simply by including an easily created XML file with your uploads. TTG XML Maker can create that file for you.

Download TTG XML Auto Index 1.'2.


----------



## Victoria Bampton

Very good Matthew!  This will definitely be finding its way onto my personal website before too long.

I'm always keen to see an example before I download, so checked out your website for sample galleries.  Here's the direct link in case anyone else wants to see what all the excitement's about: http://theturninggate.net/blog/ttg-xml-auto-index


----------



## theturninggate

TTG HTML Gallery has been updated to version 1.3, with support for automatic indexing via TTG XML Auto Index.


----------



## Halfje-Bruin

Matthew, another question. Can the TTG XML Auto Index be used nested? So, can I create a top-level index directory with subdirectories that are also indexes themselves. Example:



		Code:
	

top-level-index
  +-- vacation-index
  |      +-- asia
  |      +-- europe
  +-- korfbal-index
    +-- 2''6
    +-- 2''7


----------



## theturninggate

I haven't tried it, but I don't see why it wouldn't work. You'll just need to manually create an autoindex.xml file for each of your sub-indexes.


----------



## theturninggate

TTG Slimbox Gallery has been updated to version 2.4 and enabled for use with TTG XML Auto Index.


----------



## gary bird

It would be nice to see a an active website with multple galleries as generated using LR & slimbox w/ TTG XML Auto index?
Any suggestions?


----------



## theturninggate

Gary, I have a sample gallery here.


----------



## theturninggate

I've added TTG Selection Gallery to the list of supported galleries.


----------



## theturninggate

I've added TTG Client Response Gallery to the list of supported galleries.

Update your copies of TTG Client Response Gallery; no update is required for TTG XML Auto Index.


----------



## theturninggate

TTG XML Auto Index has been updated to version 1.'3. Album listing order is now reversible by switching a boolean value on line 15 of the _index.php_ file. Some error suppression has also been included to compensate for unusual PHP settings observed 
by some users receiving errors.

To update an existing installation, users need only replace their _index.php_ file with the updated version in the new package.


----------



## bmikev

theturninggate said:


> switching a boolean value on line 15 of the _index.php_ file.



what does it need to change to?


----------



## theturninggate

"boolean" means that the variable will accept values of _true_ or _false_.


----------



## bmikev

function write_top($doctitle)    

needs to be changed somehow?

sry I've never looked at php before kinda a newbie at this


----------



## theturninggate

bmikev,

Upgrade to the latest version, 1.'3. Then, you should find this on line 15 of the index.php file:

$reverseit = false;  // change to true if you'd like the album displayed in reverse order

Change "false" to be "true".


----------



## theturninggate

*TTG XML Auto Index 1.1*

TTG XML Auto Index has been updated to version 1.1 with the following additions:


A menu! Five customizable menu items + slideshow + contact.
TTG XML Auto Index now supports itself, and can be installed into sub-directories where it will be auto-detected by a parent installation of TTG XML Auto Index, allowing easy use as an index for separate categories.
Added a Collection Description.
View the sample gallery.


----------



## theturninggate

I've released a simple utility, TTG XML Maker, can be used to generate the XML file necessary for use with TTG XML Auto Index. Easy enough to create manually, or you can use this from within Lightroom's Web module to spit out the XML file into any previously exported gallery.


----------



## Sverre

Hi Matthew!

I must say your new concept with Auto Index is wonderfull! Thank you so much for your effort.

I have a little problem with setting font size for Collection description.  Nothing happens when I try to change fontsize.


----------



## Victoria Bampton

All I can say is WOW.  I've been playing with this properly for the last couple of days, along with your password protection script, and it's PERFECT!  Great job Matthew!


----------



## theturninggate

Sverre,
Looks like some of the description controls failed to make the transition when I last updated. Sorry about that. I'll get it fixed today or tomorrow and post and update.

Victoria,
Glad you're liking it! Thank you.


----------



## theturninggate

The collection description controls are fixed in version 1.2.


----------



## Sverre

theturninggate;1'358 said:
			
		

> The collection description controls are fixed in version 1.2.


 
Working now - thank you!


----------



## theturninggate

TTG XML Auto Index 1.4 is released with the following changes/additions:

 Added footer w/ options.
 ID Plate alignment now selectable.


----------



## alfred

theturninggate said:


> I haven't tried it, but I don't see why it wouldn't work. You'll just need to manually create an autoindex.xml file for each of your sub-indexes.



The *TTG XML Auto Index *description says that the php script will go down one level in the folder structure. Being not that experienced using php, it doesn't come to my mind, how to achieve a working solution with nested directories. I believe, in order to achieve this, the php script would have to go down as long as there are autoindex.xml files being found.
Is my understanding correct and is there any hope that your php guru might implement that?

alfred


----------



## theturninggate

Hi Alfred,

My PHP-guru has returned to the United States (I'm in South Korea) and is preparing for a cross-country road-trip to visit all of his musician friends from university in order to record somewhere in the neighborhood of three full-length albums. You can check out some of his demos here, and they're well worth checking out.

This means, however, I'm not likely to go calling on him for scripting anytime soon.

The best way to establish categories is to piggy-back Auto Indexes into a three-tiered pyramid.

At the top level, create a main Auto Index.

At the mid level, install multiple Auto Indexes into sub-folders of your first level index, one for each category.

At the bottom level, install individual galleries as sub-folders to the category level Auto Index folders.


----------



## theturninggate

Lightroom 1.' was released on February 19, 2''7, making it one year old today. Marking the occasion of Lightroom's first birthday, The Turning Gate is proud to present the release of two new Web module templates, *TTG Shadowbox Gallery* and *TTG XML Auto Index*.

====

*TTG XML Auto Index* makes keeping an album index, or table of contents, of web photo galleries easier than ever. Set it up once; the rest gets done automatically. Add galleries any time, simply by uploading a supported web gallery to the auto index directory on your web server.

The following galleries currently support TTG XML Auto Index out-of-the-box:

TTG Shadowbox Gallery
TTG HTML Gallery
TTG Slimbox Gallery
TTG Selection Gallery
TTG Client Response Gallery

Other galleries will soon be updated to support this new index; unsupported gallery types and other types of media can also be indexed simply by including an easily created XML file with your uploads. TTG XML Maker can create that file for you.

Download TTG XML Auto Index 1.'2.


----------



## alfred

Hi Matthew,

you wrote:



theturninggate said:


> Hi Alfred,
> 
> My PHP-guru has returned to the United States (I'm in South Korea) and is preparing for a cross-country road-trip to visit all of his musician friends from university in order to record somewhere in the neighborhood of three full-length albums. You can check out some of his demos here, and they're well worth checking out.
> 
> This means, however, I'm not likely to go calling on him for scripting anytime soon.
> 
> The best way to establish categories is to piggy-back Auto Indexes into a three-tiered pyramid.
> 
> At the top level, create a main Auto Index.
> 
> At the mid level, install multiple Auto Indexes into sub-folders of your first level index, one for each category.
> 
> At the bottom level, install individual galleries as sub-folders to the category level Auto Index folders.



I did as described and still couldn't get it working. After some trial and error, I got it finally running, but only if I *did not delete* the thumbnail folders contained in the Auto Index folders of the second level.
If I do that, the apache on my test server always crashes when I try to start the mainpage. I think, the path to the default thumbnail does somehow not work, if applied on the second level Indices. But as I said earlier, my php know-how is not good enough to define the exact cause right now. Anyway: applying the workaround to leave just one image in the thumbnail folder on the second level Auto Index folder works fine for me and I can now go on to test further.

And certainly I'll check out your friend's music!

alfred


----------



## bmikev

hello again,

I would like to say I love all the wonderful work y'all are doing! TTG rocks my socks you guys are my hero's!!

so here is a question....

I am trying to add a background image to the pages that use the XML Auto Index.
on the other pages I use


		Code:
	

<style type=text/css">

body {
  background-image: url('bk64'.png');
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-position: bottom right
    }   

    </style>

in the head section of my html index

I am not sure how to make this work with the php index that the TTG Auto Index uses.
I tried just adding the code to the head.html page however that did not work.
the webpage in question is [URL="http://www.bhphotoworld.net]www.bhphotoworld.net[/URL]
please advise!
and once again thank you for your wonderful work!!!


----------



## DonRicklin

Is this what you are trying to get. See attachments


Unless you are also seeing this now, These are in Camino 1.5.5 (Mac)
.

So it works, maybe just not on your browser.


Don


----------



## bmikev

those are the html pages   
they don't use the XML auto index

the auto index is in the photo galleries section 

my bad for not being more specific

I am referring to this page

http://www.bhphotoworld.net/album/index.php


----------



## DonRicklin

So, are you looking to get the same effect on the other pages as on my screen shots of your main page? IS that the idea?

Don


----------



## theturninggate

The path for the background image is incorrect. Use this:



		Code:
	

 body {
  background-image: url('../bk64'.png');
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-position: bottom right
    }


Why are you loading the gallery into a full-page frame?


----------



## bmikev

the path.........

oh gosh   now that makes me feel ....   
 duh hahah

...at least I was on the write track =D

what do you mean by loading the gallery into a full frame page?


----------



## theturninggate

The code for your page, located at http://www.bhphotoworld.net/album/index.php.



		Code:
	

 <html>

<head>
  <title>Black Hills Photoworld - photos from the Black Hills and Badlands </title>
  <META name="description" content="Photography from the Black Hills and Badlands of South Dakota."><META name="keywords" content="photography, south dakota, black hills, badlands, photos, pictures, nature, night photography, gallery, art, macro, flowers, people, dakotas, wild caves, black fox, flora, nocturnal, panoramas, essay, geology, earth, minerals, rocks, paleontology, fossils">
</head>
<frameset rows="1''%,*" border="'">
  <frame src="[url]http://members.rushmore.com/~photoworld/album/index.php"[/url] frameborder="'" />
  <frame frameborder="'" noresize />
</frameset>



</html>


You're loading the index into a frameset. Why?


----------



## bmikev

I been trying to figure out why it did that now that you point it out.

i didnt change anything myself other than the code for the background image.

everything on my hard drive is as lightroom created minus the css code for the background image.

yet all of my pages return the same thing



do you think maybe it is from godaddy.com?
I have there URL masking turned on....


----------



## bmikev

I just changed my settings on godaddy
and sure enough thats what was doing it!


----------



## theturninggate

That's bizarre. I understand GoDaddy has excellent customer service, but I find them an odd hosting company. Here's another good point to emphasize that belief.


----------



## Victoria Bampton

Hi Matt

Have you had chance to test it much on IE on Windows?

It works great exported from LR, but I ran into problems when using it to auto index a series of subfolders.  The indexing itself worked fantastically, but the thumbnail images wouldn't resize properly in IE, so if the thumbnails in the subfolders are too big, they wouldn't shrink to fit.  They're perfect in Safari & Firefox.  Turns out that IE ignore max-width and max-height?

I was able to get it resizing correctly by adjusting the CSS file img.thumbImg class to include:
  width: expression(this.width > 75 ? 75: true);
  height: expression(this.width > 75 ? 75: true);
as well as the existing.  Firefox just ignores it, but it solves the IE problem.  I haven't done THAT much web design though, so I'm taking a bit of a guess.  Does that sound right to you?


----------



## theturninggate

I know there are some issues with IE6, but IE7 should be okay as is. I included a Javascript fix for IE6 that should constrain the thumbnails if they're too large, though it distorts them.

I don't understand the code you're using there. What language is it, and are you putting that in the exported CSS file, or are you putting it into the galleryInfo.lrweb file?


----------



## Victoria Bampton

I have no idea what language that is!    I googled max-width image IE7, came up with that workaround, and just put it in the exported CSS file.  :roll:

Here's one of the test pages I was messing with - I've probably missed something really obvious though!  http://www.lightroomqueen.com/davidbampton.co.uk/customers/setup/

Top row of thumbnails are all too big but don't resize.  (Screenshot attached)

Then with that line in the exported CSS, it resizes (2nd screenshot)


----------



## DonRicklin

I can't help with this issue, Victoria, but I love the domain name you have there. http://www.lightroomqueen.com/! I see you have an eBook coming soon. Good for you.

Don


----------



## Victoria Bampton

DonRicklin said:


> I can't help with this issue, Victoria, but I love the domain name you have there. http://www.lightroomqueen.com/! I see you have an eBook coming soon. Good for you.
> 
> Don



LOL  It was a name I gained on another forum and it STUCK!  :lol:  

The eBook - still a work in progress, other things seem to keep getting in the way!  It's getting there though.  

Now this thread is off topic.  I'll have to smack my own hand!


----------



## fotografiker

*album description font size*

hi,
is there a way to change the title of the album and the description seperately in the autoindex? and of course the font family?


----------



## theturninggate

Presently, no, titles and description are locked to the same controls and cannot be set separately. I'll keep the idea in mind for a future update, though. Thanks.


----------



## alfred

Hi Matthew,

I'm using TTG Auto Index successfully in a nested configuration. It's a great solution, helping to organize a lot of albums in a structured manor. There is one thing I would like to have added, and that's a breadcrumb trail showing where I am in my structure of nested albums. Do you have a suggestion how to do that?
Alfred


----------



## theturninggate

Alfred,
I like the idea, but I don't know how it could be done automatically. PHP, I suppose, but I can't do it. My friend that did the PHP on this for me is just about to embark on a massive road trip, so I can't ask him at the moment either.


----------



## NigelL

*Basic question on using TTG XML Auto Index*

Hi Matthew

I am not familiar with creating web pages, so please excuse my rather basic questions! I am not having much luck following your instructions on how to create a gallery index using TTG_XML_Auto_Index and then add galleries such as TTG_Slimbox_Gallery.

I am trying to create the gallery index in a folder on a web server called "/public_html/test/". It is not clear if I must copy the gallery files to a sub-folder or into the same folder as the index.

If I copy the gallery files to a sub-folder then there is no "index.html" file for the index folder (your instructions are to delete this file).

If I copy the gallery files to the same folder as the index files then I only get the gallery page displayed, not the index page. Also, this does not make sense since the "index.html" file (and other files) from multiple galleries will over-write each other if copied to a common folder.

I hope that you will be able to point me in the right direction. An example file structure of a page with an index and multiple galleries would be most useful. 

Regards, Nigel


----------



## theturninggate

Nigel,

The reason to remove the index.html file from the gallery index is to ensure that index.php will be used as the default for that location. It's the PHP file that gathers and displays your index items.

The galleries should be installed into sub-folders within the gallery index folder.

I hope that clears things up.

Cheers,
Matt


----------



## NigelL

Hi Matt

Thanks for the reply! When I export the index from Lightroom to a folder on my computer, I only see a single PHP file, "FormToEmail.php". Where do I find the "index.php" file?

Regards, Nigel


----------



## theturninggate

NigelL,

The FormToEmail.php file is not included in the TTG XML Auto Index template. If that's what you're looking at, you're digging in the wrong template.

Matt


----------



## NigelL

Hi Matt

Thanks - sorted out my problem. Somehow I had selected the wrong gallery type.


----------



## theturninggate

Lightroom 1.' was released on February 19, 2''7, making it one year old today. Marking the occasion of Lightroom's first birthday, The Turning Gate is proud to present the release of two new Web module templates, *TTG Shadowbox Gallery* and *TTG XML Auto Index*.

====

*TTG XML Auto Index* makes keeping an album index, or table of contents, of web photo galleries easier than ever. Set it up once; the rest gets done automatically. Add galleries any time, simply by uploading a supported web gallery to the auto index directory on your web server.

The following galleries currently support TTG XML Auto Index out-of-the-box:

TTG Shadowbox Gallery
TTG HTML Gallery
TTG Slimbox Gallery
TTG Selection Gallery
TTG Client Response Gallery

Other galleries will soon be updated to support this new index; unsupported gallery types and other types of media can also be indexed simply by including an easily created XML file with your uploads. TTG XML Maker can create that file for you.

Download TTG XML Auto Index 1.'2.


----------



## Jim

*TTG Indexing*

Why are all these very useful TTG indexing galleries PHP based?
Is it not possible to generate an index like these prior to the Lr export and server upload (say based on a specified directory structure). 
This would be a boon to those of us who have to pay extra for a PHP function we don't otherwise need.


----------



## Victoria Bampton

PHP offers a lot more flexibility Jim, including being able to create pages on the fly indexing the pages below.  You could certainly create a html index page manually though.

Most webhosts offer PHP as standard these days, at no extra cost... is it perhaps worth looking at alternative web hosting?  There are some good deals to be had.


----------



## theturninggate

Victoria is right about the hosting. If you're host is charging you extra for PHP, that's a good sign you should be moving on. I've had a good experience with SiteGround, and I understand that Media Temple also offers great service.

Go Daddy is also popular, but while they're support is good, I find their user interface to be one of the Internet's biggest messes. I avoid them for that reason alone.

If you don't want to use the PHP in my templates, that's also an option. You can keep the index.html file and delete the index.php file, but you'll lose all of PHP/XML (automatic indexing) functionality. Still, the templates will work as static HTML if you just want the appearance, and don't mind updating/replacing the pages manually.


----------



## Jim

I appreciate that both these replies are well meaning, but without knowing the reasons for selecting my existing isp & indeed cost, they rather miss the point.
I am interested in why say Javascript/XML could not do the same thing at the client end prior to upload, thus avoiding any special server technologies, and also avoiding the manual work suggested.
I need to stick with UK based servers on the backbone (the suggested ISPs are US based I believe).

Regards,


----------



## Victoria Bampton

Fair enough Jim.  That must be a particularly good deal you've got there then!

What you're suggesting may well be possible... but I'm not sure anyone will actually spend any time designing a gallery on that basis, when a PHP alternative already exists, and the vast majority of UK, as well as US, web hosts support it as standard.


----------



## Jim

Understood.

By the way is there a chance of a response to my post in the Panic Gallery (which I may have put in the wrong place).  
Is it possible to simply show the metadata at the bottom of each image instead of floating if you mouse over the image.  The performance of this template seems particularly good otherwise.
If I have missed a parameter in the front end, could this be done instead with a bit of code tweaking?

Regards,


----------



## ZX-6R

Hi, is it possible to avoid filling the description ?

Here is my gallery : http://p.h.o.t.o.free.fr/index/index.php

I would like to avoid the " ' ". When I put nothing in the description field, it writes "photo album 1"

What should I do to have no description?

Many thanks for your wonderfull work!!!


----------



## theturninggate

TTG XML Auto Index 1.51 is now available with the following changes:


 No longer displays "No Title" or "No Description" when those fields are left blank in the XML file. Should display nothing, but I haven't tested it yet. Let me know if there's a problem.
 The archive now includes an alternate version of index.php, located in the Alternates folder, that can be used in place of the standard index.php on servers that encounter problems with the index.


----------



## Razer Bazer

*No images*

Hi,

I'm feeling very stupid to tell you about my problems with TTG XML Auto Index. I'm following the intructions and I have success with to make two galleries but when I choose one of the galleries no images appears, just the big box with a border around. 

It must be something with the pathes but I can't figure it out. Please hope someone can give me one or more tips.

Thanks in advance

Razer Bazer


----------



## theturninggate

How about a link to your problematic gallery?


----------



## Razer Bazer

theturninggate said:


> How about a link to your problematic gallery?


 
Hi again, thank for a quick answer. Here is the link to my test gallery

http://www.virdeby.se/test/bildbank/


----------



## Razer Bazer

*Problem solved for the moment*

My "major" problem is still there but I solved it temporary with Simpleviewer plugin with Picasa.


----------



## theturninggate

URL is dead. I don't know what I'm supposed to be looking at.


----------



## FrankC

*Link back to Index*

Is it possible to add a link from galleries back to the Auto Index?

feel sure I'm missing something obvious!


----------



## theturninggate

You can set a link using the menu options in most of my HTML-based galleries. The menu options can be found under the Site Info page. Best to use an absolute URL, i.e. http://www.domain.com/autoindex/.


----------



## joakimk

Hi, I had the same problem as Razer Bazer until I found out that you are using short php tags and I had to change my php configuration to:

short_open_tag = yes

Now it works wonderfully - thanks for the good work!!!

/ Jocke


----------



## RobOK

I love Auto Index, any plans to update SimpleViewer to be Auto Index compatible?

I like SimpleViewer for small galleries.

Thanks for all your work!


----------



## Nicolas Gee

*Problem with paths... may be rel to free.fr proxad hosting*

First thanks for the amazing job you've done with all these galleries!

I ran into a bit of trouble with the supplied php scripts when I uploaded the stuff to my free.fr website.

The original script is here (no subdir seens apparently), and here is the alternative one (put after I've discovered that free did block the glob() function in a way otr another).
With the latter, it seems that the script scans much more directories than the 3 subdirs under the link...

I've then replaced the line


		Code:
	

      $images = glob("$dir/thumbnails/*.{gif,jpg,png}",GLOB_BRACE);

with


		Code:
	

      $images = safe_glob("./$dir/thumbnails/*.jpg");

-yeah I could have kept the GLOBE_BRACE statement, but I was unsure if it was supported by safe_glob.
Note the use of safe_glob() (displaced higher in the script) and moreover the ./ at the beginning of the path, it seems to ensure that only subdirectories are scanned.

It worked better but there was still a problem with the next getimagesize call, and then the problem as stated by Razer Bazer (thumbs did'nt show up) so I applied the same path correction to the next lines :


		Code:
	

     if (count($images) > ') do {
         $chosenimg = $images[array_rand($images)];
      } while (!getimagesize("./$dir/thumbnails/$chosenimg"));
      $al['thumbnail'] = "./$dir/thumbnails/$chosenimg";


It's only tinkering  , I'm sure someone competent could write this in a much better way.
But, if anyone encounter the same problem (very probably related to the way the free.fr aka proxad servers run?), I thought it was better to propose a solution... Hope this helps!


----------



## tuberbob

OK, I am pretty new to this, but regardless, I am having a hell of a time with something that seems it should be simple.  What I have is a website for my family to view my personal pics from over the years.  The way my photos are organized is like so - if they were taken on January 1, 2''1, they are in a folder called 2''1-'1-'1.  Sometimes, I have a sub-collection, so to speak.  I have a folder named 2''3-'6, and within that folder, the folders correspond to dates of a trip I took that month, so folders are named 2''3-'6-'1 through 2''3-'6-'7.  

It would look like this:

Main gallery index>
  -2''1 index
     -2''1 gallery
  -2''2 index
     -2''2 gallery
  -2''3 index
     -2''3-'6 index
       -2''3-'6-'1 gallery
       -2''3-'6-'2 gallery
       -2''3-'6-'3 gallery
       -2''3-'6-'4 gallery
       -2''3-'6-'5 gallery
     -2''3-'7-'1 gallery
     -2''3-'8-'1 gallery

I am using TTG Auto Index 1.51 and TTG Shadowbox Gallery 2.85.  I can not, for the life of me, make the 2''3-'6 index function properly.  Is there someone that may be able to detail the steps necessary to make this work?


----------



## Victoria Bampton

Hi tuberbob, welcome to the forum!

Do you have them online somewhere, that we can take a quick look at the setup?


----------



## theturninggate

Ditto that, tuberbob. If we can get a look at it, we might be able to sort it out.


----------



## Wako Niko

Hey Matt, I'm going to disturb your peace again, sorry about that. I found a bug in XML Auto Index, when there is an '&' in either the title or the description of an album, they don't get displayed.


----------



## theturninggate

Yes, I know. I believe it's because the ampersand attempts to run a PHP function that isn't there. I've advised users not to use ampersands in the index.


----------



## davidannis

I am working on my father's website and am having a problem nesting TTG XML AutoIndex.  I posted on the Turning Gate site LR page because someone there had a similar issue, but I think that perhaps I should have posted here.

I exported TTG XML Autoindex to a folder friendsandfamily, deleted index.html and the thumbnails, and uploaded that folder to the existing, working galeries folder.  I then moved a gallery from the galleries folder to the friendsandfamily folder so that each Autoindex directory had a gallery in it.  The Autoindex in friendsandfamily worked but the peviously working Autoindex in galleries began giving an error message.  I quickly put things back and recreated the issue in a test area.

I created a directory on the server called newgallerytest and uploaded the entire friendsandfamily folder into the newgallerytest directory.  I then coppied the contents of the friendsandfamily directory back into the newgallerytest directory.  I put a gallery (TTG Shadowbox) into each directory so neither was empty.  The friendsandfamily subdirectory works but the newgallerytest directory gives an error: in an infinite loop.

*Warning*:  array_rand() [function.array-rand]: First argument has to be an array in */home/melannis/public_html/newgallerytest/index.php* on line *69*

Any help would be greatly appreciated.


----------



## tuberbob

I actually do not have the images up anymore...I took them down because of all the indexing problems I am having.  That's why I put so much effort into describing the hierarchy of the galleries.  If someone could give me a brief idea of how they would do it, I will re-up the images and see what happens.  Thanks for everything...in advance!


----------



## theturninggate

Lightroom 1.' was released on February 19, 2''7, making it one year old today. Marking the occasion of Lightroom's first birthday, The Turning Gate is proud to present the release of two new Web module templates, *TTG Shadowbox Gallery* and *TTG XML Auto Index*.

====

*TTG XML Auto Index* makes keeping an album index, or table of contents, of web photo galleries easier than ever. Set it up once; the rest gets done automatically. Add galleries any time, simply by uploading a supported web gallery to the auto index directory on your web server.

The following galleries currently support TTG XML Auto Index out-of-the-box:

TTG Shadowbox Gallery
TTG HTML Gallery
TTG Slimbox Gallery
TTG Selection Gallery
TTG Client Response Gallery

Other galleries will soon be updated to support this new index; unsupported gallery types and other types of media can also be indexed simply by including an easily created XML file with your uploads. TTG XML Maker can create that file for you.

Download TTG XML Auto Index 1.'2.


----------



## theturninggate

tuberbob,

I would nest the sub-index folders into the main index folder, and the individual gallery folders into the sub-index folders. To minimize variables, avoid using special characters, like dashes, in your folder names. Also, don't use ampersands or other special characters in your gallery titles or descriptions. Once you have something online, if problems persist, let us have a look.

davidannis, if you can please email or PM me FTP login details for your server, I'd like to get a look at things.

Cheers,
Matt


----------



## tuberbob

Hey, OK, I am making progress!  I got my galleries/indexes nested properly, now I just have to figure out thumbnails for them.  I am not concerned with having random thumbnails like the galleries do - static is fine.  Here is the link to my galleries.  How would I do the thumbnails?


----------



## Victoria Bampton

In the folder for each gallery will be a autoindex.xml file which will look like:



> <?xml version="1.'" encoding="UTF-8"?>
> <album>
> <thumbnail></thumbnail>
> <title>Cooper</title>
> <description>12/11/'8</description>
> <url></url>
> </album>



Where it says thumbnail, enter the relative path to the thumbnail you want to use for that gallery - i.e. <thumbnail>thumbnails/img_3359.jpg</thumbnail>


----------



## tuberbob

Victoria Bampton said:


> In the folder for each gallery will be a autoindex.xml file which will look like:
> 
> 
> 
> Where it says thumbnail, enter the relative path to the thumbnail you want to use for that gallery - i.e. <thumbnail>thumbnails/img_3359.jpg</thumbnail>



Most awesome!  Although, I will make a mention of this.  I tried using a full url to to a thumbnail I wanted to use from one of the sub-galleries...so it looked like this:  <thumbnail>http://tuberbob.com...thumbnail/Laguna_Beach_'664.jpg</thumbnail>.  As it turns out, that will not work.  I had to create a thumbnails directory in the folder containing the index, and reference that instead.  Hope that made sense.  Thanks!


----------



## tuberbob

Actually, I would like to amend my last post.  As it turns out, anything I add to the thumbnails folder for the index will be loaded and randomly used, I do not have to even code a link to a specific thumbnail.


----------



## theturninggate

Hi David (davidannis),

I found the problem!

Inside your /newgallerytest/ folder, you had two other folders, /campmichigania2''8/ and /friendsandfamily/.

The /campmichigania2''8/ folder was just fine.

The problem occurred because the /friendsandfamily/ folder did not contain a /thumbnails/ folder. The auto index was attempting to locate a thumbnail, couldn't find one, and choked. As soon as I created a /thumbnails/ folder and put one of the thumbnails from /campmichigania2''8/ in it, the index had what it wanted and started working.

Sorry it took me so long to get a look at this. 

Cheers,
Matt


----------



## tuberbob

Well, everything is coming along very nicely now that I have the gallery structure all sorted out.  However, I have a new problem.  If a caption runs long, only the first line is displayed in shadowbox.  Is there a way to make the entire caption visible?  Anything past the first line is hidden by my image, which tells me there must be some sort of constraint set up that hopefully I can adjust.  I just have no clue what it would be!!


----------



## theturninggate

It's to do with the way Shadowbox resizes itself dynamically to keep the content fitted to the screen. According to the author, the text block is of a set size because Shadowbox needs also to accommodate video, Flash, etc. and therefore cannot have a dynamic text block for images.

The best solutions I can offer are:

1) Edit the CSS to increase the size of the text block. Of course, if your captions are short, they'll float that much higher off the image, which looks weird.

2) Use the Slimbox gallery instead. It doesn't scale over large images to fit the screen as Shadowbox does, but the captions resize to accommodate the text.

3) Use TTG Client Response Gallery with the response options disabled. Like Slimbox, the caption space will resize to accommodate lengthy captions.


----------



## tuberbob

Wow, thanks for the quick response!!  I hate to sound thick, but I am not sure I understand this line:

"It doesn't scale over large images to fit the screen as Shadowbox does"

Do you mean it won't scale to the screen being used if the image opened is too large?  I noticed on a friend's netbook that my galleries do, in fact, scale base on screen size, which I think is very nice.  If this is not what you meant, would you mind trying to clarify?

Also, if Slimbox is the solution for me, would that require rebuilding all of my galleries in LR?  If so, I will have to be less chatty in my captions, I think, because that would be a lot of work...


----------



## theturninggate

Yes, that's what I meant. If an image is too large for the screen, Shadowbox scales it to fit (unless you configure it to do otherwise). Slimbox lacks this option.

Highslide scales, though, and also has variable-size captions. Again, that's TTG Client Response Gallery with the response options disabled.

But yes, in either case, you would have to recreate your galleries using the template of your choice.


----------



## tuberbob

Well, I am making progress here, but now I have one more question.  I am trying to include videos in my gallery.  So far, I have gotten it to work, except for one minor detail...it won't play.  I tried an .flv and an .mov file.  They begin to load, the shadowbox resizes, but it won't play.  Is there anything you might be able to point out that I may be missing?  I am obviously doing this outside of lightroom, adding the videos manualy to the index.html file.


----------



## theturninggate

Well, if you're using the Shadowbox version of the XML Auto Index, I can tell you that it's out of date. I haven't gotten around to updating it with Shadowbox 2.', and that might have something to do with the issues.

If you're trying to run video through TTG Shadowbox Gallery, then it's probably not working because I didn't include the scripts necessary for video playback. The gallery is setup only for images, a decision I made 1) because Lightroom doesn't manage video, and 2) to save load times for galleries.

If you want to add video functionality, you'll need to visit the Shadowbox site, snag the full package and set it up.


----------



## JimFelder

Is there a way to make the index thumbnails larger? What do I edit to change the size of the boxes on the index/home page?


----------



## Nicolas Gee

theturninggate said:


> It's to do with the way Shadowbox resizes itself dynamically to keep the content fitted to the screen. According to the author, the text block is of a set size because Shadowbox needs also to accommodate video, Flash, etc. and therefore cannot have a dynamic text block for images.


Tinkering again...  But I had the same problem on my gallery.

_Given that there are only images to be displayed_, couldn't it be simpler to set the CSS height to Normal/Auto? 
In the .lrweb file :


		Code:
	

        ["appearance.shadowbox_title.cssID"] = "#shadowbox_title",
            ["appearance.shadowbox_title.height"] = "Auto",
            
        ["appearance.shadowbox_title_inner.cssID"] = "#shadowbox_title_inner",
            ["appearance.shadowbox_title_inner.height"] = "Auto",
            ["appearance.shadowbox_title_inner.line-height"] = "Normal",

Both images and text resize well under FireFox 3.'.7...


----------



## Andrew Hayton

Hi Matt, I have just one question about the auto index album, is it possible to get it to show thumbnails from other auto indexes withing the folder structure ie

Main Gallery - private, weddings, portraits etc and then within each of them other auto albums for each client.


----------



## theturninggate

You can specify a URL to a specific thumbnail image if you'd like, or you can allow it to search for thumbnails according to it's default behavior. There is no way of combining the two, however, telling it to rummage for thumbnails in some other place.


----------



## Andrew Hayton

Matt,

So is there a way of telling it to search in nested folders, currently I have to create my own thumbnail folder and make a copy of the thumbnails from the nested folders to go into the thumbnail folders. Is it possible to ask it to search further down?


----------



## theturninggate

No. It searches only one level deep. This is to keep the page rendering quickly, to reduce the amount of actions being performed on the server, and to prevent it picking up things it shouldn't.

What gallery type are you trying to index? TTG XML Maker w/ Thumbnails can generate the XML and thumbnails for you if that would make things simpler.


----------



## theturninggate

TTG Auto Index 2.' is now available.

The new TTG Auto Index merges what once were two separate galleries, TTG XML Auto Index and TTG XML Shadowbox Auto Index. The names were a mouthful, the galleries were semi-redundant, and now they are one.

I've updated the usage instructions to address the merger, so please look them over, even if you're an experience user of the auto index.


----------



## wigrey

I bought the iPhone gallery and I love it. Is there anyway to optimize the auto index gallery for the iPhone so that I could use it to front end multiple iPhone galleries? i.e. make the auto index just 1 column and made to fit the iphone screen resolution?


----------



## theturninggate

It's something I've thought about, but haven't begun to put together yet. I've got a lot of school work at the moment, and another project in the works, so it might be awhile. But it is something that's on my list to toy with.


----------



## wigrey

Thanks. It'd be nice to have the same looks and feel to something frontending multiple galleries. I have looked around at different alternatives and haven't really found anything that I like.


----------



## theturninggate

Like I said, I hope to work on it. There are a few other projects ahead of it in line, though, so it's at least a few months out yet. In the meantime, the iPhone Portfolio template is what it is. It's not intended to be a full website, but just a lite portfolio piece of best images.


----------



## irthom

*Centering Thumbnails*

Hi, 

I was wondering if anybody can give me a few pointers.  I am new to XML Auto Index and am trying to resize the thumbnails to 116 x 116, with no description etc.

As you can see from the link below, this leaves the thumbnails slightly off centre.  Is there a way to rectify this?

Many thanks in advance.

http://www.eyethomson.com/images_test_2/index.php


----------



## irthom

*Issue with IE8*

Hi,

I have resolved the centering issue... it was just me being slow.

However, I have a new issue with the way the page operates in IE8.  Basically, the gallery works OK in FF and Chrome, but when you click on a thumbnail within the gallery the image doesn't come up.  It's weird because it works OK in IE7.  This is the url:

http://www.eyethomson.com/images_test_2/index.php

Any pointers would be greatly appreciated.

Many Thanks


----------



## theturninggate

Lightroom 1.' was released on February 19, 2''7, making it one year old today. Marking the occasion of Lightroom's first birthday, The Turning Gate is proud to present the release of two new Web module templates, *TTG Shadowbox Gallery* and *TTG XML Auto Index*.

====

*TTG XML Auto Index* makes keeping an album index, or table of contents, of web photo galleries easier than ever. Set it up once; the rest gets done automatically. Add galleries any time, simply by uploading a supported web gallery to the auto index directory on your web server.

The following galleries currently support TTG XML Auto Index out-of-the-box:

TTG Shadowbox Gallery
TTG HTML Gallery
TTG Slimbox Gallery
TTG Selection Gallery
TTG Client Response Gallery

Other galleries will soon be updated to support this new index; unsupported gallery types and other types of media can also be indexed simply by including an easily created XML file with your uploads. TTG XML Maker can create that file for you.

Download TTG XML Auto Index 1.'2.


----------



## theturninggate

Hi irthom,

Cool images.

I haven't had a chance to look into it yet, but I've heard there are issues with Shadowbox on IE8. I do know that the Shadowbox author is working on the next version of Shadowbox, which I expect to address these issues.

I'll need to investigate further and update my Shadowbox dependent products in accordance.

My website and this thread will both be updated when that happens.

Cheers,
Matt


----------



## chrisms

Matt, I bought the autoindex and have got it running on my site. I now want to use the php and create a wordpress page from it (using templates). Whilst I can just about do this I want to point the php to search in a different directory to where the php file is, as otherwise it's a pretty messy structure. 

My aim is:
1. php file is at: /url/wp-content/themes/blog_theme/autoindex.php
2. galleries are at: url/galleries/...
so autoindex.php has to start it's xml searching in teh subdirectories of url/galleries/

Can I pass the $dir a location to start in inside the code?

Once I've got this halfway house working, I'm then going to look into how I can use wordpress to style the gallery pages as well, but that is a way off at the moment.

www.cmsdes.co.uk


----------



## chrisms

So, persistence and google have solved this for me.

As the wordpress page was at the root already, i made the below change and we're good.
foreach (glob("galleries/*", GLOB_ONLYDIR) as $fn) {
   if (is_dir($fn)) $thisal = gallery_from_dir($fn);
   if (is_array($thisal)) $albums[] = $thisal;
}
then all i needed to do was change the output code to ensure the links to thumbnail and images are now correct.

Anyway love the plugin for lightroom and all the ttg galleries.


----------



## theturninggate

Hi Chris,

I've been in the river all day, and then BBQ-ing. Sorry I didn't see this sooner, but not _too sorry_, as I was having a good time and you've already sorted it out on your own. 

How about a link to the page so we can see this thing kicking? I've never incorporated it into a blog before, and would love to see it.

Cheers,
Matt


----------



## Stitch15

*Album description doesn't show?*

Hi,
I've been using your galleries for a while, one of them Auto Index. Now I've created a new website with Joomla and use a wrapper in Joomla to show my galleries. But with Auto Index there's something strange. I have multiple galleries and with most of them the album title and album description show up in the Auto Index index.php. But with some galleries only the album title shows up..... Do you have any idea what the problem could be? I've been making several new galleries and Auto Index but with no result.
Thanks in advance.


----------



## theturninggate

Are you using ampersands (&) in any of the text? If so, that's a problem. Other than that, I can't really say without seeing the problem.


----------



## Stitch15

No, only spaces between words, so album title would be Auto's (Dutch for cars) and the album description for example Oldtimerfestival 2''8. Some galleries only have an album title, but that doesn't show as well. When I hit refresh the information sometimes does show up, but after a new refresh disappears. Not all of my galleries hav this problem by the way (all on the same page). What would you like to see to give you a better idea of the problem?


----------



## theturninggate

TTG Auto Index 2.1 is now available, featuring the new TTG header first introduced in TTG Highslide Gallery, plus other improvements.


----------

