I have it working
MaryAnn <[email protected]> 24 Aug 2003 16:07:01 -0000
| Newsgroups | gmane.comp.web.oscommerce.tips |
|---|---|
| Message-ID | <0ac933790142effc7b0ef851bbd5cb86@osCommerce-Forums> |
This message was sent from: Tips and Tricks http://forums.oscommerce.com/viewtopic.php?p=218849#218849 ---------------------------------------------------------------- [quote="[email protected]"]i got error with this code. none of them are working with MS1 anyone tried this code?[/quote] I have this working fine. Here is the code I am using. Just look for the following lines in catalog/includes/functions/html_output and place the lines that Zebra001 added and double check your } to make sure it looks like all the code below. Backup this file first before you touch it. // The HTML image wrapper function function tep_image($src, $alt = '', $width = '', $height = '', $parameters = '') { if ( (($src == '') || ($src == DIR_WS_IMAGES)) && (IMAGE_REQUIRED == 'false') ) { return false; } // Zebra001 added $borderforimage = 'false'; if (($width == SMALL_IMAGE_WIDTH) && ($height == SMALL_IMAGE_HEIGHT)) $borderforimage = 'true'; //end Zebra001 added // alt is added to the img tag even if it is null to prevent browsers from outputting // the image filename as default $image = '<img src="' . $src . '" border="0" alt="' . htmlspecialchars($alt) . '"'; if (tep_not_null($alt)) { $image .= ' title=" ' . htmlspecialchars($alt) . ' "'; // Zebra001 added if ($borderforimage == 'true') $image .= ' class=fotgal '; // end Zebra001 added } Add the following to the bottom of catalog/stylesheet.css I added the visited but you can omit that if you like and you can change the colors to the colors of your choice. .fotgal {border:4px; border-thickness: 4px; border-color: #8080FF; border-style: solid; } A:hover .fotgal {border:4px; border-thickness: 4px; border-color: #FFC0C0; border-style: solid; } A:active .fotgal {border:4px; border-thickness: 4px; border-color: #E3E4FF; border-style: solid; } A:visited .fotgal {border:4px; border-thickness: 4px; border-color: #C0C0FF; border-style: solid; } Have a great day. Mary :D