SWF (flash files) do not display anymore

Get help with installation and running phpBB 3.0.x here. Please do not post bug reports, feature requests, or MOD-related questions here.
Anti-Spam Guide
Forum rules
END OF SUPPORT: 1 January 2017 (announcement)
coolster
Registered User
Posts: 2
Joined: Thu Mar 05, 2009 10:55 pm

Re: SWF (flash files) do not display anymore

Post by coolster » Thu Mar 05, 2009 11:05 pm

im affected by this as well i tested flash 9 r 45 and up to the current flash 10 revision the last working flash revision was flash 9 r 124 it broke in flash 9 r 151

enbe
Registered User
Posts: 19
Joined: Thu Jan 10, 2008 10:02 pm
Contact:

Re: SWF (flash files) do not display anymore

Post by enbe » Mon Mar 23, 2009 3:04 pm

This bug is obviously now fixed and going to be eliminated in the next SVN of phpbb. ;)

http://www.phpbb.com/bugs/phpbb3/41315

Darcey
Registered User
Posts: 9
Joined: Fri Mar 07, 2008 12:52 am

Re: SWF (flash files) do not display anymore

Post by Darcey » Sun Mar 29, 2009 11:46 pm

Hi,

I recently just updated my phpbb3 to 3.04 -

Re-done all the modifications I stated above and all appears to be fine in:

IE 7 - 7.0.6001.18000
Chrome - 1.0.154
and FireFox - 3.0.8

EG:

http://www.allforthecode.co.uk/forum/vi ... f=83&t=290
and
http://www.allforthecode.co.uk/forum/vi ... f=83&t=280
etc

I never need to set chmod 777 for anything.

MeisterPetz
Registered User
Posts: 3
Joined: Wed Jun 03, 2009 4:09 pm

Re: SWF (flash files) do not display anymore

Post by MeisterPetz » Wed Jun 03, 2009 4:23 pm

Thank you, Darcey!

Your Workaround still works fine with:

phpBB 3.05 and swfobject 2.1

Of course, the hack with the htaccess is not the optimal solution if those files should be hidden. So I hope, the phpBB team will fix this issue soon.
Yes, and deleting the .htaccess - of course no chmod 777 is needed.

Please be aware that the .htaccess files are often not shown by providers. If you have the same problem, here's the workaround for the workaround:

Just create an empty text-file named:

_htaccess

Upload it to the "files" directory in your forum location and rename it to

.htaccess

Doing this on my webspace, the original .htaccess file is overwritten and the directory is free for access. If this files should not be seen by others, you should not do this. If you are using the workaround of Darcey, only the information pointing to the Adobe flash download will be shown. And of course your file itself, so the user can download it anyway.

coolster
Registered User
Posts: 2
Joined: Thu Mar 05, 2009 10:55 pm

Re: SWF (flash files) do not display anymore

Post by coolster » Sun Jun 07, 2009 10:03 am

i updated to 3.0.5 there still not working ... i wonder what the problem is ??

iftitaj
Registered User
Posts: 638
Joined: Tue Jan 15, 2008 6:21 am
Location: Karachi, Pakistan

Re: SWF (flash files) do not display anymore

Post by iftitaj » Sun Jun 07, 2009 2:58 pm

Guys, try this:
http://www.phpbb.com/community/viewtopi ... 5#p8489085

It is working for me .... tested on Flash 10 on Firefox 3.5 Beta 4

Its just a new BBCode you have to introduce on your board but remember it autoplays. :!:

shallowman
Registered User
Posts: 13
Joined: Thu Aug 07, 2008 7:16 pm

Re: SWF (flash files) do not display anymore

Post by shallowman » Tue Jun 23, 2009 10:34 pm

coolster wrote:i updated to 3.0.5 there still not working ... i wonder what the problem is ??
I also upgraded to 3.0.5 expecting the issue to be corrected and it isn't. I am still seeing the white box where the flash movie is supposed to play. When I right click on the box it still says "movie not loaded"!!! Can someone PLEASE tell us how to get this to work properly?

Thanks very much.

franfj
Registered User
Posts: 5
Joined: Sun Mar 22, 2009 1:27 pm

Re: SWF (flash files) do not display anymore

Post by franfj » Thu Jul 02, 2009 8:10 pm

Try this:

---- file.php -----

Code: Select all

/**
	* Commented out X-Sendfile support. To not expose the physical filename within the header if xsendfile is absent we need to look into methods of checking it's status.
	*
	* Try X-Sendfile since it is much more server friendly - only works if the path is *not* outside of the root path...
	* lighttpd has core support for it. An apache2 module is available at http://celebnamer.celebworld.ws/stuff/mod_xsendfile/
	*
	* Not really ideal, but should work fine...
	* <code>
	*	if (strpos($upload_dir, '/') !== 0 && strpos($upload_dir, '../') === false)
	*	{
	*		header('X-Sendfile: ' . $filename);
	*	}
	* </code>
	*/

	// Send out the Headers. Do not set Content-Disposition to inline please, it is a security measure for users using the Internet Explorer.
	$is_ie8 = (strpos(strtolower($user->system['browser']), 'msie 8.0') !== false);
	header('Content-Type: ' . $attachment['mimetype'] . (($is_ie8) ? '; authoritative=true;' : ''));

	if ($category == ATTACHMENT_CATEGORY_FLASH && request_var('view', 0) === 1)
	{
		// We use content-disposition: inline for flash files and view=1 to let it correctly play with flash player 10 - any other disposition will fail to play inline
		header('Content-Disposition: inline');
	}
	else if (empty($user->system['browser']) || (!$is_ie8 && (strpos(strtolower($user->system['browser']), 'msie') !== false)))
	{
		header('Content-Disposition: attachment; ' . header_filename(htmlspecialchars_decode($attachment['real_filename'])));
		if (empty($user->system['browser']) || (strpos(strtolower($user->system['browser']), 'msie 6.0') !== false))
		{
			header('expires: -1');
		}
	}
	else
	{
		header('Content-Disposition: ' . ((strpos($attachment['mimetype'], 'image') === 0) ? 'inline' : 'attachment') . '; ' . header_filename(htmlspecialchars_decode($attachment['real_filename'])));
		if ($is_ie8 && (strpos($attachment['mimetype'], 'image') !== 0))
		{
			header('X-Download-Options: noopen');
		}
	}

	if ($size)
	{
		header("Content-Length: $size");
	}
(you can find the code to replace searching the first part, the comment, and then replace the following lines until you find "
if ($size)
{
header("Content-Length: $size");
}
")

Then in attachments.html in your style:

Code: Select all

		<!-- ELSEIF _file.S_FLASH_FILE -->
			<object classid="clsid:D27CDB6E-AE6D-11CF-96B8-444553540000" codebase="http://active.macromedia.com/flash2/cabs/swflash.cab#version=5,0,0,0" width="{_file.WIDTH}" height="{_file.HEIGHT}">
				<param name="movie" value="{_file.U_VIEW_LINK}" />
				<param name="play" value="true" />
				<param name="loop" value="true" />
				<param name="quality" value="high" />
				<param name="allowScriptAccess" value="never" />
				<param name="allowNetworking" value="internal" />
				<embed src="{_file.U_VIEW_LINK}" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" width="{_file.WIDTH}" height="{_file.HEIGHT}" play="true" loop="true" quality="high" allowscriptaccess="never" allownetworking="internal"></embed>
			</object>
		<!-- ELSEIF _file.S_QUICKTIME_FILE -->
(as before you could find the text to replace searching the first line)

Then in includes/functions-content.php search:

Code: Select all

					$block_array += array(
						'S_FLASH_FILE'	=> true,
						'WIDTH'			=> $width,
						'HEIGHT'		=> $height,
					);
and replace by:

Code: Select all

					$block_array += array(
						'S_FLASH_FILE'	=> true,
						'WIDTH'			=> $width,
						'HEIGHT'		=> $height,
						'U_VIEW_LINK'	=> $download_link . '&view=1',
					);
That's all, this will make your flash attachments work, its obtained from svn.

Darcey
Registered User
Posts: 9
Joined: Fri Mar 07, 2008 12:52 am

Re: SWF (flash files) do not display anymore

Post by Darcey » Wed Aug 05, 2009 1:04 am

Update for flash 9.x and 10.x swf playback. - Dated 04/08/09 PHPBB version 3.0.4

After some tinkering got swf's to run again in IE (latest), FF (latest) and Chrome.

See page 1 of this post for the updates to the other files, then when it comes to the javascript and template/theme/style modifications resume with this.

1. Downloaded SWFObject 1.5
2. Uploaded swfobject.js to server
3. Updated template "Overallheader" to include the new js file
4. ftp chmod 777 on server folder "forum/files" (folder and all files within) - via FileZilla free ftp
5. Updated "attachment.html" -

Remove all data between:

Line: <!-- ELSEIF _file.S_FLASH_FILE -->

and the Line <!-- ELSEIF _file.S_QUICKTIME_FILE -->

Paste in:

Code: Select all

<div id="myId{_file.ID}">	
			<p><a href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /></a></p>
</div>

<script type="text/javascript">
	var so = new SWFObject("http://www.allforthecode.co.uk/forum/files/{_file.REAL_FILE_NAME}", "swfmyId{_file.ID}", "{_file.WIDTH}", "{_file.HEIGHT}", "9", "#FFFFFF");
	so.write("myId{_file.ID}");
</script>
This now plays swf's using swfobject from swf's compiled for 9.x and 10.

Flex 4.0 Gumbo SDK used for Away3D SWF Experiment 9.0.124 published

http://www.allforthecode.co.uk/forum/vi ... f=83&t=364
older version published swf
http://www.allforthecode.co.uk/forum/vi ... f=83&t=290

Kizzume
Registered User
Posts: 34
Joined: Sun Nov 11, 2007 3:10 am

Re: SWF (flash files) do not display anymore

Post by Kizzume » Thu Dec 31, 2009 12:21 pm

Is there a *simple* workaround for this, or do all of the workarounds require SO many steps?

Is this problem fixed in the latest update?

Locked

Return to “[3.0.x] Support Forum”