I'm try to make some changes to my ZenPhoto installation in order so that at the bottom of an album page I have a text area which displays the "embed" code of the generated images above, so that readers can simply copy it and post the html onto their own sites.
Here is the snippet of code.
<?php $str = ''; ?>
<?php while (next_image()): ?>
<div class="imagethumb"><a href="<?php echo html_encode(getImageLinkURL());?>" title="<?php echo getBareImageTitle();?>"><?php printImageThumb(getAnnotatedImageTitle()); ?></a></div>
$str .= '<a href="<?php echo html_encode(getImageLinkURL());?>" title="<?php echo getBareImageTitle();?>"><?php printImageThumb(getAnnotatedImageTitle()); ?></a>;'
<?php endwhile; ?>
<textarea type="text" size="50">
<?php echo $str; ?>
</textarea>
The code I've added is the $str stuff. I'm trying to loop through the images and create the html that is used in the first div in the while loop so that it puts it as text into the str string. This is concatenated for each image in the library and then the end str is posted into a simple text area for the user to copy.
I can't get the $str concatination working.
I'm very new to php and I can't quite get the syntax working.
Any help would be much appreciated.