Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Catalog images in flash


Jonoswan

Recommended Posts

Hey peoples,

 

Can you help me out with this?

 

I'm wanting to put flash files as the images for the catalogs and sub catalogs, but oscommerce (and php) doesn't call the swf files like gifs and jpgs do.

 

The code I'm trying to make work is below.

 

<?php // Get the right image for the top-right

   $image = DIR_WS_IMAGES . 'table_background_list.gif';

   if (isset($HTTP_GET_VARS['manufacturers_id'])) {

     $image = tep_db_query("select manufacturers_image from " . TABLE_MANUFACTURERS . " where manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "'");

     $image = tep_db_fetch_array($image);

     $image = $image['manufacturers_image'];

   } elseif ($current_category_id) {

     $image = tep_db_query("select categories_image from " . TABLE_CATEGORIES . " where categories_id = '" . (int)$current_category_id . "'");

     $image = tep_db_fetch_array($image);

     $image = $image['categories_image'];

   }

?>

</p>

<?php echo tep_image(DIR_WS_IMAGES . $image, HEADING_TITLE, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>



<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="325" height="422">

 <param name="movie" value="accessories.swf">

 <param name="quality" value="high">

 <embed src="accessories.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="325" height="422"></embed>

</object>

 

Thanks,

 

any help would be great I've been trying to work it out all week.

Link to comment
Share on other sites

Do you have accessories.swf in your root directory?

 

I used

<object data="TitleBar.swf" WIDTH="634" HEIGHT="82" NAME="TitleBar" ALIGN="RIGHT" TYPE="application/x-shockwave-flash" />

to display TitleBar.swf, which is stored in the same directory as index.php on that site.

 

Hth,

Matt

Link to comment
Share on other sites

Thanks for the better flash code, but what I'm trying to do is grab flash files that are saved when I put save them in the admin control panel.

 

This is then used in the column_left.php file which is linked (like a column box) to images.php.

 

This is images.php, with your code added

 

  <?php // Get the right image for the top-right

   $image = DIR_WS_IMAGES . 'table_background_list.gif';

   if (isset($HTTP_GET_VARS['manufacturers_id'])) {

     $image = tep_db_query("select manufacturers_image from " . TABLE_MANUFACTURERS . " where manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "'");

     $image = tep_db_fetch_array($image);

     $image = $image['manufacturers_image'];

   } elseif ($current_category_id) {

     $image = tep_db_query("select categories_image from " . TABLE_CATEGORIES . " where categories_id = '" . (int)$current_category_id . "'");

     $image = tep_db_fetch_array($image);

     $image = $image['categories_image'];

  }

?>

</p>

<?php echo tep_image(DIR_WS_IMAGES . $image, HEADING_TITLE, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>



<object data="$images" WIDTH="325" HEIGHT="422" NAME="TitleBar" ALIGN="LEFT" TYPE="application/x-shockwave-flash" />



</object>

 

Thanks again

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...