Noscope is a bi-weekly journal serving up snacksized portions of pointless stuff since 2001. On a new linode server!
I also do freelance design and usability via dejligt.com

Flash Shorttags for WordPress Plugin [Update: Retired]

    12:11 on December 27, 2008 , , ,

Todays serving is another WordPress plugin. It is written as part of my community service program and with its release, I hope to have paid back what I have taken from the open source community (damn you, GPL, and your “stay free” mantra).

In any case, this plugin is for the minimalists who needs to embed Flash files in their WordPress content. Look, see:

The Flash plugin is required to view this object.

Flash files are embedded thusly:

    
      
      
      
      
        

The Flash plugin is required to view this object.

That’s what there is to it, and that’s all there is to it. There’s no options page, and while you can specify a plethora of other attributes (see readme.txt), the above are the only required ones.

So how is this different from Vipers Video Quicktags or Kimili Flash Embed, plugins that also allow you to embed Flash? Well this one only does Flash. This one does it using the superior SWFObject 2 embed method and with as little code as possible. Finally, and most importantly, this plugin goes to eleven.

Update, December 2009: Retirement

It’s my pleasure, actually, to announce that this plugin is now retired in favor of the SwfObj plugin.

This plugin was initially built because no other plugin embedded Flash simply and appropriately, which it did somewhat well. After building it, however, I became aware that it was not enough to simply build a plugin that easily embedded Flash objects using SWFObject, it needed to work with RSS Feeds (static publishing), and ideally the builtin WordPress uploader should be used to allow you to upload your Flash files. That’s when I discovered SwfObj by Matt Carpenter.

At the time, SwfObj worked remarkably well, both with RSS feeds, simple shortcodes and clean uploading of Flash files. Dynamic publishing wasn’t working superbly though, and I missed the option to specify defaults for “window mode” (useful if you need HTML dropdown menus to be able to overlap your Flash content). So I emailed Matt and asked him whether these features could be added in. Not only could they, but Matt agreed to include the flash shortcode used by this plugin.

The net result is that you Flash Shorttags users can now migrate to SwfObj and not have to edit a single post; everything will work, and you’ll have new features. My thanks to Matt for tweaking his plugin. I’m sure this’ll be to the benefit of WordPress users. That’s why as of today, Flash Shorttags is retired and will no longer be developed. I encourage you to switch to Matts plugin.

Download

Comment

Pings

  1. Yazıda swf kullanımı | By_YawusZ ile Blog Keyfi

Comments

  1. mo says:

    well done sir.

  2. Joen says:

    Thank you, sir.

  3. Levi says:

    Nice, I’m a big fan of SWFObject 2.0, though I don’t have any mighty need to post flash into my blog just yet; this’ll definitely be the plugin I use.

    Is there any customisation for using expressInstall by default?

  4. Joen says:

    To be quite honest, I’ve never bothered with expressinstall at all, so I really just added the SWFObject parameter. This plugin here, will really just act as a proxy, with the parameters simply tunneling through WordPress’ terrible textmangler, unharmed hopefully, into SWFObject. So I’m afraid I’ll have to relegate you to the SWFObject documentation.

  5. Levi says:

    Not to worry, I’m sure I can just pop the express install code in myself. :) Along with my usual menu:false parameter.

  6. Joen says:

    I’d expect you to be able to, yes.

    As for “menu: false”. that should go under parameters, but if you’re no stranger to SWFObject I’m sure you’re all set on that. Personally I’ve been using SWFObject 1.5 for a while, and since the syntax is all different in 2.0, I’ve been off my game.

    By the way, did you know you could write Stage.showMenu = false; inside the Flash movie? That is, provided you make the movie yourself. Then you won’t have to provide parameters.

  7. Very nice Joen. I’ll be sure to use this whenever I need to embed a Flash movie in a post. Nice work. Cheers.

  8. Joen says:

    Thanks much, I appreciate it!

    Oh, and because the code is extremely simple (we’re talking some 20 lines of code), it should be very easy to extend to embed other things. Go open source!

  9. Joen says:

    As a small service announcement, I have discovered a bug in this plugin. As it stands, you can only embed one Flash file per post, as the ID of the embed is generated from the post name. Since each embed needs a unique ID, this will cause the javascript replacement call to fail.

    I’ll fix this.

  10. Joen says:

    It’s now fixed, but not yet uploaded. I’m going to attempt to get this to the wordpress repository instead.

  11. Joe Becker says:

    Very nice! you made life very easy! Nice job

  12. frank says:

    I installed the plugin – activated and then added this line of code to a page:

    [flash src="images/coverflow.swf" width="590" height="400"]

    It’s not working after I update – any ideas? Am I missing something?

  13. Joen says:

    If the site you’re having trouble with is http://www.d2lgraphics.com/, then the SWFObject javascript is not being included. I have no idea why.

  14. frank says:

    I figured it out.

  15. Sylvain says:

    Hi,

    Works fine into posts but how can I include your plugin in a text widget?

    Thanks

  16. Joen says:

    Off the top of my head, you have to add something to your functions.php, something like add_filter / text_widget / do_shortcodes. I think it’s possible, but I do think it requires a little PHP wizardry. If anyone can connect the dots, please add a comment.

  17. Joen says:

    Added instructions in this post, on how you make this plugin work with widgets.

Leave a Reply

Have something to say? Jump right in!

(required)
(required)