Golden_Eagle
10-29-2007, 02:55 AM
Sorry about the vague title, but couldnt think of anything else to call it!
I've found a replacement script I want to use on my site for the Image previews instead of the run of the mill popup.
I need some assistance from someone who doesnt get confused by coding (Not Me, LOL!!)
Firstly, In I found the popup script and looks like this -
<script language="javascript"><!--
document.write('<?php echo '<a href="java script:popupWindow(\\\'' . tep_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $product_info['products_id']) . '\\\')">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], addslashes($product_info['products_name']), SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>');
//--></script>
<noscript>
<?php echo '<a href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image']) . '" target="_blank">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], $product_info['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>
</noscript>
All I wish to do is remove THAT completely and implement what is needed into this -
<a class='expand_a' onclick='imagezoom(this, "http://url.to/full.size.image")'>
<img src="http://url.to/thumbnail.image" class='expand_img' />
</a>
All this is, is a Image viewer that pops up in a new window. I've found a script the uses javascript to just 'expand' the thumbnail (that is the original image, but limited with Width & Height) dynamically on the page. I just need help to implement the strings into the script. But I cant work out how to parse the code correctly, can someone have a go before I give myself headache.
Thanks in advance.
G_E
I've found a replacement script I want to use on my site for the Image previews instead of the run of the mill popup.
I need some assistance from someone who doesnt get confused by coding (Not Me, LOL!!)
Firstly, In I found the popup script and looks like this -
<script language="javascript"><!--
document.write('<?php echo '<a href="java script:popupWindow(\\\'' . tep_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $product_info['products_id']) . '\\\')">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], addslashes($product_info['products_name']), SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>');
//--></script>
<noscript>
<?php echo '<a href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image']) . '" target="_blank">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], $product_info['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>
</noscript>
All I wish to do is remove THAT completely and implement what is needed into this -
<a class='expand_a' onclick='imagezoom(this, "http://url.to/full.size.image")'>
<img src="http://url.to/thumbnail.image" class='expand_img' />
</a>
All this is, is a Image viewer that pops up in a new window. I've found a script the uses javascript to just 'expand' the thumbnail (that is the original image, but limited with Width & Height) dynamically on the page. I just need help to implement the strings into the script. But I cant work out how to parse the code correctly, can someone have a go before I give myself headache.
Thanks in advance.
G_E