osjunkie Posted April 2, 2005 Share Posted April 2, 2005 Hi, My seperator seems not to be working. All I get drawn is 1 pixel and the width seems not to work. html_output.php //// // 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); } In the page it is as... <td width="100%"><?php echo tep_draw_separator('pixel_black.gif', '100%', '1'); ?></td> Any reason why I just a dot and not a line? Link to comment Share on other sites More sharing options...
boxtel Posted April 2, 2005 Share Posted April 2, 2005 Hi, My seperator seems not to be working. All I get drawn is 1 pixel and the width seems not to work. html_output.php //// // 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); ? } In the page it is as... <td width="100%"><?php echo tep_draw_separator('pixel_black.gif', '100%', '1'); ?></td> Any reason why I just a dot and not a line? <{POST_SNAPBACK}> try putting a <br> behind it: <td width="100%"><?php echo tep_draw_separator('pixel_black.gif', '100%', '1'); ?><br></td> Treasurer MFC Link to comment Share on other sites More sharing options...
osjunkie Posted April 2, 2005 Author Share Posted April 2, 2005 try putting a <br> behind it:<td width="100%"><?php echo tep_draw_separator('pixel_black.gif', '100%', '1'); ?><br></td> <{POST_SNAPBACK}> I found the reason why. Thanks for the reply! It was Image Magic was resizing the pictures to proper proportions and wasn't allowing the line to be drawn. I ended up making a new tep_image_seperator function from the stock tep_image code that is modified by the image resize contribution and it works perfectly. Thanks, Brad Link to comment Share on other sites More sharing options...
killerwhale65 Posted January 22, 2006 Share Posted January 22, 2006 I found the reason why. Thanks for the reply! It was Image Magic was resizing the pictures to proper proportions and wasn't allowing the line to be drawn. I ended up making a new tep_image_seperator function from the stock tep_image code that is modified by the image resize contribution and it works perfectly. Thanks, Brad can you post your new code? i have the same problem! thanks! Matthias Thoen my contribution: Photo Gallery for osCommerce --check my homepage in my CARD-- Link to comment Share on other sites More sharing options...
frenchflies Posted August 28, 2006 Share Posted August 28, 2006 I wanna know too... !!! Link to comment Share on other sites More sharing options...
psynaptic Posted October 23, 2006 Share Posted October 23, 2006 I wanna know too... !!! For those who still need an answer to this I found a solution on this forum. It seems that image magic was indead messing with the tep_draw_separator function. The solution, as mentioned above, is to clone the function as follows: catalog/includes/functions/html_output.php find: //// // 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); } replace with: ////tep_draw_seperator fix start // The HTML image wrapper function mk2 added to get around the constrain image proportion mod function tep_image2($src, $alt = '', $width = '', $height = '', $parameters = '') { if ( (($src == '') || ($src == DIR_WS_IMAGES)) && (IMAGE_REQUIRED == 'false') ) { return false; } // alt is added to the img tag even if it is null to prevent browsers from outputting // the image filename as default $image2 = '<img src="' . tep_parse_input_field_data($src, array('"' => '"')) . '" border="0" alt="' . tep_parse_input_field_data($alt, array('"' => '"')) . '"'; if (tep_not_null($alt)) { $image2 .= ' title=" ' . tep_parse_input_field_data($alt, array('"' => '"')) . ' "'; } if ( (CONFIG_CALCULATE_IMAGE_SIZE == 'true') && ((!$width) || (!$height)) ) { if ($image_size = @getimagesize($src)) { if ( (!$width) && ($height) ) { $ratio = $height / $image_size[1]; $width = $image_size[0] * $ratio; } elseif ( ($width) && (!$height) ) { $ratio = $width / $image_size[0]; $height = $image_size[1] * $ratio; } elseif ( (!$width) && (!$height) ) { $width = $image_size[0]; $height = $image_size[1]; } } elseif (IMAGE_REQUIRED == 'false') { return false; } } if ( ($width) && ($height) ) { $image2 .= ' width="' . tep_parse_input_field_data($width, array('"' => '"')) . '" height="' . tep_parse_input_field_data($height, array('"' => '"')) . '"'; } if (tep_not_null($parameters)) $image .= ' ' . $parameters; $image2 .= '>'; return $image2; } //// // Output a separator either through whitespace, or with an image function tep_draw_separator($image2 = 'pixel_black.gif', $width = '100%', $height = '1') { return tep_image2(DIR_WS_IMAGES . $image2, '', $width, $height); } //tep_draw_seperator fix end I tried it and it works perfectly with image magic installed. All credit and many thanks to tobz for finding this fix. I love this place! Psy My Profile | Contribs I like most: 'On The Fly' Auto Thumbnailer, Active Countries, Header Tags Controller, Ultimate SEO URLs, UK Based osC, UK Postcode Validation, Open Featured Sets, UK Postcode Based Carrier Shipping Link to comment Share on other sites More sharing options...
cjwood555 Posted May 19, 2010 Share Posted May 19, 2010 For those who still need an answer to this I found a solution on this forum. ... Just wanted to say thanks for the fix - mine was broken by the 'additional images' contribution. :) Chris Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.