Help! Trying to add flash movie to top of blog

Random stuff about serendipity. Discussion, Questions, Paraphernalia.
Post Reply
lkelly
Regular
Posts: 13
Joined: Fri Jul 15, 2005 1:58 am

Help! Trying to add flash movie to top of blog

Post by lkelly »

I'm trying to add a flash movie to the top of my blog index.php page, and doing so is causing problems with loading headers and producing error messages. This especially happens if I use the comments form and hit submit.

Does anyone have a simple example of how to add a flash item to the top of the blog index.php page without causing these errors?

Thanks in advance.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Help! Trying to add flash movie to top of blog

Post by garvinhicking »

Could you tell us the error messages? Without I'm really clueless.

How did you add the code, and which code did you add where?

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
lkelly
Regular
Posts: 13
Joined: Fri Jul 15, 2005 1:58 am

Post by lkelly »

Sure. I've tried a few different methods, some of which are probably equivalent.

1. Do an echo(' ') in the php code right before the line ob_start() in index.php. The contents of the echo statement are exactly what I pulled out of Dreamweaver, beginning with a <div> and then <object...> with the flash movie info and paramenters.

2. Another method was to put the flash movie info used above in a separate .html file and use an include(' ') php statement at the same point in the index.php. Right before ob_start().

What follows is the code I'm trying to use to add the flash (option 1 listed here):

Code: Select all

echo('<div align="left">
    <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="700" height="80">
      <param name="movie" value="http://myurl.com/flash/Menu.swf">
      <param name="quality" value="high">
      <embed src="http://myurl.com/flash/Menu.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="700" height="80"></embed>
    </object>
  </div>');
The errors I get consist of:

Code: Select all

Warning: Cannot modify header information - headers already sent by (output started at <location edited>index.php:33) in <location edited>/blog/include/functions_config.inc.php on line 243


Warning: Cannot modify header information - headers already sent by (output started at <location edited>/blog/index.php:33) in <location edited>/blog/index.php on line 158
I get the first error from line 243 4 times, and the last error once. I have changed the error detail slightly by truncating out all the direct path info and just using <location edited>.

I assume this may have something to do with the header information from perhaps the macromedia page?

If someone has a more elegant way to add a flash movie to the top of a blog index.php page, I'll be more than happy to use it. For some reason adding it after the ob_start() function results in the flash showing up at the bottom of the page.

Thanks.
kitten
Regular
Posts: 9
Joined: Mon Jul 18, 2005 1:16 pm

Post by kitten »

Try to put your code after ob_start(), this should help :)
lkelly
Regular
Posts: 13
Joined: Fri Jul 15, 2005 1:58 am

Post by lkelly »

For some reason that causes the flash content to be displayed after all the blog stuff on the page layout. Any ideas?

That does seem to help with the header error messages.
kitten
Regular
Posts: 9
Joined: Mon Jul 18, 2005 1:16 pm

Post by kitten »

Perhaps you could try to put the code in the template index.tpl? This should work...
Post Reply