This is an update to my other posts in this string. I'm the one, hopefully not the only one, who needs to have the additional image titles from Glenn's mod appear with the larger images in Lightbox/Slimbox.
I've made some progress, since I am using both the Additional Image Title add-on and the Slimbox add-on, both add-ons have modifications to additional_images.php. At first I could only have one or the other, I've now successfully meshed the modifications so that the additional image titles are appearing and also clicking on larger image brings up the Lightbox so that is working. Here is an example of it, still needs finishing touches but am happy it is working this much:
http://peterfasano.com/zen/index.php...&products_id=2
I still need to have the additional image titles appear with the larger image in the Lightbox instead of where you see the product name in the lower left hand corner. Here is the bottom part of additional_images.php where I have meshed the two modifications together:
// Link Preparation:
// bof Zen Lightbox v1.4 aclarke 2007-09-22
if (ZEN_LIGHTBOX_STATUS == 'true' || FUAL_SLIMBOX == 'true') {
$script_link = '<script language="javascript" type="text/javascript"><!--' . "\n" . 'document.write(\'' . ($flag_display_large ? '<a href="' . zen_lightbox($products_image_large, addslashes($products_name), LARGE_IMAGE_WIDTH, LARGE_IMAGE_HEIGHT) . '" rel="lightbox[gallery]" title="' . addslashes($products_name) . '">' . $thumb_slashes . '<br />' . TEXT_CLICK_TO_ENLARGE . '</a>' : $thumb_slashes) . '\');' . "\n" . '//--></script>';
} else {
$script_link = '<script language="javascript" type="text/javascript"><!--' . "\n" . 'document.write(\'' . ($flag_display_large ? '<a href="javascript
opupWindow(\\\'' . $large_link . '\\\')">' . $thumb_slashes . '<br />' . TEXT_CLICK_TO_ENLARGE . '</a>' : $thumb_slashes) . '\');' . "\n" . '//--></script>';
}
// eof Zen Lightbox v1.4 aclarke 2007-09-22
$noscript_link = '<noscript>' . ($flag_display_large ? '<a href="' . zen_href_link(FILENAME_POPUP_IMAGE_ADDITIONAL, 'pID=' . $_GET['products_id'] . '&pic=' . $i . '&products_image_large_additional=' . $products_image_large) . '" target="_blank">' . $thumb_regular . '<br /><span class="imgLinkAdditional">' . TEXT_CLICK_TO_ENLARGE . '</span></a>' : $thumb_regular ) . '</noscript>';
// $alternate_link = '<a href="' . $products_image_large . '" onclick="javascript
opupWindow(\''. $large_link . '\') return false;" title="' . $products_name . '" target="_blank">' . $thumb_regular . '<br />' . TEXT_CLICK_TO_ENLARGE . '</a>';
$link = $script_link . "\n " . $noscript_link;
// $link = $alternate_link;
// additional image titles
$add_img_constant = 'ADDIMG_' . strtoupper(ereg_replace('[/\\.-]','_',substr_replace($base_image,'',0,7)));// if any other characters could be used in filepath, add them to list [ ]
if (defined($add_img_constant)) {//add text above or below images
$link = (ADDIMG_TEXT_TOP)? '<h4 class="addImgTitle">' . constant($add_img_constant) . '</h4>' . $link: $link . '<h4 class="addImgTitle">' . constant($add_img_constant) . '</h4>';
}
// /additional image titles
// List Box array generation:
$list_box_contents[$row][$col] = array('params' => 'class="additionalImages centeredContent back"' . ' ' . 'style="width:' . $col_width . '%;"',
'text' => "\n " . $link);
$col ++;
if ($col > (IMAGES_AUTO_ADDED -1)) {
$col = 0;
$row ++;
}
} // end for loop
} // endif
?>
Does anyone with more php coding experience than I have, have any suggestions? I've tried replacing the constant ($products_name) with the constant ($add_img_constant) but that does not work. (I also have a post in the Commercial Help Needed section but since I haven't gotten a reply resulting in help, I've been working or trying to work on it myself.
Also in the additional_image_titles_define.php code I downloaded I got an error just after installing that I corrected in my own copy. The error was ..... unexpected } encountered on line #6 --- which is this line --- define ('ADDIMG_TEXT_TOP','true'};//change to false to put text below images
I change the } to a ) to correct the error.
Bookmarks