Jump to content

JemCraft

Members
  • Content count

    362
  • Joined

  • Last visited

1 Follower

About JemCraft

  • Birthday 01/14/1979

Profile Information

  1. Hi I am trying to install the contribution SoldOut (but displayed) but I am having problems with the last change. It says to do the following: However, when I replace the code, my products disapear! This is obviously not supposed to happen so what am I doing wrong? This is what I have in catalog/includes/modules/product_listing.php <?php /* $Id: product_listing.php 1739 2007-12-20 00:52:16Z hpdl $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2003 osCommerce Released under the GNU General Public License */ $listing_split = new splitPageResults($listing_sql, MAX_DISPLAY_SEARCH_RESULTS, 'p.products_id'); if ( ($listing_split->number_of_rows > 0) && ( (PREV_NEXT_BAR_LOCATION == '1') || (PREV_NEXT_BAR_LOCATION == '3') ) ) { ?> <table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td class="smallText"><?php echo $listing_split->display_count(TEXT_DISPLAY_NUMBER_OF_PRODUCTS); ?></td> <td class="smallText" align="right"><?php echo TEXT_RESULT_PAGE . ' ' . $listing_split->display_links(MAX_DISPLAY_PAGE_LINKS, tep_get_all_get_params(array('page', 'info', 'x', 'y'))); ?></td> </tr> </table> <?php } $list_box_contents = array(); for ($col=0, $n=sizeof($column_list); $col<$n; $col++) { switch ($column_list[$col]) { case 'PRODUCT_LIST_MODEL': $lc_text = TABLE_HEADING_MODEL; $lc_align = ''; break; case 'PRODUCT_LIST_NAME': $lc_text = TABLE_HEADING_PRODUCTS; $lc_align = ''; break; case 'PRODUCT_LIST_MANUFACTURER': $lc_text = TABLE_HEADING_MANUFACTURER; $lc_align = ''; break; case 'PRODUCT_LIST_PRICE': $lc_text = TABLE_HEADING_PRICE; $lc_align = 'right'; break; case 'PRODUCT_LIST_QUANTITY': $lc_text = TABLE_HEADING_QUANTITY; $lc_align = 'right'; break; case 'PRODUCT_LIST_WEIGHT': $lc_text = TABLE_HEADING_WEIGHT; $lc_align = 'right'; break; case 'PRODUCT_LIST_IMAGE': $lc_text = TABLE_HEADING_IMAGE; $lc_align = 'center'; break; case 'PRODUCT_LIST_BUY_NOW': $lc_text = TABLE_HEADING_BUY_NOW; $lc_align = 'center'; break; } if ( ($column_list[$col] != 'PRODUCT_LIST_BUY_NOW') && ($column_list[$col] != 'PRODUCT_LIST_IMAGE') ) { $lc_text = tep_create_sort_heading($HTTP_GET_VARS['sort'], $col+1, $lc_text); } $list_box_contents[0][] = array('align' => $lc_align, 'params' => 'class="productListing-heading"', 'text' => ' ' . $lc_text . ' '); } if ($listing_split->number_of_rows > 0) { $rows = 0; $listing_query = tep_db_query($listing_split->sql_query); while ($listing = tep_db_fetch_array($listing_query)) { $rows++; if (($rows/2) == floor($rows/2)) { $list_box_contents[] = array('params' => 'class="productListing-even"'); } else { $list_box_contents[] = array('params' => 'class="productListing-odd"'); } $cur_row = sizeof($list_box_contents) - 1; for ($col=0, $n=sizeof($column_list); $col<$n; $col++) { $lc_align = ''; switch ($column_list[$col]) { case 'PRODUCT_LIST_MODEL': $lc_align = ''; $lc_text = ' ' . $listing['products_model'] . ' '; break; case 'PRODUCT_LIST_NAME': $lc_align = ''; if (isset($HTTP_GET_VARS['manufacturers_id'])) { $lc_text = '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'manufacturers_id=' . $HTTP_GET_VARS['manufacturers_id'] . '&products_id=' . $listing['products_id']) . '">' . $listing['products_name'] . '</a>'; } else { $lc_text = ' <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing['products_id']) . '">' . $listing['products_name'] . '</a> '; } break; case 'PRODUCT_LIST_MANUFACTURER': $lc_align = ''; $lc_text = ' <a href="' . tep_href_link(FILENAME_DEFAULT, 'manufacturers_id=' . $listing['manufacturers_id']) . '">' . $listing['manufacturers_name'] . '</a> '; break; case 'PRODUCT_LIST_PRICE': $lc_align = 'right'; if ($listing['products_msrp'] > $listing['products_price']) { if (tep_not_null($listing['specials_new_products_price'])) { $lc_text = ' <span class="oldPrice">' . $currencies->display_price($listing['products_msrp'], tep_get_tax_rate($listing['products_tax_class_id'])) . ' ' . $currencies->display_price($listing['products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . '</span> <span class="productSpecialPrice">' . $currencies->display_price($listing['specials_new_products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . '</span> '; } else { $lc_text = ' <span class="oldPrice">' . $currencies->display_price($listing['products_msrp'], tep_get_tax_rate($listing['products_tax_class_id'])) . '</span> ' . $currencies->display_price($listing['products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . ' '; } } else { if (tep_not_null($listing['specials_new_products_price'])) { $lc_text = ' <span class="oldPrice">' . $currencies->display_price($listing['products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . '</span> <span class="productSpecialPrice">' . $currencies->display_price($listing['specials_new_products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . '</span> '; } else { $lc_text = ' ' . $currencies->display_price($listing['products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . ' '; } } break; case 'PRODUCT_LIST_QUANTITY': $lc_align = 'right'; $lc_text = ' ' . $listing['products_quantity'] . ' '; break; case 'PRODUCT_LIST_WEIGHT': $lc_align = 'right'; $lc_text = ' ' . $listing['products_weight'] . ' '; break; case 'PRODUCT_LIST_IMAGE': $lc_align = 'center'; if (isset($HTTP_GET_VARS['manufacturers_id'])) { $lc_text = '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'manufacturers_id=' . $HTTP_GET_VARS['manufacturers_id'] . '&products_id=' . $listing['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $listing['products_image'], $listing['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a>'; } else { $lc_text = ' <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $listing['products_image'], $listing['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a> '; } break; case 'PRODUCT_LIST_BUY_NOW': $lc_align = 'center'; $lc_text = '<a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $listing['products_id']) . '">' . tep_image_button('button_in_cart.gif', IMAGE_BUTTON_BUY_NOW) . '</a> '; break; } $list_box_contents[$cur_row][] = array('align' => $lc_align, 'params' => 'class="productListing-data"', 'text' => $lc_text); } } new productListingBox($list_box_contents); } else { $list_box_contents = array(); $list_box_contents[0] = array('params' => 'class="productListing-odd"'); $list_box_contents[0][] = array('params' => 'class="productListing-data"', 'text' => TEXT_NO_PRODUCTS); new productListingBox($list_box_contents); } if ( ($listing_split->number_of_rows > 0) && ((PREV_NEXT_BAR_LOCATION == '2') || (PREV_NEXT_BAR_LOCATION == '3')) ) { ?> <table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td class="smallText"><?php echo $listing_split->display_count(TEXT_DISPLAY_NUMBER_OF_PRODUCTS); ?></td> <td class="smallText" align="right"><?php echo TEXT_RESULT_PAGE . ' ' . $listing_split->display_links(MAX_DISPLAY_PAGE_LINKS, tep_get_all_get_params(array('page', 'info', 'x', 'y'))); ?></td> </tr> </table> <?php } ?>
  2. Hi, I am looking to install a basic points/rewards system on my shop and wondered if anyone could point me in the direction of one they found works well? Many thanks Jemma x
  3. I have installed Define mainpage, and have the confirmation on the home page www.jemcraftmemories.com/catalog and have the define main page showing in admin>catalog>define mainpage
  4. JemCraft

    Define Mainpage

    Hi, I have just tried to install the contrib Define Mainpage, but have now messed up my admin page. The admin page now only has the configuration column and nothing else. also when i click on any of the sub heading links E.G 'my store' nothing happens. I have gone through the instructions twice and am now becoming code blind!! If anyone can help I would be most grateful. Many thanks Jem x This is what i have in catalog/admin/configure.php <?php /* $Id: configuration.php 1739 2007-12-20 00:52:16Z hpdl $ 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'); $action = (isset($HTTP_GET_VARS['action']) ? $HTTP_GET_VARS['action'] : ''); if (tep_not_null($action)) { switch ($action) { case 'save': $configuration_value = tep_db_prepare_input($HTTP_POST_VARS['configuration_value']); $cID = tep_db_prepare_input($HTTP_GET_VARS['cID']); tep_db_query("update " . TABLE_CONFIGURATION . " set configuration_value = '" . tep_db_input($configuration_value) . "', last_modified = now() where configuration_id = '" . (int)$cID . "'"); tep_redirect(tep_href_link(FILENAME_CONFIGURATION, 'gID=' . $HTTP_GET_VARS['gID'] . '&cID=' . $cID)); break; } } $gID = (isset($HTTP_GET_VARS['gID'])) ? $HTTP_GET_VARS['gID'] : 1; $cfg_group_query = tep_db_query("select configuration_group_title from " . TABLE_CONFIGURATION_GROUP . " where configuration_group_id = '" . (int)$gID . "'"); $cfg_group = tep_db_fetch_array($cfg_group_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 TITLE; ?></title> <link rel="stylesheet" type="text/css" href="includes/stylesheet.css"> <script language="javascript" src="includes/general.js"></script> </head> <body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" bgcolor="#FFFFFF" onload="SetFocus();"> <!-- header //--> <?php require(DIR_WS_INCLUDES . 'header.php'); ?> <!-- header_eof //--> <!-- body //--> <table border="0" width="100%" cellspacing="2" cellpadding="2"> <tr> <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="1" cellpadding="1" class="columnLeft"> <!-- left_navigation //--> <?php require(DIR_WS_INCLUDES . 'column_left.php'); ?> <!-- left_navigation_eof //--> </table></td> <!-- body_text //--> <td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td class="pageHeading"><?php echo $cfg_group['configuration_group_title']; ?></td> <td class="pageHeading" align="right"><?php echo tep_draw_separator('pixel_trans.gif', HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td> </tr> </table></td> </tr> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr class="dataTableHeadingRow"> <td class="dataTableHeadingContent"><?php echo TABLE_HEADING_CONFIGURATION_TITLE; ?></td> <td class="dataTableHeadingContent"><?php echo TABLE_HEADING_CONFIGURATION_VALUE; ?></td> <td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_ACTION; ?> </td> </tr> <?php $configuration_query = tep_db_query("select configuration_id, configuration_title, configuration_value, use_function from " . TABLE_CONFIGURATION . " where configuration_group_id = '" . (int)$gID . "' order by sort_order"); while ($configuration = tep_db_fetch_array($configuration_query)) { if (tep_not_null($configuration['use_function'])) { $use_function = $configuration['use_function']; if (ereg('->', $use_function)) { $class_method = explode('->', $use_function); if (!is_object(${$class_method[0]})) { include(DIR_WS_CLASSES . $class_method[0] . '.php'); ${$class_method[0]} = new $class_method[0](); } $cfgValue = tep_call_function($class_method[1], $configuration['configuration_value'], ${$class_method[0]}); } else { $cfgValue = tep_call_function($use_function, $configuration['configuration_value']); } } else { $cfgValue = $configuration['configuration_value']; } if ((!isset($HTTP_GET_VARS['cID']) || (isset($HTTP_GET_VARS['cID']) && ($HTTP_GET_VARS['cID'] == $configuration['configuration_id']))) && !isset($cInfo) && (substr($action, 0, 3) != 'new')) { $cfg_extra_query = tep_db_query("select configuration_key, configuration_description, date_added, last_modified, use_function, set_function from " . TABLE_CONFIGURATION . " where configuration_id = '" . (int)$configuration['configuration_id'] . "'"); $cfg_extra = tep_db_fetch_array($cfg_extra_query); $cInfo_array = array_merge($configuration, $cfg_extra); $cInfo = new objectInfo($cInfo_array); } if ( (isset($cInfo) && is_object($cInfo)) && ($configuration['configuration_id'] == $cInfo->configuration_id) ) { echo ' <tr id="defaultSelected" class="dataTableRowSelected" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . tep_href_link(FILENAME_CONFIGURATION, 'gID=' . $HTTP_GET_VARS['gID'] . '&cID=' . $cInfo->configuration_id . '&action=edit') . '\'">' . "\n"; } else { echo ' <tr class="dataTableRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . tep_href_link(FILENAME_CONFIGURATION, 'gID=' . $HTTP_GET_VARS['gID'] . '&cID=' . $configuration['configuration_id']) . '\'">' . "\n"; } ?> <td class="dataTableContent"><?php echo $configuration['configuration_title']; ?></td> <td class="dataTableContent"><?php echo htmlspecialchars($cfgValue); ?></td> <td class="dataTableContent" align="right"><?php if ( (isset($cInfo) && is_object($cInfo)) && ($configuration['configuration_id'] == $cInfo->configuration_id) ) { echo tep_image(DIR_WS_IMAGES . 'icon_arrow_right.gif', ''); } else { echo '<a href="' . tep_href_link(FILENAME_CONFIGURATION, 'gID=' . $HTTP_GET_VARS['gID'] . '&cID=' . $configuration['configuration_id']) . '">' . tep_image(DIR_WS_IMAGES . 'icon_info.gif', IMAGE_ICON_INFO) . '</a>'; } ?> </td> </tr> <?php } ?> </table></td> <?php $heading = array(); $contents = array(); switch ($action) { case 'edit': $heading[] = array('text' => '<b>' . $cInfo->configuration_title . '</b>'); if ($cInfo->set_function) { eval('$value_field = ' . $cInfo->set_function . '"' . htmlspecialchars($cInfo->configuration_value) . '");'); } else { $value_field = tep_draw_input_field('configuration_value', $cInfo->configuration_value); } $contents = array('form' => tep_draw_form('configuration', FILENAME_CONFIGURATION, 'gID=' . $HTTP_GET_VARS['gID'] . '&cID=' . $cInfo->configuration_id . '&action=save')); $contents[] = array('text' => TEXT_INFO_EDIT_INTRO); $contents[] = array('text' => '<br><b>' . $cInfo->configuration_title . '</b><br>' . $cInfo->configuration_description . '<br>' . $value_field); $contents[] = array('align' => 'center', 'text' => '<br>' . tep_image_submit('button_update.gif', IMAGE_UPDATE) . ' <a href="' . tep_href_link(FILENAME_CONFIGURATION, 'gID=' . $HTTP_GET_VARS['gID'] . '&cID=' . $cInfo->configuration_id) . '">' . tep_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>'); break; default: if (isset($cInfo) && is_object($cInfo)) { $heading[] = array('text' => '<b>' . $cInfo->configuration_title . '</b>'); $contents[] = array('align' => 'center', 'text' => '<a href="' . tep_href_link(FILENAME_CONFIGURATION, 'gID=' . $HTTP_GET_VARS['gID'] . '&cID=' . $cInfo->configuration_id . '&action=edit') . '">' . tep_image_button('button_edit.gif', IMAGE_EDIT) . '</a>'); $contents[] = array('text' => '<br>' . $cInfo->configuration_description); $contents[] = array('text' => '<br>' . TEXT_INFO_DATE_ADDED . ' ' . tep_date_short($cInfo->date_added)); if (tep_not_null($cInfo->last_modified)) $contents[] = array('text' => TEXT_INFO_LAST_MODIFIED . ' ' . tep_date_short($cInfo->last_modified)); } break; } if ( (tep_not_null($heading)) && (tep_not_null($contents)) ) { echo ' <td width="25%" valign="top">' . "\n"; $box = new box; echo $box->infoBox($heading, $contents); echo ' </td>' . "\n"; } ?> </tr> </table></td> </tr> </table></td> <!-- body_text_eof //--> </tr> </table> <!-- body_eof //--> <!-- footer //--> <?php require(DIR_WS_INCLUDES . 'footer.php'); ?> <!-- footer_eof //--> <br> </body> </html> <?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>
  5. JemCraft

    Help with non store pages in site

    Would it not be easier to use products specificaly designed for Gallery, forum etc. and then modify them to look like your osc header?
  6. Hi, I have just tried to install the contrib Define Mainpage, but have now messed up my admin page. The admin page now only has the configuration column and nothing else. also when i click on any of the sub heading links E.G 'my store' nothing happens. I have gone through the instructions twice and am now becoming code blind!! If anyone can help I would be most grateful. Many thanks Jem x This is what i have in catalog/admin/configure.php <?php /* $Id: configuration.php 1739 2007-12-20 00:52:16Z hpdl $ 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'); $action = (isset($HTTP_GET_VARS['action']) ? $HTTP_GET_VARS['action'] : ''); if (tep_not_null($action)) { switch ($action) { case 'save': $configuration_value = tep_db_prepare_input($HTTP_POST_VARS['configuration_value']); $cID = tep_db_prepare_input($HTTP_GET_VARS['cID']); tep_db_query("update " . TABLE_CONFIGURATION . " set configuration_value = '" . tep_db_input($configuration_value) . "', last_modified = now() where configuration_id = '" . (int)$cID . "'"); tep_redirect(tep_href_link(FILENAME_CONFIGURATION, 'gID=' . $HTTP_GET_VARS['gID'] . '&cID=' . $cID)); break; } } $gID = (isset($HTTP_GET_VARS['gID'])) ? $HTTP_GET_VARS['gID'] : 1; $cfg_group_query = tep_db_query("select configuration_group_title from " . TABLE_CONFIGURATION_GROUP . " where configuration_group_id = '" . (int)$gID . "'"); $cfg_group = tep_db_fetch_array($cfg_group_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 TITLE; ?></title> <link rel="stylesheet" type="text/css" href="includes/stylesheet.css"> <script language="javascript" src="includes/general.js"></script> </head> <body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" bgcolor="#FFFFFF" onload="SetFocus();"> <!-- header //--> <?php require(DIR_WS_INCLUDES . 'header.php'); ?> <!-- header_eof //--> <!-- body //--> <table border="0" width="100%" cellspacing="2" cellpadding="2"> <tr> <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="1" cellpadding="1" class="columnLeft"> <!-- left_navigation //--> <?php require(DIR_WS_INCLUDES . 'column_left.php'); ?> <!-- left_navigation_eof //--> </table></td> <!-- body_text //--> <td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td class="pageHeading"><?php echo $cfg_group['configuration_group_title']; ?></td> <td class="pageHeading" align="right"><?php echo tep_draw_separator('pixel_trans.gif', HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td> </tr> </table></td> </tr> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr class="dataTableHeadingRow"> <td class="dataTableHeadingContent"><?php echo TABLE_HEADING_CONFIGURATION_TITLE; ?></td> <td class="dataTableHeadingContent"><?php echo TABLE_HEADING_CONFIGURATION_VALUE; ?></td> <td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_ACTION; ?> </td> </tr> <?php $configuration_query = tep_db_query("select configuration_id, configuration_title, configuration_value, use_function from " . TABLE_CONFIGURATION . " where configuration_group_id = '" . (int)$gID . "' order by sort_order"); while ($configuration = tep_db_fetch_array($configuration_query)) { if (tep_not_null($configuration['use_function'])) { $use_function = $configuration['use_function']; if (ereg('->', $use_function)) { $class_method = explode('->', $use_function); if (!is_object(${$class_method[0]})) { include(DIR_WS_CLASSES . $class_method[0] . '.php'); ${$class_method[0]} = new $class_method[0](); } $cfgValue = tep_call_function($class_method[1], $configuration['configuration_value'], ${$class_method[0]}); } else { $cfgValue = tep_call_function($use_function, $configuration['configuration_value']); } } else { $cfgValue = $configuration['configuration_value']; } if ((!isset($HTTP_GET_VARS['cID']) || (isset($HTTP_GET_VARS['cID']) && ($HTTP_GET_VARS['cID'] == $configuration['configuration_id']))) && !isset($cInfo) && (substr($action, 0, 3) != 'new')) { $cfg_extra_query = tep_db_query("select configuration_key, configuration_description, date_added, last_modified, use_function, set_function from " . TABLE_CONFIGURATION . " where configuration_id = '" . (int)$configuration['configuration_id'] . "'"); $cfg_extra = tep_db_fetch_array($cfg_extra_query); $cInfo_array = array_merge($configuration, $cfg_extra); $cInfo = new objectInfo($cInfo_array); } if ( (isset($cInfo) && is_object($cInfo)) && ($configuration['configuration_id'] == $cInfo->configuration_id) ) { echo ' <tr id="defaultSelected" class="dataTableRowSelected" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . tep_href_link(FILENAME_CONFIGURATION, 'gID=' . $HTTP_GET_VARS['gID'] . '&cID=' . $cInfo->configuration_id . '&action=edit') . '\'">' . "\n"; } else { echo ' <tr class="dataTableRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . tep_href_link(FILENAME_CONFIGURATION, 'gID=' . $HTTP_GET_VARS['gID'] . '&cID=' . $configuration['configuration_id']) . '\'">' . "\n"; } ?> <td class="dataTableContent"><?php echo $configuration['configuration_title']; ?></td> <td class="dataTableContent"><?php echo htmlspecialchars($cfgValue); ?></td> <td class="dataTableContent" align="right"><?php if ( (isset($cInfo) && is_object($cInfo)) && ($configuration['configuration_id'] == $cInfo->configuration_id) ) { echo tep_image(DIR_WS_IMAGES . 'icon_arrow_right.gif', ''); } else { echo '<a href="' . tep_href_link(FILENAME_CONFIGURATION, 'gID=' . $HTTP_GET_VARS['gID'] . '&cID=' . $configuration['configuration_id']) . '">' . tep_image(DIR_WS_IMAGES . 'icon_info.gif', IMAGE_ICON_INFO) . '</a>'; } ?> </td> </tr> <?php } ?> </table></td> <?php $heading = array(); $contents = array(); switch ($action) { case 'edit': $heading[] = array('text' => '<b>' . $cInfo->configuration_title . '</b>'); if ($cInfo->set_function) { eval('$value_field = ' . $cInfo->set_function . '"' . htmlspecialchars($cInfo->configuration_value) . '");'); } else { $value_field = tep_draw_input_field('configuration_value', $cInfo->configuration_value); } $contents = array('form' => tep_draw_form('configuration', FILENAME_CONFIGURATION, 'gID=' . $HTTP_GET_VARS['gID'] . '&cID=' . $cInfo->configuration_id . '&action=save')); $contents[] = array('text' => TEXT_INFO_EDIT_INTRO); $contents[] = array('text' => '<br><b>' . $cInfo->configuration_title . '</b><br>' . $cInfo->configuration_description . '<br>' . $value_field); $contents[] = array('align' => 'center', 'text' => '<br>' . tep_image_submit('button_update.gif', IMAGE_UPDATE) . ' <a href="' . tep_href_link(FILENAME_CONFIGURATION, 'gID=' . $HTTP_GET_VARS['gID'] . '&cID=' . $cInfo->configuration_id) . '">' . tep_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>'); break; default: if (isset($cInfo) && is_object($cInfo)) { $heading[] = array('text' => '<b>' . $cInfo->configuration_title . '</b>'); $contents[] = array('align' => 'center', 'text' => '<a href="' . tep_href_link(FILENAME_CONFIGURATION, 'gID=' . $HTTP_GET_VARS['gID'] . '&cID=' . $cInfo->configuration_id . '&action=edit') . '">' . tep_image_button('button_edit.gif', IMAGE_EDIT) . '</a>'); $contents[] = array('text' => '<br>' . $cInfo->configuration_description); $contents[] = array('text' => '<br>' . TEXT_INFO_DATE_ADDED . ' ' . tep_date_short($cInfo->date_added)); if (tep_not_null($cInfo->last_modified)) $contents[] = array('text' => TEXT_INFO_LAST_MODIFIED . ' ' . tep_date_short($cInfo->last_modified)); } break; } if ( (tep_not_null($heading)) && (tep_not_null($contents)) ) { echo ' <td width="25%" valign="top">' . "\n"; $box = new box; echo $box->infoBox($heading, $contents); echo ' </td>' . "\n"; } ?> </tr> </table></td> </tr> </table></td> <!-- body_text_eof //--> </tr> </table> <!-- body_eof //--> <!-- footer //--> <?php require(DIR_WS_INCLUDES . 'footer.php'); ?> <!-- footer_eof //--> <br> </body> </html> <?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>
  7. Also if I try to access http://www.yourdomain.com/{directory?}/goo...temap/index.php In my case it is http://www.jemcraftmemories.com/shop/googlesitemap/index.php I get the error
  8. Hi, I have done this domain.com/directory/sitemapproducts.xml domain.com/directory/sitemapcategories.xml domain.com/directory/sitemapindex.xml however I get the error: Can someone help?
  9. JemCraft

    Official PayPal IPN Support Thread

    Paypal IPN has never worked properly for me bt have still been able to use the website fine until today. For some reason, I know do not have anything below the Paypal IPN notifications box when on the page to edit the customers orders (the one where you can allocate 'pending', dispatched' etc). The Paypal IPN box used to say 'no data available', and underneath it was the order details inthe normal way, however now the Paypal IPN box says: I haven't even been on the website since it has changed - any help gratefully received as Paypal shows I have been paid for 7 orders, however the website doesn't tell me what they are : - ( Thanks Jemma
  10. JemCraft

    Paypal IPN not working

    Paypal IPN has never worked properly for me bt have still been able to use the website fine until today. For some reason, I know do not have anything below the Paypal IPN notifications box when on the page to edit the customers orders (the one where you can allocate 'pending', dispatched' etc). The Paypal IPN box used to say 'no data available', and underneath it was the order details inthe normal way, however now the Paypal IPN box says: I haven't even been on the website since it has changed - any help gratefully received as Paypal shows I have been paid for 7 orders, however the website doesn't tell me what they are : - ( Thanks Jemma
  11. OK so am presuming you mean catalog/includes/functions/html_output.php, here's what I have in mine - have I put it in the wrong place? <?php /* $Id: html_output.php,v 1.56 2003/07/09 01:15:48 hpdl Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2003 osCommerce Released under the GNU General Public License */ //// // The HTML href link wrapper function function tep_href_link($page = '', $parameters = '', $connection = 'NONSSL', $add_session_id = true, $search_engine_safe = true) { global $request_type, $session_started, $SID; if (!tep_not_null($page)) { die('</td></tr></table></td></tr></table><br><br><font color="#ff0000"><b>Error!</b></font><br><br><b>Unable to determine the page link!<br><br>'); } if ($connection == 'NONSSL') { $link = HTTP_SERVER . DIR_WS_HTTP_CATALOG; } elseif ($connection == 'SSL') { if (ENABLE_SSL == true) { $link = HTTPS_SERVER . DIR_WS_HTTPS_CATALOG; } else { $link = HTTP_SERVER . DIR_WS_HTTP_CATALOG; } } else { die('</td></tr></table></td></tr></table><br><br><font color="#ff0000"><b>Error!</b></font><br><br><b>Unable to determine connection method on a link!<br><br>Known methods: NONSSL SSL</b><br><br>'); } if (tep_not_null($parameters)) { $link .= $page . '?' . tep_output_string($parameters); $separator = '&'; } else { $link .= $page; $separator = '?'; } while ( (substr($link, -1) == '&') || (substr($link, -1) == '?') ) $link = substr($link, 0, -1); // Add the session ID when moving from different HTTP and HTTPS servers, or when SID is defined if ( ($add_session_id == true) && ($session_started == true) && (SESSION_FORCE_COOKIE_USE == 'False') ) { if (tep_not_null($SID)) { $_sid = $SID; } elseif ( ( ($request_type == 'NONSSL') && ($connection == 'SSL') && (ENABLE_SSL == true) ) || ( ($request_type == 'SSL') && ($connection == 'NONSSL') ) ) { if (HTTP_COOKIE_DOMAIN != HTTPS_COOKIE_DOMAIN) { $_sid = tep_session_name() . '=' . tep_session_id(); } } } if ( (SEARCH_ENGINE_FRIENDLY_URLS == 'true') && ($search_engine_safe == true) ) { while (strstr($link, '&&')) $link = str_replace('&&', '&', $link); $link = str_replace('?', '/', $link); $link = str_replace('&', '/', $link); $link = str_replace('=', '/', $link); $separator = '?'; } if (isset($_sid)) { $link .= $separator . $_sid; } return $link; } //// // The HTML image wrapper function // BOF Image Magic function tep_image($src, $alt = '', $width = '', $height = '', $params = '') { global $product_info; //Allow for a new intermediate sized thumbnail size to be set //without any changes having to be made to the product_info page itself. //(see the lengths I go to to make your life easier :-) if (strstr($_SERVER['PHP_SELF'],"product_info.php")) { if (isset($product_info['products_image']) && $src == DIR_WS_IMAGES . $product_info['products_image'] && $product_info[products_id]==$_GET['products_id']) { //final check just to make sure that we don't interfere with other contribs $width = PRODUCT_INFO_IMAGE_WIDTH == 0?'':PRODUCT_INFO_IMAGE_WIDTH; $height = PRODUCT_INFO_IMAGE_HEIGHT == 0?'':PRODUCT_INFO_IMAGE_HEIGHT; $product_info_image=true; $page="prod_info"; } } //Detect whether this is a pop-up image if (strstr($_SERVER['PHP_SELF'],"popup_image.php")) $page="popup"; //do we apply the IE PNG alpha transparency fix? if (strstr(strtolower($src),".png") && CFG_PNG_BUG=="True") $fix_png = true; //send the image for processing unless told otherwise $image = '<img src="' . $src . '"'; //set up the image tag just in case we don't want to process if (CFG_MASTER_SWITCH=="On") $calculate = true; else $calculate=false; // Don't calculate if the image is set to a "%" width if (strstr($width,'%') == true || strstr($height,'%') == true) $calculate = false; // Dont calculate if a pixel image is being passed (hope you dont have pixels for sale) if (strstr($image, 'pixel')) $calculate = false; $image_size = @getimagesize($src); // Decide whether or not we want to process this image if (($width == '' && $height == '' && $page != 'popup' ) || ($width == $image_size[0] && $height == $image_size[0] && $page != 'popup')) { if (CFG_PROCESS_GRAPHICS=="False") $calculate = false; //looks like this is a store graphic rather than product image } // Is this image good to go? if (CONFIG_CALCULATE_IMAGE_SIZE && $calculate) { if ($image_size) { $ratio = $image_size[1] / $image_size[0]; // Set the width and height to the proper ratio if (!$width && $height) { $ratio = $height / $image_size[1]; $width = intval($image_size[0] * $ratio); } elseif ($width && !$height) { $ratio = $width / $image_size[0]; $height = intval($image_size[1] * $ratio); } elseif (!$width && !$height && !$over_ride) { $width = $image_size[0]; $height = $image_size[1]; } //Encrypt the image filename if switched on if (CFG_ENCRYPT_FILENAMES == "True" && CFG_ENCRYPTION_KEY !="") { $result = ''; $key=CFG_ENCRYPTION_KEY; for($i=0; $i<strlen($src); $i++) { $char = substr($src, $i, 1); $keychar = substr($key, ($i % strlen($key))-1, 1); $char = chr(ord($char)+ord($keychar)); $result.=$char; } $src=urlencode(base64_encode($result)); } //Return the html $image = '<img src="imagemagic.php?img='.$src.'&w='. tep_output_string($width).'&h='.tep_output_string($height).'&page='.$page.'"'; } elseif (IMAGE_REQUIRED == 'false') { return false; } } //If the size asked for is greater than the image itself, we check the configs to see if this is allowed and if not over-ride if ($width > $image_size[0] || $height > $image_size[1]) { if (CFG_ALLOW_LARGER != 'True'){ $width=$image_size[0]; $height=$image_size[1]; $over_ride = true; } } // Add remaining image parameters if they exist if ($width) { $image .= ' width="' . tep_output_string($width) . '"'; } if ($height) { $image .= ' height="' . tep_output_string($height) . '"'; } if (tep_not_null($params)) $image .= ' ' . $params; $image .= ' border="0" alt="' . tep_output_string($alt) . '"'; if (tep_not_null($alt)) { $image .= ' title="' . tep_output_string($alt) . '"'; } if ($fix_png && CFG_MASTER_SWITCH=="On") { $image .= ' onload="fixPNG(this)"'; } $image .= '>'; return $image; } //EOF Image Magic //// // The HTML form submit button wrapper function // Outputs a button in the selected language function tep_image_submit($image, $alt = '', $parameters = '') { global $language; $image_submit = '<input type="image" src="' . tep_output_string(DIR_WS_LANGUAGES . $language . '/images/buttons/' . $image) . '" border="0" alt="' . tep_output_string($alt) . '"'; if (tep_not_null($alt)) $image_submit .= ' title=" ' . tep_output_string($alt) . ' "'; if (tep_not_null($parameters)) $image_submit .= ' ' . $parameters; $image_submit .= '>'; return $image_submit; } //// // Output a function button in the selected language function tep_image_button($image, $alt = '', $parameters = '') { global $language; return tep_image(DIR_WS_LANGUAGES . $language . '/images/buttons/' . $image, $alt, '', '', $parameters); } //// // Output a separator either through whitespace, or with an image function tep_draw_separator($image = 'pixel_black.gif', $width = '100%', $height = '1') { return tep_image(DIR_WS_IMAGES . $image, '', $width, $height); } //// // Output a form function tep_draw_form($name, $action, $method = 'post', $parameters = '') { $form = '<form name="' . tep_output_string($name) . '" action="' . tep_output_string($action) . '" method="' . tep_output_string($method) . '"'; if (tep_not_null($parameters)) $form .= ' ' . $parameters; $form .= '>'; return $form; } //// // Output a form input field function tep_draw_input_field($name, $value = '', $parameters = '', $type = 'text', $reinsert_value = true) { $field = '<input type="' . tep_output_string($type) . '" name="' . tep_output_string($name) . '"'; if ( (isset($GLOBALS[$name])) && ($reinsert_value == true) ) { $field .= ' value="' . tep_output_string(stripslashes($GLOBALS[$name])) . '"'; } elseif (tep_not_null($value)) { $field .= ' value="' . tep_output_string($value) . '"'; } if (tep_not_null($parameters)) $field .= ' ' . $parameters; $field .= '>'; return $field; } //// // Output a form password field function tep_draw_password_field($name, $value = '', $parameters = 'maxlength="40"') { return tep_draw_input_field($name, $value, $parameters, 'password', false); } //// // Output a selection field - alias function for tep_draw_checkbox_field() and tep_draw_radio_field() function tep_draw_selection_field($name, $type, $value = '', $checked = false, $parameters = '') { $selection = '<input type="' . tep_output_string($type) . '" name="' . tep_output_string($name) . '"'; if (tep_not_null($value)) $selection .= ' value="' . tep_output_string($value) . '"'; if ( ($checked == true) || ( isset($GLOBALS[$name]) && is_string($GLOBALS[$name]) && ( ($GLOBALS[$name] == 'on') || (isset($value) && (stripslashes($GLOBALS[$name]) == $value)) ) ) ) { $selection .= ' CHECKED'; } if (tep_not_null($parameters)) $selection .= ' ' . $parameters; $selection .= '>'; return $selection; } //// // Output a form checkbox field function tep_draw_checkbox_field($name, $value = '', $checked = false, $parameters = '') { return tep_draw_selection_field($name, 'checkbox', $value, $checked, $parameters); } //// // Output a form radio field function tep_draw_radio_field($name, $value = '', $checked = false, $parameters = '') { return tep_draw_selection_field($name, 'radio', $value, $checked, $parameters); } //// // Output a form textarea field function tep_draw_textarea_field($name, $wrap, $width, $height, $text = '', $parameters = '', $reinsert_value = true) { $field = '<textarea name="' . tep_output_string($name) . '" wrap="' . tep_output_string($wrap) . '" cols="' . tep_output_string($width) . '" rows="' . tep_output_string($height) . '"'; if (tep_not_null($parameters)) $field .= ' ' . $parameters; $field .= '>'; if ( (isset($GLOBALS[$name])) && ($reinsert_value == true) ) { $field .= stripslashes($GLOBALS[$name]); } elseif (tep_not_null($text)) { $field .= $text; } $field .= '</textarea>'; return $field; } //// // Output a form hidden field function tep_draw_hidden_field($name, $value = '', $parameters = '') { $field = '<input type="hidden" name="' . tep_output_string($name) . '"'; if (tep_not_null($value)) { $field .= ' value="' . tep_output_string($value) . '"'; } elseif (isset($GLOBALS[$name])) { $field .= ' value="' . tep_output_string(stripslashes($GLOBALS[$name])) . '"'; } if (tep_not_null($parameters)) $field .= ' ' . $parameters; $field .= '>'; return $field; } //// // Hide form elements function tep_hide_session_id() { global $session_started, $SID; if (($session_started == true) && tep_not_null($SID)) { return tep_draw_hidden_field(tep_session_name(), tep_session_id()); } } //// // Output a form pull down menu function tep_draw_pull_down_menu($name, $values, $default = '', $parameters = '', $required = false) { $field = '<select name="' . tep_output_string($name) . '"'; if (tep_not_null($parameters)) $field .= ' ' . $parameters; $field .= '>'; if (empty($default) && isset($GLOBALS[$name])) $default = stripslashes($GLOBALS[$name]); for ($i=0, $n=sizeof($values); $i<$n; $i++) { $field .= '<option value="' . tep_output_string($values[$i]['id']) . '"'; if ($default == $values[$i]['id']) { $field .= ' SELECTED'; } $field .= '>' . tep_output_string($values[$i]['text'], array('"' => '"', '\'' => ''', '<' => '<', '>' => '>')) . '</option>'; } $field .= '</select>'; if ($required == true) $field .= TEXT_FIELD_REQUIRED; return $field; } //// // Creates a pull-down list of countries function tep_get_country_list($name, $selected = '', $parameters = '') { $countries_array = array(array('id' => '', 'text' => PULL_DOWN_DEFAULT)); $countries = tep_get_countries(); for ($i=0, $n=sizeof($countries); $i<$n; $i++) { $countries_array[] = array('id' => $countries[$i]['countries_id'], 'text' => $countries[$i]['countries_name']); } return tep_draw_pull_down_menu($name, $countries_array, $selected, $parameters); } ?>
  12. Has anyone got this working without paying for it?? Maybe I'm just being sceptical but have been wondering if there is a bit missing that is 'fixed' during the paid for install.....
  13. Note 1: In the instructions below, I have made the assumption that your store's root folder is catalog. IE. Your store is accessed by typing www.yourstore.com/catalog into a browser. Note 2: Be sure to read the installation instructions *all* the way and if you do not understand what is being said here, do not try to install it and instead come to the forum section for help. Step #1 - Analyzing requirements This contribution requires: osCommerce 2.2-MS2 the GD image library, which now comes packaged with most PHP builds Note: you can verify that you have both requirements in your admin panel (Tools -> Server Info). Check if you have the GD-library installed by looking for a "gd" subsection. Step #2 - Backup files Make a backup of the files that are going to be changed: Your store's OSC database (Very important!) catalog/includes/functions/html_output.php catalog/admin/includes/functions/general.php If applying the IE PNG bug work-around, then also backup: catalog/popup_image.php catalog/includes/header.php Step #3 - Update your store database Run the imagemagic.sql file contained in the zip archive or copy and paste the SQL query below into PHPMyAdmin or your favourite MYSQL browser client INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES (3205,'Product Information Image Width','PRODUCT_INFO_IMAGE_WIDTH','100','The pixel width of images shown on your product information page',4,100,NULL,'2005-01-06 20:24:30',NULL,''); INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES (3206,'Product Information Image Height','PRODUCT_INFO_IMAGE_HEIGHT','0','The pixel height of images shown on your product information page',4,101,NULL,'2005-01-06 20:24:30',NULL,''); INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES (3207,'Image Magic Master Switch','CFG_MASTER_SWITCH','On','Switch OSC Image Magic on or off',333,3,NULL,'2005-01-06 20:24:30',NULL,'tep_cfg_select_option(array(\'On\', \'Off\'),'); INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES (3278,'Apply security features to registered customers','CFG_REGISTERED_WATERMARKS','Yes','If this option is set to no, all image security features will be disabled when a registered customer is browsing your site',333,4,NULL,'2005-01-06 20:24:30',NULL,'tep_cfg_select_option(array(\'Yes\', \'No\'),'); INSERT INTO configuration_group (configuration_group_id, configuration_group_title, configuration_group_description, sort_order, visible) VALUES (333,'Image Magic','Configuration options for the OSC Image Magic contribution',4,1); INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES (3279,'Help support the OSC Image Magic Project','','Make a donation', CONCAT('Reward the author & support future releases. Please click the button below to make a donation<p><a href=\"http://www.celtware.com/im/donate.php?ref=',FLOOR(0 + (RAND(UNIX_TIMESTAMP()) * 9999999999999999)),'\"><img src=\"http://www.celtware.com/im/donate.php?ref=img',FLOOR(0 + (RAND(UNIX_TIMESTAMP()) * 9999999999999999)),'\" border=\"0\"></a>'),333,-1,'2005-10-03 03:08:38','1899-12-29','','tep_cfg_readonly('); INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES (3208,'Process Store\'s Graphics','CFG_PROCESS_GRAPHICS','False','If this is set to true, ALL store graphics will be processed and cached, including buttons, clip art etc. The default, recommended setting for this is False',333,6,NULL,'2005-01-06 20:24:30',NULL,'tep_cfg_select_option(array(\'True\', \'False\'),'); INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES (3209,'Auto Clean Cache','CFG_CACHE_AUTO_CLEAN','True','If selected, the cache will automatically be cleared of un-needed items. Set to true if you want to sacrifice a small amount of performance for server disk space saving',333,9,NULL,'2005-01-06 20:24:30',NULL,'tep_cfg_select_option(array(\'True\', \'False\'),'); INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES (3210,'Encrypt Image Filenames','CFG_ENCRYPT_FILENAMES','False','If you select this option all of your filenames will be encrypted. This option will prevent visitors from discovering your image filenames. Use it in combination with image watermarking to prevent theft of your images.',333,12,NULL,'2005-01-06 20:24:30',NULL,'tep_cfg_select_option(array(\'True\', \'False\'),'); INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES (3211,'Filename Encryption Key','CFG_ENCRYPTION_KEY','changeme','If you have switched on image filename encryption, then enter a string here to be used as the encryption key',333,15,NULL,'2005-01-06 20:24:30',NULL,''); INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES (3212,'Apply Internet Explorer PNG Transparency work-around?','CFG_PNG_BUG','False','This option will switch on a work-around so that PNG alpha transparency images will display correctly in Internet Explorer<br><b>Note:</b> Two files need to be modified to enable this - See readme.',333,18,NULL,'2005-01-06 20:24:30',NULL,'tep_cfg_select_option(array(\'True\', \'False\'),'); INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES (3213,'Use Resampling','CFG_USE_RESAMPLING','True','If selected, thumbnails will be resampled rather than resized. Resampling creates much higher quality thumbnails.',333,21,NULL,'2005-01-06 20:24:30',NULL,'tep_cfg_select_option(array(\'True\', \'False\'),'); INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES (3214,'Create Truecolour Thumbnails','CFG_CREATE_TRUECOLOR','True','Create True color Thumbnails? Better quality overall but set to false if you have GD version < 2.01 or if creating transparent thumbnails.',333,24,NULL,'2005-01-06 20:24:30',NULL,'tep_cfg_select_option(array(\'True\', \'False\'),'); INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES (3215,'Output GIFs as JPEGs','CFG_GIFS_AS_JPEGS','False','Set this option true if you have GD version > 1.6 and want to output GIFs as JPGs. Note that transparencies will not be retained (set matte colour below). If you have GD Library < 1.6 with GIF create support, GIFs will be output as GIFs.',333,27,NULL,'2005-01-06 20:24:30',NULL,'tep_cfg_select_option(array(\'True\', \'False\'),'); INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES (3220,'\'GIF as JPEG\' Matte colour (HEX)','CFG_MATTE_COLOR','FFFFFF','Enter the HEX colour value that transparent backgrounds will be converted to if GIFs output as JPGs',333,28,NULL,'2005-01-06 20:24:30',NULL,''); INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES (3216,'Cache Thumbnails on the Server','CFG_TN_SERVER_CACHE','True','Set to true if you want to cache previously processed thumbnails on disk. This will add to disk space but will save your processor from having to create a new thumbnail for every visitor. (recommended)',333,30,NULL,'2005-01-06 20:24:30',NULL,'tep_cfg_select_option(array(\'True\', \'False\'),'); INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES (3219,'Cache Thumbnails in user\'s browser','CFG_TN_BROWSER_CACHE','True','Set to true if you want browsers to be able to cache viewed thumbnails in their own cache. This will save bandwidth for every visitor that views the same thumbnail again. (recommended)',333,31,NULL,'2005-01-06 20:24:30',NULL,'tep_cfg_select_option(array(\'True\', \'False\'),'); INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES (3217,'Thumbnail Cache directory','CFG_TN_CACHE_DIRECTORY','/thumbnails','Directory where cached thumbnails will be stored. <br><b>Note:</b> This directory should be automatically created, if not, do so manually and chmod it to 777',333,33,NULL,'2005-01-06 20:24:30',NULL,''); INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES (3218,'Use 404 Response if image not found?','CFG_USE_404','True','If set to true a 404 (not found) response will be sent (broken image), otherwise a small error picture will be shown',333,36,NULL,'2005-01-06 20:24:30',NULL,'tep_cfg_select_option(array(\'True\', \'False\'),'); INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES (3221,'Allow thumbnails larger than original','CFG_ALLOW_LARGER','True','Set to true if you want to allow scaling UP of source image files.',333,45,NULL,'2005-01-06 20:24:30',NULL,'tep_cfg_select_option(array(\'True\', \'False\'),'); INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES (3271,'Center if thumbnail larger than original','CFG_CENTER_THUMB','False','If your source is smaller than the thumbnail, should it be centered on the larger thumbnail rather than resized?<br><b>Note:</b> \'Allow thumbnails larger than original\' (above) must be set to true',333,46,NULL,'2005-01-06 20:24:30',NULL,'tep_cfg_select_option(array(\'True\', \'False\'),'); INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES (3222,'JPEG Quality - Pop-up Images','POPUP_JPEG_QUALITY','100','The output quality of JPEG pop-up images.',333,48,NULL,'2005-01-06 20:24:30',NULL,NULL); INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES (3223,'JPEG Quality - Product Information Thumbnails','PRODUCT_JPEG_QUALITY','100','The output quality of JPEG thumbnails displayed on your product information page',333,51,NULL,'2005-01-06 20:24:30',NULL,NULL); INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES (3224,'JPEG Quality - Category Thumbnails','CATEGORY_JPEG_QUALITY','100','The output quality of category JPEG thumbnails',333,52,NULL,'2005-01-06 20:24:30',NULL,NULL); INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES (3265,'JPEG Quality - Heading Thumbnails','HEADING_JPEG_QUALITY','100','The output quality of heading JPEG thumbnails',333,53,NULL,'2005-01-06 20:24:30',NULL,NULL); INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES (3260,'JPEG Quality - Small Thumbnails','SMALL_JPEG_QUALITY','100','The output quality of your small sized JPEG thumbnails',333,55,NULL,'2005-01-06 20:24:30',NULL,NULL); INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES (3225,'Graphic Watermark in Pop-up Images','USE_WATERMARK_IMAGE_POPUP','No','Do you wish to use a watermark image in your pop-up product image?<br><b>Note:</b>Graphic Watermarks will NOT be added to GIF images',333,57,NULL,'2005-01-06 20:24:30',NULL,'tep_cfg_select_option(array(\'Yes\', \'No\'),'); INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES (3226,'Graphic Watermark in Product Information Thumbnails','USE_WATERMARK_IMAGE_PRODUCT','No','Do you wish to use a watermark image in your product information thumbnails?<br><b>Note:</b>Graphic Watermarks will NOT be added to GIF images',333,58,NULL,'2005-01-06 20:24:30',NULL,'tep_cfg_select_option(array(\'Yes\', \'No\'),'); INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES (3227,'Graphic Watermark in Category Thumbnails','USE_WATERMARK_IMAGE_CATEGORY','No','Do you wish to use a watermark image in your category thumbnails?<br><b>Note:</b>Graphic Watermarks will NOT be added to GIF images',333,59,NULL,'2005-01-06 20:24:30',NULL,'tep_cfg_select_option(array(\'Yes\', \'No\'),'); INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES (3266,'Graphic Watermark in Heading Thumbnails','USE_WATERMARK_IMAGE_HEADING','No','Do you wish to use a watermark image in your heading thumbnails?<br><b>Note:</b>Graphic Watermarks will NOT be added to GIF images',333,60,NULL,'2005-01-06 20:24:30',NULL,'tep_cfg_select_option(array(\'Yes\', \'No\'),'); INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES (3261,'Graphic Watermark in Small Thumbnails','USE_WATERMARK_IMAGE_SMALL','No','Do you wish to use a watermark image in your small thumbnails<br><b>Note:</b>Graphic Watermarks will NOT be added to GIF images?',333,61,NULL,'2005-01-06 20:24:30',NULL,'tep_cfg_select_option(array(\'Yes\', \'No\'),'); INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES (3228,'Watermark Image File','WATERMARK_IMAGE','','Select which watermark image you wish to use<br><br>New watermark images may be installed in your:<br><b>/catalog/includes/imagemagic/watermarks/</b><br>directory<br>',333,66,NULL,'2005-01-06 20:24:30',NULL,'tep_cfg_pull_down_installed_watermarks('); INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES (3229,'Image Watermark Transparency','WATERMARK_IMAGE_OPACITY','20','Enter a value of 0 to 100 to set the opacity value of your watermark image (0=transparent, 100=opaque)',333,69,NULL,'2005-01-06 20:24:30',NULL,''); INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES (3230,'Image Watermark Position','WATERMARK_IMAGE_POSITION','Top','Select where you would like your watermark image to be positioned on your thumbnail',333,71,NULL,'2005-01-06 20:24:30',NULL,'tep_cfg_pull_down_watermark_alignment('); INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES (3231,'Image Watermark Margin','WATERMARK_IMAGE_MARGIN','0','Enter the offset in pixels where you would like your watermark image to be positioned',333,72,NULL,'2005-01-06 20:24:30',NULL,''); INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES (3270,'Resize Watermark Image','CFG_RESIZE_WATERMARK','True','If selected, your watermark image will be resized in the same ratio as your source image, otherwise the watermark image will always be added full-sized',333,73,NULL,'2005-01-06 20:24:30',NULL,'tep_cfg_select_option(array(\'True\', \'False\'),'); INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES (3232,'Text Watermark in Pop-up Images','USE_WATERMARK_TEXT_POPUP','No','Do you wish to use watermark text in your pop-up product images?<br><b>Note:</b>Text Watermarks do not work well with GIF images',333,75,NULL,'2005-01-06 20:24:30',NULL,'tep_cfg_select_option(array(\'Yes\', \'No\'),'); INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES (3233,'Text Watermark in Product Information Thumbnails','USE_WATERMARK_TEXT_PRODUCT','No','Do you wish to use watermark text in your product information thumbnails?<br><b>Note:</b>Text Watermarks do not work well with GIF images',333,76,NULL,'2005-01-06 20:24:30',NULL,'tep_cfg_select_option(array(\'Yes\', \'No\'),'); INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES (3234,'Text Watermark in Category Thumbnails','USE_WATERMARK_TEXT_CATEGORY','No','Do you wish to use watermark text in your category thumbnails?<br><b>Note:</b>Text Watermarks do not work well with GIF images',333,77,NULL,'2005-01-06 20:24:30',NULL,'tep_cfg_select_option(array(\'Yes\', \'No\'),'); INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES (3267,'Text Watermark in Heading Thumbnails','USE_WATERMARK_TEXT_HEADING','No','Do you wish to use watermark text in your heading thumbnails?<br><b>Note:</b>Text Watermarks do not work well with GIF images',333,78,NULL,'2005-01-06 20:24:30',NULL,'tep_cfg_select_option(array(\'Yes\', \'No\'),'); INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES (3262,'Text Watermark in Small Thumbnails','USE_WATERMARK_TEXT_SMALL','No','Do you wish to use watermark text in your small thumbnails?<br><b>Note:</b>Text Watermarks do not work well with GIF images',333,79,NULL,'2005-01-06 20:24:30',NULL,'tep_cfg_select_option(array(\'Yes\', \'No\'),'); INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES (3235,'Watermark Text','WATERMARK_TEXT','Sample','Enter the text you wish to appear in your thumbnails as a watermark',333,84,NULL,'2005-01-06 20:24:30',NULL,''); INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES (3236,'Text Watermark Font Name','WATERMARK_TEXT_FONT','arial.ttf','Select the font filename you wish to use for watermark text<br><br>New TTF fonts may be installed in your:<br><b>/catalog/includes/imagemagic/fonts/</b><br>directory<br>',333,87,NULL,'2005-01-06 20:24:30',NULL,'tep_cfg_pull_down_installed_fonts('); INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES (3237,'Text Watermark Size','WATERMARK_TEXT_SIZE','10','Enter the font point size of your text watermark',333,90,NULL,'2005-01-06 20:24:30',NULL,''); INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES (3238,'Text Watermark Colour (HEX)','WATERMARK_TEXT_COLOR','000000','Enter the hex value for the colour of your text watermark',333,93,NULL,'2005-01-06 20:24:30',NULL,''); INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES (3239,'Text Watermark Transparency','WATERMARK_TEXT_OPACITY','20','Enter a value of 0 to 100 to set the transparency value of your watermark text (0=transparent, 100=opaque)',333,96,NULL,'2005-01-06 20:24:30',NULL,''); INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES (3240,'Text Watermark Position','WATERMARK_TEXT_POSITION','Top','Select where you would like your watermark text to be positioned on your thumbnails',333,99,NULL,'2005-01-06 20:24:30',NULL,'tep_cfg_pull_down_watermark_alignment('); INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES (3241,'Text Watermark Margin','WATERMARK_TEXT_MARGIN','0','Enter the offset in pixels where you would like your watermark text to be positioned',333,102,NULL,'2005-01-06 20:24:30',NULL,''); INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES (3242,'Text Watermark Angle','WATERMARK_TEXT_ANGLE','0','Enter the counter-clockwise angle of the text watermark',333,105,NULL,'2005-01-06 20:24:30',NULL,''); INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES (3243,'Auto Adjust Brightness','BRIGHTNESS_ADJUST','0','Enter an amount between -255 and 255 which your thumbnail brightness will be adjusted by<br><b>Note:</b> This will not work with GIF images',333,108,NULL,'2005-01-06 20:24:30',NULL,''); INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES (3244,'Auto Adjust Contrast','CONTRAST_ADJUST','0','Enter an amount between -255 and 255 which your thumbnail contrast will be adjusted by<br><b>Note:</b> This will not work with GIF images',333,111,NULL,'2005-01-06 20:24:30',NULL,''); INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES (3245,'Frame Pop-up Images','FRAME_POPUP','No','Do you want to include a frame around your pop-up product images?',333,114,NULL,'2005-01-06 20:24:30',NULL,'tep_cfg_select_option(array(\'Yes\', \'No\'),'); INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES (3246,'Frame Product Information Thumbnails','FRAME_PRODUCT','No','Do you want to include a frame around your product information thumbnails?',333,115,NULL,'2005-01-06 20:24:30',NULL,'tep_cfg_select_option(array(\'Yes\', \'No\'),'); INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES (3247,'Frame Category Thumbnails','FRAME_CATEGORY','No','Do you want to include a frame around your category thumbnails?',333,116,NULL,'2005-01-06 20:24:30',NULL,'tep_cfg_select_option(array(\'Yes\', \'No\'),'); INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES (3268,'Frame Heading Thumbnails','FRAME_HEADING','No','Do you want to include a frame around your heading thumbnails?',333,117,NULL,'2005-01-06 20:24:30',NULL,'tep_cfg_select_option(array(\'Yes\', \'No\'),'); INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES (3263,'Frame Small Thumbnails','FRAME_SMALL','No','Do you want to include a frame around your small thumbnails?',333,118,NULL,'2005-01-06 20:24:30',NULL,'tep_cfg_select_option(array(\'Yes\', \'No\'),'); INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES (3248,'Frame Width','FRAME_WIDTH','4','Enter the width in pixels of the thumbnail frame',333,120,NULL,'2005-01-06 20:24:30',NULL,''); INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES (3249,'Frame Depth','FRAME_EDGE_WIDTH','4','Enter the 3D depth of the frame in pixels',333,123,NULL,'2005-01-06 20:24:30',NULL,''); INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES (3250,'Frame Colour (HEX)','FRAME_COLOR','CCCCCC','Enter the HEX colour of the thumbnail frame',333,126,NULL,'2005-01-06 20:24:30',NULL,''); INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES (3251,'Frame Inside 3D Highlight Colour (HEX)','FRAME_INSIDE_COLOR1','FFFFFF','Enter the colour (in hex) you wish the frame\'s inside higlight colour to be',333,129,NULL,'2005-01-06 20:24:30',NULL,''); INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES (3252,'Frame Inside 3D Shadow Colour (HEX)','FRAME_INSIDE_COLOR2','000000','Enter the colour (in hex) you wish the frame\'s inside shadow colour to be',333,132,NULL,'2005-01-06 20:24:30',NULL,''); INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES (3253,'Buttonize Pop-up Images','BEVEL_POPUP','No','Do you want to add a 3D button effect to your pop-up images?',333,133,NULL,'2005-01-06 20:24:30',NULL,'tep_cfg_select_option(array(\'Yes\', \'No\'),'); INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES (3254,'Buttonize Product Information Thumbnails','BEVEL_PRODUCT','No','Do you want to add a 3D button effect to your product information thumbnails?',333,134,NULL,'2005-01-06 20:24:30',NULL,'tep_cfg_select_option(array(\'Yes\', \'No\'),'); INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES (3255,'Buttonize Category Thumbnails','BEVEL_CATEGORY','No','Do you want to add a 3D button effect to your category thumbnails?',333,135,NULL,'2005-01-06 20:24:30',NULL,'tep_cfg_select_option(array(\'Yes\', \'No\'),'); INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES (3269,'Buttonize Heading Thumbnails','BEVEL_HEADING','No','Do you want to add a 3D button effect to your heading thumbnails?',333,136,NULL,'2005-01-06 20:24:30',NULL,'tep_cfg_select_option(array(\'Yes\', \'No\'),'); INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES (3264,'Buttonize Small Thumbnails','BEVEL_SMALL','No','Do you want to add a 3D button effect to your small thumbnails?',333,137,NULL,'2005-01-06 20:24:30',NULL,'tep_cfg_select_option(array(\'Yes\', \'No\'),'); INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES (3256,'Button Height','BEVEL_HEIGHT','4','Enter the height in pixels of the 3D button effect',333,144,NULL,'2005-01-06 20:24:30',NULL,''); INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES (3257,'Button Highlight Colour (HEX)','BEVEL_HIGHLIGHT','CCCCCC','Enter the colour (in hex) you wish the button\'s higlight colour to be',333,147,NULL,'2005-01-06 20:24:30',NULL,''); INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES (3258,'Button Shadow Colour (HEX)','BEVEL_SHADOW','000000','Enter the colour (in hex) you wish the button\'s shadow colour to be',333,150,NULL,'2005-01-06 20:24:30',NULL,''); INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES (3259,'Last Hash (System Use - Read Only)','LAST_HASH','','Stores the last hash value of the thumbnail configuration settings. This will allow the script to detect when they have changed and maintain the cache.',333,153,NULL,'2005-01-06 20:24:30',NULL,'tep_cfg_readonly('); Note: Please make sure that a fully working backup of your database exists before doing this step. This is very important Step #4 - Add files Copy the files contained in the zip archive to their respective directories on your server - Easy eh? Step #5 - In: catalog/admin/includes/functions/general.php Just before the ?> at the very end of this file add the following: function tep_cfg_readonly($value){ $single[]= array('id' => $value, 'text' => $value); return tep_draw_pull_down_menu('configuration_value', $single, $value); } function tep_cfg_pull_down_installed_fonts($font_name) { if ($root=@opendir(DIR_FS_DOCUMENT_ROOT.'includes/imagemagic/fonts')){ while ($file=readdir($root)){ if($file=="." || $file==".." || is_dir($dir."/".$file)) continue; $files[]= array('id' => $file, 'text' => $file); } } return tep_draw_pull_down_menu('configuration_value', $files, $font_name); } function tep_cfg_pull_down_installed_watermarks($watermark_name) { if ($root=@opendir(DIR_FS_DOCUMENT_ROOT.'includes/imagemagic/watermarks')){ while ($file=readdir($root)){ if($file=="." || $file==".." || is_dir($dir."/".$file)) continue; $files[]= array('id' => $file, 'text' => $file); } } return tep_draw_pull_down_menu('configuration_value', $files, $watermark_name); } function tep_cfg_pull_down_watermark_alignment($watermark_alignment) { $align[]= array('id' => 'Tiled', 'text' => 'Tiled'); $align[]= array('id' => 'Top', 'text' => 'Top'); $align[]= array('id' => 'Top Left', 'text' => 'Top Left'); $align[]= array('id' => 'Top Right', 'text' => 'Top Right'); $align[]= array('id' => 'Center', 'text' => 'Center'); $align[]= array('id' => 'Bottom', 'text' => 'Bottom'); $align[]= array('id' => 'Bottom Left', 'text' => 'Bottom Left'); $align[]= array('id' => 'Bottom Right', 'text' => 'Bottom Right'); return tep_draw_pull_down_menu('configuration_value', $align, $watermark_alignment); } Step #6 - In : /catalog/includes/functions/html_output.php replace the entire tep_image() function with // BOF Image Magic function tep_image($src, $alt = '', $width = '', $height = '', $params = '') { global $product_info; //Allow for a new intermediate sized thumbnail size to be set //without any changes having to be made to the product_info page itself. //(see the lengths I go to to make your life easier :-) if (strstr($_SERVER['PHP_SELF'],"product_info.php")) { if (isset($product_info['products_image']) && $src == DIR_WS_IMAGES . $product_info['products_image'] && $product_info[products_id]==$_GET['products_id']) { //final check just to make sure that we don't interfere with other contribs $width = PRODUCT_INFO_IMAGE_WIDTH == 0?'':PRODUCT_INFO_IMAGE_WIDTH; $height = PRODUCT_INFO_IMAGE_HEIGHT == 0?'':PRODUCT_INFO_IMAGE_HEIGHT; $product_info_image=true; $page="prod_info"; } } //Detect whether this is a pop-up image if (strstr($_SERVER['PHP_SELF'],"popup_image.php")) $page="popup"; //do we apply the IE PNG alpha transparency fix? if (strstr(strtolower($src),".png") && CFG_PNG_BUG=="True") $fix_png = true; //send the image for processing unless told otherwise $image = '<img src="' . $src . '"'; //set up the image tag just in case we don't want to process if (CFG_MASTER_SWITCH=="On") $calculate = true; else $calculate=false; // Don't calculate if the image is set to a "%" width if (strstr($width,'%') == true || strstr($height,'%') == true) $calculate = false; // Dont calculate if a pixel image is being passed (hope you dont have pixels for sale) if (strstr($image, 'pixel')) $calculate = false; $image_size = @getimagesize($src); // Decide whether or not we want to process this image if (($width == '' && $height == '' && $page != 'popup' ) || ($width == $image_size[0] && $height == $image_size[0] && $page != 'popup')) { if (CFG_PROCESS_GRAPHICS=="False") $calculate = false; //looks like this is a store graphic rather than product image } // Is this image good to go? if (CONFIG_CALCULATE_IMAGE_SIZE && $calculate) { if ($image_size) { $ratio = $image_size[1] / $image_size[0]; // Set the width and height to the proper ratio if (!$width && $height) { $ratio = $height / $image_size[1]; $width = intval($image_size[0] * $ratio); } elseif ($width && !$height) { $ratio = $width / $image_size[0]; $height = intval($image_size[1] * $ratio); } elseif (!$width && !$height && !$over_ride) { $width = $image_size[0]; $height = $image_size[1]; } //Encrypt the image filename if switched on if (CFG_ENCRYPT_FILENAMES == "True" && CFG_ENCRYPTION_KEY !="") { $result = ''; $key=CFG_ENCRYPTION_KEY; for($i=0; $i<strlen($src); $i++) { $char = substr($src, $i, 1); $keychar = substr($key, ($i % strlen($key))-1, 1); $char = chr(ord($char)+ord($keychar)); $result.=$char; } $src=urlencode(base64_encode($result)); } //Return the html $image = '<img src="imagemagic.php?img='.$src.'&w='. tep_output_string($width).'&h='.tep_output_string($height).'&page='.$page.'"'; } elseif (IMAGE_REQUIRED == 'false') { return false; } } //If the size asked for is greater than the image itself, we check the configs to see if this is allowed and if not over-ride if ($width > $image_size[0] || $height > $image_size[1]) { if (CFG_ALLOW_LARGER != 'True'){ $width=$image_size[0]; $height=$image_size[1]; $over_ride = true; } } // Add remaining image parameters if they exist if ($width) { $image .= ' width="' . tep_output_string($width) . '"'; } if ($height) { $image .= ' height="' . tep_output_string($height) . '"'; } if (tep_not_null($params)) $image .= ' ' . $params; $image .= ' border="0" alt="' . tep_output_string($alt) . '"'; if (tep_not_null($alt)) { $image .= ' title="' . tep_output_string($alt) . '"'; } if ($fix_png && CFG_MASTER_SWITCH=="On") { $image .= ' onload="fixPNG(this)"'; } $image .= '>'; return $image; } //EOF Image Magic Step #7 - Admin settings Note: Before you change the settings, write down the current values so you can restore them in case of an error! Go to the admin-section of your store (Configuration -> Images) and set: images width and height values to a value greater than zero calculate image sizes to true the width or height of the new image type - product information images Now go to the Configuration -> Image Magic and set the options in there as required: Note: Don't forget that with this contribution comes a new thumbnail size - The size of the image shown on your product information page - The setting for this is grouped with the rest of the image size configuration values in your admin panel in Configuration -> Images - You should go in there and set it, otherwise these images will display with the default width of 100. ** It is very important to note, that if you want your images to always display with the correct aspect ratio (height to width ratio) then you should only ever supply either a maximum height or a maximum width - NEVER both in the Configuration -> Images section of your admin panel. If you already have both set, then go in and change one of them to 0. That's It! If you found the install easy and the instructions comprehensive, good quality and easy to folllow, you might consider rewarding my efforts and supporting the osc Image Magic project by making a donation Now go try it out! Optional Steps Step #1 - Adding additional Truetype fonts and watermark imagesIf you want to add additional fonts which can be used in your text watermarks, these should be Truetype format and uploaded in binary mode to your server. The correct location to place your own Truetype fonts is: /catalog/includes/imagemagic/fonts/ You can also install custom graphics files to be added to your thumbnails as watermarks - The should be of type GIF, PNG or JPG and uploaded in binary mode to: /catalog/includes/imagemagic/watermarks/ Step #2 - Enabling the IE. PNG work-around If you want to use 24-bit PNG images with alpha channel transparency., unfortunately Internet Explorer contains a well documented bug that messes up the transparency of these type of images. Image Magic contains a work-around fix for this issue, which can be switched on or off from your control panel. Before switching this feature on, you need to add the following code to two different files: /catalog/includes/header.php - At the very end of the file ( after the final ?> ) /catalog/popup_image.php - Just before the </head> (not <head> - notice the forward slash) The snippet of code to add is: <!--[if gte IE 5.5000]> <script language="JavaScript"> var ie55up = true </script> <![endif]--> <script language="JavaScript"> function fixPNG(myImage) // correctly handle PNG transparency in Win IE 5.5 or higher. { if (window.ie55up) { var imgID = (myImage.id) ? "id='" + myImage.id + "' " : "" var imgClass = (myImage.className) ? "class='" + myImage.className + "' " : "" var imgTitle = (myImage.title) ? "title='" + myImage.title + "' " : "title='" + myImage.alt + "' " var imgStyle = "display:inline-block;" + myImage.style.cssText var strNewHTML = "<span " + imgID + imgClass + imgTitle strNewHTML += " style=\"" + "width:" + myImage.width + "px; height:" + myImage.height + "px;" + imgStyle + ";" strNewHTML += "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader" strNewHTML += "(src=\'" + myImage.src + "\', sizingMethod='scale');\"></span>" myImage.outerHTML = strNewHTML } } </script>
  14. Ok, have been through and think it maybe something to do with my html_output.php file, as I have the admin side OK, but when you click on the image it still says: http://jemcraftmemories.com/shop/images/cr...%20dividerd.jpg so is still pointing or grabbing from the /shop/images file instead of using imagemagic. I am posting my html_output.php file in the hopes that someone very kind and helpful would take a look for me to compare with theirs and let me know where I have gone wrong. Many thanks in advance Jemma <?php /* $Id: html_output.php,v 1.56 2003/07/09 01:15:48 hpdl Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2003 osCommerce Released under the GNU General Public License */ //// // The HTML href link wrapper function function tep_href_link($page = '', $parameters = '', $connection = 'NONSSL', $add_session_id = true, $search_engine_safe = true) { global $request_type, $session_started, $SID; if (!tep_not_null($page)) { die('</td></tr></table></td></tr></table><br><br><font color="#ff0000"><b>Error!</b></font><br><br><b>Unable to determine the page link!<br><br>'); } if ($connection == 'NONSSL') { $link = HTTP_SERVER . DIR_WS_HTTP_CATALOG; } elseif ($connection == 'SSL') { if (ENABLE_SSL == true) { $link = HTTPS_SERVER . DIR_WS_HTTPS_CATALOG; } else { $link = HTTP_SERVER . DIR_WS_HTTP_CATALOG; } } else { die('</td></tr></table></td></tr></table><br><br><font color="#ff0000"><b>Error!</b></font><br><br><b>Unable to determine connection method on a link!<br><br>Known methods: NONSSL SSL</b><br><br>'); } if (tep_not_null($parameters)) { $link .= $page . '?' . tep_output_string($parameters); $separator = '&'; } else { $link .= $page; $separator = '?'; } while ( (substr($link, -1) == '&') || (substr($link, -1) == '?') ) $link = substr($link, 0, -1); // Add the session ID when moving from different HTTP and HTTPS servers, or when SID is defined if ( ($add_session_id == true) && ($session_started == true) && (SESSION_FORCE_COOKIE_USE == 'False') ) { if (tep_not_null($SID)) { $_sid = $SID; } elseif ( ( ($request_type == 'NONSSL') && ($connection == 'SSL') && (ENABLE_SSL == true) ) || ( ($request_type == 'SSL') && ($connection == 'NONSSL') ) ) { if (HTTP_COOKIE_DOMAIN != HTTPS_COOKIE_DOMAIN) { $_sid = tep_session_name() . '=' . tep_session_id(); } } } if ( (SEARCH_ENGINE_FRIENDLY_URLS == 'true') && ($search_engine_safe == true) ) { while (strstr($link, '&&')) $link = str_replace('&&', '&', $link); $link = str_replace('?', '/', $link); $link = str_replace('&', '/', $link); $link = str_replace('=', '/', $link); $separator = '?'; } if (isset($_sid)) { $link .= $separator . $_sid; } return $link; } //// // The HTML image wrapper function // BOF Image Magic function tep_image($src, $alt = '', $width = '', $height = '', $params = '') { global $product_info; //Allow for a new intermediate sized thumbnail size to be set //without any changes having to be made to the product_info page itself. //(see the lengths I go to to make your life easier :-) if (strstr($_SERVER['PHP_SELF'],"product_info.php")) { if (isset($product_info['products_image']) && $src == DIR_WS_IMAGES . $product_info['products_image'] && $product_info[products_id]==$_GET['products_id']) { //final check just to make sure that we don't interfere with other contribs $width = PRODUCT_INFO_IMAGE_WIDTH == 0?'':PRODUCT_INFO_IMAGE_WIDTH; $height = PRODUCT_INFO_IMAGE_HEIGHT == 0?'':PRODUCT_INFO_IMAGE_HEIGHT; $product_info_image=true; $page="prod_info"; } } //Detect whether this is a pop-up image if (strstr($_SERVER['PHP_SELF'],"popup_image.php")) $page="popup"; //do we apply the IE PNG alpha transparency fix? if (strstr(strtolower($src),".png") && CFG_PNG_BUG=="True") $fix_png = true; //send the image for processing unless told otherwise $image = '<img src="' . $src . '"'; //set up the image tag just in case we don't want to process if (CFG_MASTER_SWITCH=="On") $calculate = true; else $calculate=false; // Don't calculate if the image is set to a "%" width if (strstr($width,'%') == true || strstr($height,'%') == true) $calculate = false; // Dont calculate if a pixel image is being passed (hope you dont have pixels for sale) if (strstr($image, 'pixel')) $calculate = false; $image_size = @getimagesize($src); // Decide whether or not we want to process this image if (($width == '' && $height == '' && $page != 'popup' ) || ($width == $image_size[0] && $height == $image_size[0] && $page != 'popup')) { if (CFG_PROCESS_GRAPHICS=="False") $calculate = false; //looks like this is a store graphic rather than product image } // Is this image good to go? if (CONFIG_CALCULATE_IMAGE_SIZE && $calculate) { if ($image_size) { $ratio = $image_size[1] / $image_size[0]; // Set the width and height to the proper ratio if (!$width && $height) { $ratio = $height / $image_size[1]; $width = intval($image_size[0] * $ratio); } elseif ($width && !$height) { $ratio = $width / $image_size[0]; $height = intval($image_size[1] * $ratio); } elseif (!$width && !$height && !$over_ride) { $width = $image_size[0]; $height = $image_size[1]; } //Encrypt the image filename if switched on if (CFG_ENCRYPT_FILENAMES == "True" && CFG_ENCRYPTION_KEY !="") { $result = ''; $key=CFG_ENCRYPTION_KEY; for($i=0; $i<strlen($src); $i++) { $char = substr($src, $i, 1); $keychar = substr($key, ($i % strlen($key))-1, 1); $char = chr(ord($char)+ord($keychar)); $result.=$char; } $src=urlencode(base64_encode($result)); } //Return the html $image = '<img src="imagemagic.php?img='.$src.'&w='. tep_output_string($width).'&h='.tep_output_string($height).'&page='.$page.'"'; } elseif (IMAGE_REQUIRED == 'false') { return false; } } //If the size asked for is greater than the image itself, we check the configs to see if this is allowed and if not over-ride if ($width > $image_size[0] || $height > $image_size[1]) { if (CFG_ALLOW_LARGER != 'True'){ $width=$image_size[0]; $height=$image_size[1]; $over_ride = true; } } // Add remaining image parameters if they exist if ($width) { $image .= ' width="' . tep_output_string($width) . '"'; } if ($height) { $image .= ' height="' . tep_output_string($height) . '"'; } if (tep_not_null($params)) $image .= ' ' . $params; $image .= ' border="0" alt="' . tep_output_string($alt) . '"'; if (tep_not_null($alt)) { $image .= ' title="' . tep_output_string($alt) . '"'; } if ($fix_png && CFG_MASTER_SWITCH=="On") { $image .= ' onload="fixPNG(this)"'; } $image .= '>'; return $image; } //EOF Image Magic //// // The HTML form submit button wrapper function // Outputs a button in the selected language function tep_image_submit($image, $alt = '', $parameters = '') { global $language; $image_submit = '<input type="image" src="' . tep_output_string(DIR_WS_LANGUAGES . $language . '/images/buttons/' . $image) . '" border="0" alt="' . tep_output_string($alt) . '"'; if (tep_not_null($alt)) $image_submit .= ' title=" ' . tep_output_string($alt) . ' "'; if (tep_not_null($parameters)) $image_submit .= ' ' . $parameters; $image_submit .= '>'; return $image_submit; } //// // Output a function button in the selected language function tep_image_button($image, $alt = '', $parameters = '') { global $language; return tep_image(DIR_WS_LANGUAGES . $language . '/images/buttons/' . $image, $alt, '', '', $parameters); } //// // Output a separator either through whitespace, or with an image function tep_draw_separator($image = 'pixel_black.gif', $width = '100%', $height = '1') { return tep_image(DIR_WS_IMAGES . $image, '', $width, $height); } //// // Output a form function tep_draw_form($name, $action, $method = 'post', $parameters = '') { $form = '<form name="' . tep_output_string($name) . '" action="' . tep_output_string($action) . '" method="' . tep_output_string($method) . '"'; if (tep_not_null($parameters)) $form .= ' ' . $parameters; $form .= '>'; return $form; } //// // Output a form input field function tep_draw_input_field($name, $value = '', $parameters = '', $type = 'text', $reinsert_value = true) { $field = '<input type="' . tep_output_string($type) . '" name="' . tep_output_string($name) . '"'; if ( (isset($GLOBALS[$name])) && ($reinsert_value == true) ) { $field .= ' value="' . tep_output_string(stripslashes($GLOBALS[$name])) . '"'; } elseif (tep_not_null($value)) { $field .= ' value="' . tep_output_string($value) . '"'; } if (tep_not_null($parameters)) $field .= ' ' . $parameters; $field .= '>'; return $field; } //// // Output a form password field function tep_draw_password_field($name, $value = '', $parameters = 'maxlength="40"') { return tep_draw_input_field($name, $value, $parameters, 'password', false); } //// // Output a selection field - alias function for tep_draw_checkbox_field() and tep_draw_radio_field() function tep_draw_selection_field($name, $type, $value = '', $checked = false, $parameters = '') { $selection = '<input type="' . tep_output_string($type) . '" name="' . tep_output_string($name) . '"'; if (tep_not_null($value)) $selection .= ' value="' . tep_output_string($value) . '"'; if ( ($checked == true) || ( isset($GLOBALS[$name]) && is_string($GLOBALS[$name]) && ( ($GLOBALS[$name] == 'on') || (isset($value) && (stripslashes($GLOBALS[$name]) == $value)) ) ) ) { $selection .= ' CHECKED'; } if (tep_not_null($parameters)) $selection .= ' ' . $parameters; $selection .= '>'; return $selection; } //// // Output a form checkbox field function tep_draw_checkbox_field($name, $value = '', $checked = false, $parameters = '') { return tep_draw_selection_field($name, 'checkbox', $value, $checked, $parameters); } //// // Output a form radio field function tep_draw_radio_field($name, $value = '', $checked = false, $parameters = '') { return tep_draw_selection_field($name, 'radio', $value, $checked, $parameters); } //// // Output a form textarea field function tep_draw_textarea_field($name, $wrap, $width, $height, $text = '', $parameters = '', $reinsert_value = true) { $field = '<textarea name="' . tep_output_string($name) . '" wrap="' . tep_output_string($wrap) . '" cols="' . tep_output_string($width) . '" rows="' . tep_output_string($height) . '"'; if (tep_not_null($parameters)) $field .= ' ' . $parameters; $field .= '>'; if ( (isset($GLOBALS[$name])) && ($reinsert_value == true) ) { $field .= stripslashes($GLOBALS[$name]); } elseif (tep_not_null($text)) { $field .= $text; } $field .= '</textarea>'; return $field; } //// // Output a form hidden field function tep_draw_hidden_field($name, $value = '', $parameters = '') { $field = '<input type="hidden" name="' . tep_output_string($name) . '"'; if (tep_not_null($value)) { $field .= ' value="' . tep_output_string($value) . '"'; } elseif (isset($GLOBALS[$name])) { $field .= ' value="' . tep_output_string(stripslashes($GLOBALS[$name])) . '"'; } if (tep_not_null($parameters)) $field .= ' ' . $parameters; $field .= '>'; return $field; } //// // Hide form elements function tep_hide_session_id() { global $session_started, $SID; if (($session_started == true) && tep_not_null($SID)) { return tep_draw_hidden_field(tep_session_name(), tep_session_id()); } } //// // Output a form pull down menu function tep_draw_pull_down_menu($name, $values, $default = '', $parameters = '', $required = false) { $field = '<select name="' . tep_output_string($name) . '"'; if (tep_not_null($parameters)) $field .= ' ' . $parameters; $field .= '>'; if (empty($default) && isset($GLOBALS[$name])) $default = stripslashes($GLOBALS[$name]); for ($i=0, $n=sizeof($values); $i<$n; $i++) { $field .= '<option value="' . tep_output_string($values[$i]['id']) . '"'; if ($default == $values[$i]['id']) { $field .= ' SELECTED'; } $field .= '>' . tep_output_string($values[$i]['text'], array('"' => '"', '\'' => ''', '<' => '<', '>' => '>')) . '</option>'; } $field .= '</select>'; if ($required == true) $field .= TEXT_FIELD_REQUIRED; return $field; } //// // Creates a pull-down list of countries function tep_get_country_list($name, $selected = '', $parameters = '') { $countries_array = array(array('id' => '', 'text' => PULL_DOWN_DEFAULT)); $countries = tep_get_countries(); for ($i=0, $n=sizeof($countries); $i<$n; $i++) { $countries_array[] = array('id' => $countries[$i]['countries_id'], 'text' => $countries[$i]['countries_name']); } return tep_draw_pull_down_menu($name, $countries_array, $selected, $parameters); } ?>
  15. OK no it doesn't I must have a glitch somewhere..... off to check thanks Jemma
×