Well, since I posted Effervescence_SimpleViewer I have been trying to enhance it. I would like both the Image Title and the Image Description to be displayed as the caption.
There is a line in album.php which passes the text of the caption to SimpleViewer:
<?php while (next_image()): ?><image><filename><?php echo getFullImageURL();?></filename><caption><?php echo getImageTitle()?></caption></image><?php endwhile; ?></simpleviewerGallery><?php
Clearly, the part to modify is the "echo getImageTitle()" bit. In fact I can change this to getImageDescription() and it gladly displays the description as the caption.
So, I have tried to create my own function--getImageCaption() that would concatinate the title and description. I have run into multitudes of problems with this.
First: Placing my code in the customfunctions.php file did not work. The behavior is as if the function could not be found. I have tried moving the "<?php require_once ('customfunctions.php'); ?>" line various places in album.php including duplicating it in each path. Some spots broke things entirely, others just stopped the display after the first thumbnail.
Second: I placed my code in template-functions.php. I can get this to work, sort of. If I just replicate the code of getImageTitle in my function, then things work. If I try to return the two strings for title and descripton, nothing gets displayed.
I may not have the correct PHP syntax for concatinating the strings, so if someone would kindly show me that I will try again. However, the end goal is to use the CDATA technique described in #13 here: http://www.airtightinteractive.com/simpleviewer/faq.html
I'd really appreciate an expert's help.