Guest Posted January 23, 2004 Share Posted January 23, 2004 Is there a way to allow oscommerce to recognize .swf files in place of a standard image? Thanks, B1TZM@ST3R Link to comment Share on other sites More sharing options...
241 Posted January 23, 2004 Share Posted January 23, 2004 yes instead of the extension .gif or .jpg use .swf No longer giving free advice. Please place deposit in meter slot provided. Individual: [=] SME: [==] Corporation: [===] If deposit does not fit one of the slots provided then you are asking too much! Is your Osc dated try Phoenix raising oscommerce from the ashes. Link to comment Share on other sites More sharing options...
Guest Posted January 23, 2004 Share Posted January 23, 2004 I tried uploading an .swf file through the admin panel as an image and it did not work. Do I need to modify any code to make it work? Link to comment Share on other sites More sharing options...
241 Posted January 23, 2004 Share Posted January 23, 2004 If you use an ftp program you should not have a problem No longer giving free advice. Please place deposit in meter slot provided. Individual: [=] SME: [==] Corporation: [===] If deposit does not fit one of the slots provided then you are asking too much! Is your Osc dated try Phoenix raising oscommerce from the ashes. Link to comment Share on other sites More sharing options...
♥ecartz Posted January 24, 2004 Share Posted January 24, 2004 I am fairly certain that browsers can not use swf files in <image> tags. The code that Macromedia suggests involves using <object> and <embedded> tags. The effect is to tell the browser what plugin to use and to download the plugin if not currently installed. The code to do this has been posted in the forums (i.e. I've seen it), but I don't know where. The simplest way to use it is to replace the whole echo tep_image with the flash code. Hth, Matt Always back up before making changes. Link to comment Share on other sites More sharing options...
Guest Posted January 25, 2004 Share Posted January 25, 2004 Thank you Matt, I think I can make that modification work! I work in Flash 90% of the time and I wanted my product images to have 3D rotation. I will modify all the image tags and simply use still .swf's when I don't want animation. Thank you! Link to comment Share on other sites More sharing options...
blueline Posted January 25, 2004 Share Posted January 25, 2004 You can always just add a new parameter to the tep_image function at the end....say something like this: //// // 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; } That's it. Upload the image or swf file as usual, and if it's a flash file it will be embedded properly. If it's a picture, it will be called properly. HTH, -Chris Chris Sullivan Link to comment Share on other sites More sharing options...
blueline Posted January 25, 2004 Share Posted January 25, 2004 Sorry...small type and for some reason I can't edit it to fix it. Follow the link here for the correct code: Tips & Tricks Article -Chris Chris Sullivan Link to comment Share on other sites More sharing options...
Guest Posted January 25, 2004 Share Posted January 25, 2004 You Rock!! :D Any Idea how to perfrom product comparisons?? Link to comment Share on other sites More sharing options...
blueline Posted January 26, 2004 Share Posted January 26, 2004 As in selecting a group of like products and comparing their features? If this is what you mean then the best way to do it is to manipulate the database and add seperate tables for each type of feature. This way you can directly compare and contrast actual features, where as you can't do this if they are mentioned in a big block of text. If you know what you're doing.....it's pretty simple. -Chris Chris Sullivan Link to comment Share on other sites More sharing options...
Guest Posted January 27, 2004 Share Posted January 27, 2004 That is EXACTLY what I mean... And no...I don't know what I'm doing! :blink: I can tell you we have broken all the information down into seperate feilds, but not tables. To keep it simple, I was thinking something along the lines of a split framed page with multiple seperate dynamic drop down menus. When a selection is made, the frame fills in with the selected product...? Take a look at www.shopping.com to see how we want it to function. Any advice you can offer is GREATLY appreciated. Link to comment Share on other sites More sharing options...
blueline Posted January 27, 2004 Share Posted January 27, 2004 Hey. Maybe it's just me....but I can't seem to get the compare tool to actually work on the shopping.com site. -Chris Chris Sullivan Link to comment Share on other sites More sharing options...
Guest Posted January 27, 2004 Share Posted January 27, 2004 use this link to see all the available pda's http://www1.shopping.com/xPP-PDAs pick the first two...then hit the compare products button to see them both at the same time. I'm guessing they are using oracle? Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.