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)
enbe
Registered User
Posts: 19
Joined: Thu Jan 10, 2008 10:02 pm
Contact:

SWF (flash files) do not display anymore

Post by enbe » Sun Jan 04, 2009 12:21 am

Hello,

I got an annoying problem:

Somehow my flash .swf films will not load into my page anymore. This used to work flawlessly but somehow this changed a few weeks ago. I have searched google and this forum to no avail. I have set the user permissions and file permissions to display flash files.

Here an example of what is displayed on my site:
http://www.tutorials4flash.de/viewtopic ... 947dfe2329

Any help would be very much appreciated.

Thanks!

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 » Sun Jan 04, 2009 11:29 am

bump

User avatar
ric323
Former Team Member
Posts: 22909
Joined: Tue Feb 06, 2007 12:33 am
Location: Melbourne, Australia
Name: Ric
Contact:

Re: SWF (flash files) do not display anymore

Post by ric323 » Sun Jan 04, 2009 11:56 am

Well it is almost working.
You must have added a custom bbcode to get that, have you checked that it still contains the correct code?
I can see this HTML inyour web page where the SWF should be:

Code: Select all

<div class="content"><div class="inline-attachment">            <object classid="clsid:D27CDB6E-AE6D-11CF-96B8-444553540000" codebase="http://active.macromedia.com/flash2/cabs/swflash.cab#version=5,0,0,0" width="820" height="575">
                <param name="movie" value="./download/file.php?id=138&sid=baaea556a2e9e0242edc3940f91df5de" />
                <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="./download/file.php?id=138&sid=baaea556a2e9e0242edc3940f91df5de" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" width="820" height="575" play="true" loop="true" quality="high" allowscriptaccess="never" allownetworking="internal"></embed>
            </object>
                    <p>
                        <a href="./download/file.php?id=138&sid=baaea556a2e9e0242edc3940f91df5de">interimsite2.swf</a> [ 28.69 KiB | 3-mal betrachtet ]</p>
        </div></div> 
Edit: Was it working for files attached to the same message before, or only to files stored elsewhere?
The Knowledge Base contains solutions to many common problems!
How to fix "Doesn't have a default value" and "Incorrect string value: xxx for column 'post_text' " errors.
How to do a clean re-install of the latest phpBB3 version.
Problems with permissions? Read phpBB3 Permissions

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 » Sun Jan 04, 2009 4:01 pm

I have checked the bbcode. There is no custom bbcode that has been added by myself or others. As I said before it worked with no problems and as you can see you can still download the swf files to your computer and they open just fine. Maybe it is a permission problem? If you can look into this I would be happy to change the language of my board to english and give you the admin login to look into this problem, as this is pretty important for my site, because it is about flash tutorials, so I need to be able to display swf files...

Edit: Yes, it was working for files on the same message before. Somehow it seems to aknowledge the size of the flash movie etc. correctly but then it is unable to load the movie, when displaying the swf in the forum.
Last edited by enbe on Sun Jan 04, 2009 7:19 pm, edited 2 times in total.

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 Jan 04, 2009 4:50 pm

If you can work out how to get the incremental count of the attachment eg 1 to n
or the file id that is after the .php?

I should be able to patch in swfobject for swf display.

Which should be as simple as upload the js file, include in the overallheader.html

and in the attachment.html the code would be:

Code: Select all

<div id="htmldiv{_file.ID}">
If your reading this you need to enable javascript to view {NUMBER}
</div>

<script type="text/javascript">
   var so = new SWFObject("{_file.DOWNLOAD_NAME}", "mymovie", "{_file.WIDTH}", "{_file.HEIGHT}", "9", "#336699");
   so.write("htmldiv{_file.ID}");
</script>



but I cannot find a way of accessing the file ID or find a list of the commands for _FILE.

Any idea?

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 Jan 04, 2009 6:37 pm

I managed to obtain the file id from the sql table by editing "functions_content.php", but it appears swf files still wont display via file.php

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 Jan 04, 2009 7:06 pm

Hi, managed to get it working!


1. Download SWFOBJECT 2.0 from
http://code.google.com/p/swfobject/


2. Modify file located in the includes folder called "functions_content.php"

Insert under line 846

Code: Select all

			'ID'			=> $attachment['attach_id'],
			'REAL_FILE_NAME'			=> $attachment['physical_filename'],
			'FILE_TYPE'			=> $attachment['extension'],
Mine now reads:

Code: Select all

		$block_array += array(
			'UPLOAD_ICON'		=> $upload_icon,
			'FILESIZE'			=> $filesize,
			'SIZE_LANG'			=> $size_lang,
			'DOWNLOAD_NAME'		=> basename($attachment['real_filename']),
			'COMMENT'			=> $comment,
			'ID'			=> $attachment['attach_id'],
			'REAL_FILE_NAME'			=> $attachment['physical_filename'],
			'FILE_TYPE'			=> $attachment['extension'],
		);

and upload your newly edited file

You will then have access to:
{_file.ID}
{_file.REAL_FILE_NAME}
{_file.FILE_TYPE}

via the TEMPLATE EDITOR.




4. Upload the swfobject.js to the folder of your choice


5. Via phpbb3s admin panel - template editor add the following code to overall_healer.html

Place your path to where you have uploaded the swfobject.js in place of the link i used as example below.

Code: Select all

<script src="http://www.yourwebdomain.co.uk/forum/includes/swfobject.js" type="text/javascript"></script>


6. Edit the Attachment.HTML template via the phpbb3 templates editor.

You will need to alter the code for the location of your domains forum/files.. eg mine is
http://www.yourdomain.co.uk/forum/files/

Its in 2 places in the below code

Delete the code you have for existing swfs and replace with:

Code: Select all

<script type="text/javascript">
swfobject.registerObject("myId{_file.ID}", "9.0.0", "expressInstall.swf");
</script>

<div>	
	<object id="myId{_file.ID}" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="{_file.WIDTH}" height="{_file.HEIGHT}">
		<param name="movie" value="http://www.yourdomain.co.uk/forum/files/{_file.REAL_FILE_NAME}" />
    		<!--[if !IE]>-->
		<object type="application/x-shockwave-flash" data="http://www. yourdomain.co.uk/forum/files/{_file.REAL_FILE_NAME}" width="{_file.WIDTH}" height="{_file.HEIGHT}">
		<!--<![endif]-->
		<div>
			<h1>Alternative content</h1>
			<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>
		<!--[if !IE]>-->
		</object>
		<!--<![endif]-->
	</object>
</div>




and finally
7. Located the file .htaccess in your forums files folder and rename it to something different allow web access to the files within so you don't have to use files.php anymore.




Here is a preview of it working:

Note click and drag mouse to see swf's in action.

http://www.allforthecode.co.uk/forum/vi ... f=83&t=284



D

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 » Sun Jan 04, 2009 7:27 pm

Great! Will try this right now. When I am finished I will tell you guys if it works. Thanks ;)

Update: Tried it and works perfectly - thanks a lot! I still do not know why swf did not work anymore. Maybe the pbhpb project should implement this great solution into the software as swfobject also is the standard of displaying flash content in websites nowadays...

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 » Wed Jan 07, 2009 9:28 pm

Ok, unfortunately it does not work now that I have added a new post to the forum.

http://tutorials4flash.de/viewtopic.php ... 79a6df0e3c

It still works with the download though. I am not sure why it works with the old uploads and not the new ones...

Update: I changed the permissions for the "files" folder to 777 and now it works. Is there a possibility to automatically set the permission so the files display without me having to update the chmod permissions?

ekamei
Registered User
Posts: 31
Joined: Tue Jan 13, 2009 2:59 pm

Re: SWF (flash files) do not display anymore

Post by ekamei » Fri Jan 16, 2009 4:52 am

I wonders about this issue myself, anyone have an idea?

User avatar
ric323
Former Team Member
Posts: 22909
Joined: Tue Feb 06, 2007 12:33 am
Location: Melbourne, Australia
Name: Ric
Contact:

Re: SWF (flash files) do not display anymore

Post by ric323 » Fri Jan 16, 2009 4:56 am

You should only have to set the permissions on the files folder to 777 once, and it should work fine after that.
The Knowledge Base contains solutions to many common problems!
How to fix "Doesn't have a default value" and "Incorrect string value: xxx for column 'post_text' " errors.
How to do a clean re-install of the latest phpBB3 version.
Problems with permissions? Read phpBB3 Permissions

ekamei
Registered User
Posts: 31
Joined: Tue Jan 13, 2009 2:59 pm

Re: SWF (flash files) do not display anymore

Post by ekamei » Fri Jan 16, 2009 1:09 pm

777 should not be required... and I did have it set, I see that it have the height and width properly, and it works fine in FF1.5 and IE7, I notices that it does not work in chrome and FF 3. though.

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 » Fri Jan 16, 2009 4:05 pm

Yes, I had 777 set to the folder as well. But this does not work. I only tested Safari and Firefox 3 so I can't say if it works on IE.

I find it strange that flash used to work on the board before, without the need to use this solution from Darcey to implement swfobject and would very much like the phpbb team to include the flash functionality working again in one of the next updates if this is possible.

If someone can work out a fix to this problem with the files having to have a chmod to 777 before working, please help us out.

Thanks ;)

ekamei
Registered User
Posts: 31
Joined: Tue Jan 13, 2009 2:59 pm

Re: SWF (flash files) do not display anymore

Post by ekamei » Fri Jan 16, 2009 6:33 pm

I begin to think this is a FF3.0 Safari and Chorme issue. Try ff1.5.

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 » Fri Jan 16, 2009 9:21 pm

Ok, good to know, but I can't really tell that the people using the site ;)

Locked

Return to “[3.0.x] Support Forum”

Who is online

Users browsing this forum: Google [Bot] and 60 guests