A better way is to duplicate the function you need, give him a new name, edit it and use it.
You can find the file and point of an function in the Zenphoto docs.
http://docs.zenphoto.org/
Use the search-box at top-right. (works only with function names like "printLatestImages" or "LatestImages").
The function printLatestImages() only includes an another function. The function printImageStatistic().
Get to the file which the functions are included via SFTP.
Duplicate both functions and rename it in the same file and near to the originals (below is a good place). Rename it unique, because a function getImageStatistic() is always available, but included not what you need.
In this case you need not a "print" (echo), but a "get" (return).
```function getLatestImages_myname()```
```function getImageStatistic_myname()```
Use the second in the first.
Yet you can edit the function as you need.
In this function is it a little bit complicated to change from "print" to "get". The simpler way is just to edit the part with "alt" and don't rename the function to "get". The better way is you change the first "echo" to a variable like "$returnvar =" and all other "$returnvar .=" and below the last echo make a "return $returnvar;".
Yet you can use the function in your theme and change the string, which is returned by the function, before it is printed (echo) with PHP replace. Search a unique substring in the string and replace it.
str_replace
substr_replace
preg_replace
Use it like ```<?php echo str_replace('search', 'replace', getLatestImages_myname()); ?>```
In your case:
```<?php echo str_replace('" /></a>', ' free photo" /></a>', getLatestImages_myname()); ?>```
@acrylian , is here a little bit wrong with the quotations at the end?
```echo '[img]' . html_encode(pathurlencode($image->getCustomImage($width, NULL, NULL, NULL, NULL, NULL, NULL, TRUE))) . '[/img]getTitle()) . "\" /></a>\n";```
http://docs.zenphoto.org/source-function-printImageStatistic.html#578
EDIT: OK, yet i understand it. The second alt quotation is slashed: `\"`
```"\" /></a>\n"```