Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

how do i put a flash movie on my home page


magicspon

Recommended Posts

open index.php

search for the part that says:

// default page

after that the default page is build up.

you can remove things like:

<?php echo tep_customer_greeting(); ?>
<?php include(DIR_WS_MODULES . FILENAME_NEW_PRODUCTS); ?>
<?php  include(DIR_WS_MODULES . FILENAME_UPCOMING_PRODUCTS); ?>

and replace that with your code for the flash movie.

feel free to mess around with the tables as well

i.e. removing something like

<table border="0" width="100%" cellspacing="0" cellpadding="0">
	  <tr>
		<td class="main"><?php echo tep_customer_greeting(); ?></td>
	  </tr>
	  <tr>
		<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
	  </tr>
	  <tr>
		<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
	  </tr>
	  <tr>
		<td><?php include(DIR_WS_MODULES . FILENAME_NEW_PRODUCTS); ?></td>
	  </tr>
<?php  include(DIR_WS_MODULES . FILENAME_UPCOMING_PRODUCTS); ?>
	</table>

all together.

Link to comment
Share on other sites

I don't use sts so am not sure,

by default the column_left.php file takes care of this.

 

you can include your code there between

?>

and

<?php

code that you should put around your own (non php) code.

Link to comment
Share on other sites

to add to dave's question. how would you do it in the header? i have tried the following in the header.php file with no success. I understand I need to add code to recognize the .swf file but do not know how to do it.

 

<table border="0" width="100%" cellspacing="0" cellpadding="0">

<tr class="header">

<td align="left" valign="middle" bgcolor="#40590A"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image(DIR_WS_IMAGES . 'header.swf', 'Logo') . '</a>'; ?></td>

 

any help would be greatly appreciated :)

Link to comment
Share on other sites

I've tried and apply the

Flash Banners Contribution to my site because I want to use .swf files instead of the .gif in the header of my shop. The problem is that I'm new to all this and it didn't work. It's probably my fault, because the MOD says:

$name is for the movie id 
$movie is the flash file   ie : movie.swf
if no width or height are set the movie will be displayed as big as possible ( depending on browser ) .
if no background is set , will be a trasnparent background 
parameters must look like   :  'param1=value1&param2=valu2'  or 'param1='.$value1.'$param2=value2'  ..etc..

But as I'm bad with code and all that stuff I did it like this:

 

function mm_output_flash_movie($name, $movie, $width = '' , $height = '' , $background = '' , $parameters = '') {

if(tep_not_null($width)) {
	$movie_width = 'width="468"'.$width.'"';
}

if(tep_not_null($height)) {
	$movie_height = 'height="50"'.$height.'"';
}

if(tep_not_null($parameters)) {
  $flash_movie = $movie . '?' . $parameters;
} else {
  $flash_movie = $movie;
}

$flash  = '<object type="application/x-shockwave-flash" data="'.$movie.'" '.$movie_width . $movie_height.'>'."\n";
$flash .= '<param name="mynewbannername" value="'.$flash_movie.'" />' . "\n";

if(tep_not_null($background)) {
  $flash .= '<param name="bgcolor" value="#'.$background.'" />' . "\n";	
} else {
  $flash .= '<param name="wmode" value="transparent">' . "\n";
}

What did I do wrong? :(

 

Thank you in advance,

 

 

Huan Manwë

Link to comment
Share on other sites

All of this is actually going waaay over my head! ...lol...im mainly just a designer and have very little coding experience.

 

with what code specifically do i replace the gif images with if i want my flashpiece to show in the header.php file?

 

and where?

am i able to import the flash file itself (swf) into the corresponding table that i want it in?

or do i import the htm file exported from flash?

 

Am i supposed to modify the code before placing it into the table cell?

 

please help! cause doing it either way i listed above just gives me a blank spot where the flashpeice is supposed to be!

Link to comment
Share on other sites

I think the key is right here:

$name is for the movie id
$movie is the flash file   ie : movie.swf

But I don't know what to do with it.

 

I have a file called 'mybanner.swf' so I changed

	if(tep_not_null($parameters)) {
  $flash_movie = $movie . '?' . $parameters;
} else {
  $flash_movie = $movie;
}

for

	if(tep_not_null($parameters)) {
  $flash_movie = $movie . '?' . $parameters;
} else {
  $flash_movie = mybanner.swf;
}

 

Is it right? Should I do anything else?

Should I change this?

$name is for the movie id

and where I get a '$name' change it for a number? Or what?

 

 

Somebody help me, please :'(

Link to comment
Share on other sites

<object height="375" width="425"><param name="movie" value="header.swf">

<embed src="header.swf" height="375" width="425"></object>

 

Hi

 

Maybe I am missing the point here, but what if it was in real simple html.

as above,,, in the left_column.php ..obviously in the correct sizes,,, etc ??

 

The header could be be the same ..inside of the header.gif?

or am I being to simplitic? I have recently used this code in another website and it works fine,,

?

hope this helps

 

:)

Rusty

-------------------------------------------

Link to comment
Share on other sites

<object height="375" width="425"><param name="movie" value="header.swf">

<embed src="header.swf" height="375" width="425"></object>

 

Hi

 

Maybe I am missing the point here, but what if it was in real simple html.

as above,,, in the left_column.php ..obviously in the correct sizes,,, etc ??

 

The header could be be the same ..inside of the header.gif?

or am I being to simplitic? I have recently used this code in another website and it works fine,,

?

hope this helps

 

:)

 

Almost perfect this post, it did not work at first but I changed the

embed src="header.swf

 

to an url pointing to the swf file after this it worked. Also in Firefox :thumbsup:

Good Luck

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...