Hi,
when I use printRandomimages, I can assign a class to the "ul" tag, but not the "li", "a", or "img" tags... That is, not unless I go into template-functions.php and add the classes there. I have done this as shown in the code below. (added class="random one" to the "li" tag and "random pic" to the three "img" cases) Everything works fine, but I get a notice that 'a change has been detected, and while it may not be critical please run setup ASAP.' So I did some research and concluded that the recommended way of modifying the function is to leave template-functions.php in its original format, copy the function I want to the functions.php in the zenpage folder and modify it there. This did not work...
Please let me know how best to proceed. Thank you.
`
function printRandomImages($number = 5, $class = null, $option = 'all', $rootAlbum = '', $width = NULL, $height = NULL, $crop = NULL, $fullimagelink = false) {
if (is_null($crop) && is_null($width) && is_null($height)) {
$crop = 2;
} else {
if (is_null($width))
$width = 85;
if (is_null($height))
$height = 85;
if (is_null($crop)) {
$crop = 1;
} else {
$crop = (int) $crop && true;
}
}
if (!empty($class))
$class = ' class="' . $class . '"';
echo "<ul" . $class . ">";
for ($i = 1; $i <= $number; $i++) {
switch ($option) {
case "all":
$randomImage = getRandomImages();
break;
case "album":
$randomImage = getRandomImagesAlbum($rootAlbum);
break;
}
if (is_object($randomImage) && $randomImage->exists) {
echo "<li class='randomone'>\n";
if ($fullimagelink) {
$randomImageURL = $randomImage->getFullimageURL();
} else {
$randomImageURL = $randomImage->getImageLink();
}
echo 'getTitle())) . '">';
switch ($crop) {
case 0:
$html = "<img class='randompic' src=\"" . html_encode(pathurlencode($randomImage->getCustomImage($width, NULL, NULL, NULL, NULL, NULL, NULL, TRUE))) . "\" alt=\"" . html_encode($randomImage->getTitle()) . "\" />\n";
break;
case 1:
$html = "<img class='randompic' src=\"" . html_encode(pathurlencode($randomImage->getCustomImage(NULL, $width, $height, $width, $height, NULL, NULL, TRUE))) . "\" alt=\"" . $randomImage->getTitle() . "\" />\n";
break;
case 2:
$html = "<img class='randompic' src=\"" . html_encode(pathurlencode($randomImage->getThumb())) . "\" alt=\"" . html_encode($randomImage->getTitle()) . "\" />\n";
break;
}
echo zp_apply_filter('custom_image_html', $html, false);
echo "";
echo "
<pre>[code]
\n";
} else {
break;
}
}
echo "
";
`
[/code]