johnnyosc Posted February 17, 2004 Share Posted February 17, 2004 Hello Guys I was wonder how you can add a flash file in the product_info.php using the admin wyswyg editor?? I try this code but it didnt work. Any ideas?? //// // The HTML image wrapper function function tep_image($src, $alt = '', $width = '', $height = '', $parameters = '', $swf = 'no') { if ( (empty($src) || ($src == DIR_WS_IMAGES)) && (IMAGE_REQUIRED == 'false') ) { return false; } $extension = substr($src, -4); if ($extension == '.swf') $swf = 'yes'; // alt is added to the img tag even if it is null to prevent browsers from outputting // the image filename as default if ($swf == 'no') { $image = '<img src="' . tep_output_string($src) . '" border="0" alt="' . tep_output_string($alt) . '"'; } else { $image = '<embed src="' . tep_output_string($src) . '"'; } if ((tep_not_null($alt)) && ($swf == 'no')) { $image .= ' title=" ' . tep_output_string($alt) . ' "'; } if (((CONFIG_CALCULATE_IMAGE_SIZE == 'true') && (empty($width) || empty($height))) && ($swf=='no')) { if ($image_size = @getimagesize($src)) { if (empty($width) && tep_not_null($height)) { $ratio = $height / $image_size[1]; $width = $image_size[0] * $ratio; } elseif (tep_not_null($width) && empty($height)) { $ratio = $width / $image_size[0]; $height = $image_size[1] * $ratio; } elseif (empty($width) && empty($height)) { $width = $image_size[0]; $height = $image_size[1]; } } elseif (IMAGE_REQUIRED == 'false') { return false; } } if (tep_not_null($width) && tep_not_null($height)) { $image .= ' width="' . tep_output_string($width) . '" height="' . tep_output_string($height) . '"'; } if ((tep_not_null($parameters)) && ($swf =='no')) $image .= ' ' . $parameters; $image .= '>'; return $image; } Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.