Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

Flash images


Recommended Posts

I tried to change the html_output function page to allow Flash .swf files to be displayed as written



I notice that this seems to have been written back at version

I am using 2.2 MS2.

I get these errors.


Parse error: parse error in /home/syndica/public_html/jeremy/WEB/catalog/includes/functions/html_output.php on line 74


Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /home/syndica/public_html/jeremy/WEB/catalog/includes/functions/html_output.php:74) in /home/syndica/public_html/jeremy/WEB/catalog/includes/functions/sessions.php on line 67


Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/syndica/public_html/jeremy/WEB/catalog/includes/functions/html_output.php:74) in /home/syndica/public_html/jeremy/WEB/catalog/includes/functions/sessions.php on line 67


Fatal error: Call to undefined function: tep_image() in /home/syndica/public_html/jeremy/WEB/catalog/includes/header.php on line 57



The basic idea of the code seems to be if the file has the .swf extension then embed as a flash file. It does not seem to proper Flash you need the object AND embed tags like this:

(I'm not sure how the height and width parameters should be handled as they would change depending where the image is used.)


<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"


WIDTH="100" HEIGHT="100" id="movie1" ALIGN="">

<PARAM NAME=movie VALUE="myFlash.swf"> <PARAM NAME=quality VALUE=high> <PARAM NAME=bgcolor VALUE=#FFFFFF> <EMBED src="myFlash.swf" quality=high bgcolor=#FFFFFF WIDTH="100" HEIGHT="100" NAME="movie1" ALIGN=""

TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"></EMBED>




If anyone has nailed this mod I would really like to know.

This has to be done for the admin html_output.php page as well.

I can go through my site and manually insert the flash code around the existing code

on a page by page basis - but this is tedious. (this also confines me to .swf - I want to be able to use gifs and jpgs too)

I don't know PHP well enough to know what I'm doing yet.

Maybe someone sells this mod for a price if it is not freely available?

Maybe there are complexities in the code that would not allow such a global procedure?

Any help appreciated!


Link to comment
Share on other sites

Thanks for the contribution.

I followed the instructions on a clean install of MS2.(no other contribs yet)

I tried the admin version of the mod (for the html_output page in admin) and it gave the same errors.

Any idea why it doesn't work for me?

Should I be worried about the version of PHP running on my server

not supporting this new code?


Link to comment
Share on other sites

99% of the time this:

Warning: session_start(): Cannot send session cookie - headers already sent by
mean that you have an extra line after the last ?> at the bottom of the file, in this case html_output.php or sessions.php



Link to comment
Share on other sites

Thanks for that tip, I checked for extra line after last ?> and fixed, but still get errors.

When I installed I selected to save session info in the database as I am on shared hosting.

I wonder if this could be causing the session_start() errors?

(the store worked fine before - so maybe this is not an issue)


Link to comment
Share on other sites

Thanks for the absolute vs relative url suggestion, but I don't think it's the problem because the file is not directly called in this code - just the object that represents the images is called. I just put up the Flash embed code from Macromedia because I thought this contribution should somehow include the object tag with the activex classid code in addition to the existing '<embed src="' for Mac/Windows compatibility, but this doesn't really have anything to do with the problem (i don't think:) of the session_start() warnings and the fatal error (posted above) where tep_image() is said to be defined (though presumably it already was - name didn't change)


I used the code that Chris posted here.

It's a two page post. I tried replacing just the html image wrapper part as in the first part of the post. Right below that is a version for the admin. I tried that also. (neither worked) Then I tried

the entire page version at the end of the post (pg2) which I figured would eliminate any possible

errors I might be introducing. That didn't work either. Maybe you could try that full page version

and see if it works for you.


The PHP version on my shared hosting is 4.2.3 if that can be of any help.


I could just "manually" insert the Flash code into individual pages which I have done with success, but the solution that Chris has offered is much more efficient. The best part is the logic which allows the use of gifs and Flash and gets it all done in one place. (html_output.php) Just wish I could get it to work:-)




Link to comment
Share on other sites


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

  • Create New...