New Zenner
- Join Date:
- Sep 2007
- Posts:
- 58
- Plugin Contributions:
- 0
JS Error in additional images with Lightbox and ImageHandler2
Hi,
Not sure exactly where this posts belongs, but it is about problems with additional images, so here goes.
I'm actually writing with both a problem and a solution ... first time I've actually provided anything useful on this forum :smartalec:. It's just not the greatest solution in the world and I'm hoping that a guru out there might be able to help.
I've had problems with additional images in which I always receive an error message saying:
missing ) after argument list in index.php line xxx
At first I thought the problem was something to do with Image Handler 2 so I raised this question in that forum. I know that edwinlloyd reported the same problem there.
Now I know that it's got nothing to do with IH2. Instead it seems to be in /includes/modules/additional_images.php. I've pasted the excerpt below.
// Link Preparation:
$script_link = '<script language="javascript" type="text/javascript"><!--' . "\n" . 'document.write(\'' . ($flag_display_large ? '<a href="javascript:popupWindow(\\\'' . $large_link . '\\\')">' . $thumb_slashes . '<br />' . TEXT_CLICK_TO_ENLARGE . '</a>' : $thumb_slashes) . '\');' . "\n" . '//--></script>';
$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:popupWindow(\''. $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;
When I remove the comments in front of the $alternate_link, the additional images display. I don't understand the $script_link and $no_script_link enough to find out what the problem is. Can anyone help? Presumably there was a good reason for not using the "alternate" version in the first place, so I'd like to see the intended version working.
Thanks,
Possum.