Guest Posted August 24, 2006 Share Posted August 24, 2006 What should the code look like in popup_image.php and product_info.php for a successful link to "Enlarge Image"? Link to comment Share on other sites More sharing options...
rick-b Posted August 24, 2006 Share Posted August 24, 2006 This is what i have on mine: <?php /* $Id: popup_image.php,v 1.18 2003/06/05 23:26:23 hpdl Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2003 osCommerce Released under the GNU General Public License */ require('includes/application_top.php'); $navigation->remove_current_page(); $products_query = tep_db_query("select pd.products_name, p.products_image from " . TABLE_PRODUCTS . " p left join " . TABLE_PRODUCTS_DESCRIPTION . " pd on p.products_id = pd.products_id where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['pID'] . "' and pd.language_id = '" . (int)$languages_id . "'"); $products = tep_db_fetch_array($products_query); ?> <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN"> <html <?php echo HTML_PARAMS; ?>> <head> <meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>"> <title><?php echo $products['products_name']; ?></title> <base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>"> <script language="javascript"><!-- var i=0; function resize() { if (navigator.appName == 'Netscape') i=40; if (document.images[0]) window.resizeTo(document.images[0].width +30, document.images[0].height+80); self.focus(); } //--></script> </head> <body onload="resize();"> <?php echo tep_image(DIR_WS_IMAGES . $products['products_image'], $products['products_name']); ?> </body> </html> <?php require('includes/application_bottom.php'); ?> The Coral Room ...store coming soon! 56 contibs added 28 custom creations + additions 6 future contribs 10+ tasks to complete Link to comment Share on other sites More sharing options...
Guest Posted August 24, 2006 Share Posted August 24, 2006 Thanks, but still no change in the screen im gettin up. Here is the code i have in product_info.php for the image, does it look right? <?php if (tep_not_null($product_info['products_image'])) { ?> <table border="0" cellspacing="0" cellpadding="2" align="right"> <tr> <td align="center" class="smallText"> <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"'); ?> </noscript> </td> </tr> </table> Link to comment Share on other sites More sharing options...
mariavargas Posted August 24, 2006 Share Posted August 24, 2006 Save the headache! Use this contribution - works great! http://www.oscommerce.com/community/contri...rew+Mottershead Only adjustment afterwards, would be to go into the product_info.php file and change the thumbnail size which is set for 100,80 to your size so it doesn't look scrunched. :thumbsup: Maria Vargas Thanks, but still no change in the screen im gettin up.Here is the code i have in product_info.php for the image, does it look right? <?php if (tep_not_null($product_info['products_image'])) { ?> <table border="0" cellspacing="0" cellpadding="2" align="right"> <tr> <td align="center" class="smallText"> <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"'); ?> </noscript> </td> </tr> </table> Link to comment Share on other sites More sharing options...
Guest Posted August 25, 2006 Share Posted August 25, 2006 Thanks. However i have now put this contribution into my site and images that do have a large image set up to them do not appear. Any idea why? Thanks Link to comment Share on other sites More sharing options...
Guest Posted August 25, 2006 Share Posted August 25, 2006 Also, which code should i change for the thumbnail size to be changed Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.