SWF File uploaded through WSYIWYG Media Icon not Displaying

16 posts by 3 authors in: Forums > CMS Builder
Last Post: September 23, 2009   (RSS)

By Dave - September 18, 2009

Thanks,

It looks like all the lines were getting merged together onto one line. That will break it. I've attached a fixed version.

Hope that helps!
Dave Edis - Senior Developer
interactivetools.com
Attachments:

internships3.php 27K

Re: [Dave] SWF File uploaded through WSYIWYG Media Icon not Displaying

By Keltam2 - September 21, 2009

Hmm?

http://www.publicmedianet.org/internships3.php

Do I need to pre-set any variables? Do I need to make a custom Uploads field? I added the <?php echo fixFlashObjects( $record['content'] ); ?> but it looks like its still taking the 100x100 default size from the intial upload.

By Dave - September 21, 2009

Oh sorry, I just added the function to the top.

Add the code in red around any variables you want to have the flash objects replaced in:

<?php echo fixFlashObjects($record['content']) ?>

Let me know if that works for you.
Dave Edis - Senior Developer
interactivetools.com

Re: [Dave] SWF File uploaded through WSYIWYG Media Icon not Displaying

By Keltam2 - September 21, 2009

Yep, that's what I had added in. It's still coming up with the WYSIWYG generated code though?
Attachments:

internships3_001.php 27K

By Dave - September 22, 2009

Hmm, I think we'll need to take a look at that. I'm not sure.

Can you send CMS and FTP login details to dave@interactivetools.com? Note: Email, don't post login details to the forum.

Thanks!
Dave Edis - Senior Developer
interactivetools.com

Re: [Dave] SWF File uploaded through WSYIWYG Media Icon not Displaying

By Dave - September 23, 2009

Hi Kelly,

Ok, I've updated the internships3.php file on your server and it's replacing the content now.

I updated this line:
// match: <object data="/cmsAdmin/uploads/InternReel.swf" width="100" height="100" type="application/x-shockwave-flash">
$match = '<object data="([^"]+)" width="(\d*)" height="(\d*)" type="[^"]+">\s*<param[^>]+>\s*</object>';


The reason it wasn't matching before was because the width, height, and type attributes were in a different order. To pattern match we need to know what order they're in. If the wysiwyg produces object tags with attributes in different order in future we'll need to revisit this. But give it a try and let me know how it goes.

Hope that helps!
Dave Edis - Senior Developer
interactivetools.com