swfEmbed 0.9 1 July 2006
Overview
This plugin makes it quick and simple to insert flash movies into your worpress posts using a UBB style tag.
The syntax to insert a movie is as follows
[swf]src,width,height,ver,bgcol,alt[/swf]
- swf the address of your flash movie
- width the width of your movie – either the number of pixels or a percentage
- height the height of your movie – either the number of pixels or a percentage
- ver the version of the flash movie (defaults to 5)*
- bgcol the background colour of the movie (defaults to white)*
- alt the address of the graphic to use if the flash plugin is not found*
* optional
Examples
1) [swf]/images/addvrt.swf,170,170,5,#000000[/swf] gives
2) [swf]http://video.google.com/googleplayer.swf?docId=-3054014799466172915, 400, 326, 8, #ffffff[/swf] gives
if flash wasn’t installed or of high enough version the following would be shown
Installation instructions
- Download the plugin from here
- Unzip the archive and upload the contents to your plugins folder (ususally site root/wp-content/plugins
- Goto your administration panel, choose plugins and enable the plugin
Install notes
The current version of wordpress (2.0.3 at time of writing) treats XHTML CDATA tags in an odd way, this has been submitted here as a bug, so this may be fixed in the future. There is a simple fix described here.
This plugin utilises Geoff Stearns swfObject, so if your already including the swfObject classes in your pages then comment out the following line (plugins/swfEmbed.php)
:: UPDATED 0.7 ::
For war59312 – strips the <p> tags added by TinyMCE that upset the validator. Auto-hyperlink URLs plug-in compatability fix.
:: UPDATED 0.8 ::
Be nice to other plugins release – uses a cleaner two pass approach that improves compatability with third party plugins.
:: UPDATED 0.9 ::
Improved patern matching.
5 July, 2006 [6:49 pm]
Hey,
Sweet! Working perfectly now and 100% valid xhtml.
Thank you so much!
Just one question. Not sure if it’s doable and it really does not matter much. Just wondering…
Anyway to have the “Post Preview (updated when post is saved)” show the flash when editing a post in WP 1.5 ?
Take Care,
Will
PS: Yeah might be a good time to clean up all the comments now.
he-he Thanks again! And sorry if this gets posted twice. Just want to be sure you see it. :p
5 July, 2006 [11:20 pm]
Ok – one last time you might like to update, as the patern matching used can go screwey if you have lots of flash movies in your page, faster and improved version uploaded.
Re – postpreview, i\’ll look into it – i think all key issues have now been ironed out – might actually reach a version 1 soon!
6 July, 2006 [4:36 pm]
Hey,
Nice one!
Thanks,
Will
PS: Yeah I can’t wait.
13 July, 2006 [11:42 am]
Hi, don’t work for me:
I want to embed that kind of swf url’s : http://video.google.com/googleplayer.swf?docId=-3054014799466172915
you can see the code here:
http://www.untereiner.com/?p=15
13 July, 2006 [12:00 pm]
I suggest you check your installation, i have added the movie you mention above (see example 2) and it shows no problem.
I have checked your pages source and it appears you have embedded flashobject.js , this plugin pulls in swfobject.js which is a replacement for flash object, i can onlyh sugest you use this to embed your hedder graphic as these two scripts may be conflicting – see http://www.web-engineer.co.uk/codex/?p=48 for information on swfobject.
14 July, 2006 [5:28 am]
Hey Craig,
Another issue.
Can you please take a look here to see what is wrong:
http://www.war59312.com/archives/2006/07/14/july_14_06_stupid_videos/
I tired that google one you posted too and similar thing happens.
Thanks again,
Will
14 July, 2006 [7:28 am]
http://www.web-engineer.co.uk/codex/?p=61
Please check this post which may shed light on your issues – the key thing being add http:// to the address of the movie, if you still have any problems let me know.
17 July, 2006 [2:40 am]
Hey Buddy,
All right please take a look here:
http://www.war59312.com/archives/2006/07/14/july_14_06_stupid_videos/
As you can see having more than one flash file in a post or on a page is a big problem.
All of them start playing automatically.
Any way to stop videos from playing automatically? That is, require the user to click play to start it?
Thanks a lot,
Will
17 July, 2006 [7:59 am]
The simple answer is no. As present this plug-in is designed to make it quick and easy to embed any flash move. The idea being your flash movie should have its own proprietary controls contained within it, as using flash to embed video is one of many ways you may wish to embed flash and the other trouble will any player controls would have to be sinkable.
As a separate addition/alternate, I could look at a skin-able media edition (i.e. slide-show, video player and mp3) would this be of interest to you?
18 July, 2006 [2:21 am]
Hey,
Yeah thats cool, I know what you mean.
Yeah sounds cool to me.
Thanks again,
Will
18 July, 2006 [2:56 am]
Hey,
Just realized my feed is now screwed up:
http://www.war59312.com/feed/
Please take a look if you don’t mind.
Thanks a lot,
Will
18 July, 2006 [7:51 am]
Ok – that will be a tricky one… why the feed include the full articles i dont know, a summary or intro only would be better….
There are two possable routes that can fix this –
1) Move the scripts that activate the flash movies to the footer. And show a placeholder untill the movies are inserted.
2) Mod/Fix/Re-write or configure the feed component so that it only includes an introduction to each of your articles in the “content” node.
Because of the way the flash movies have to be embedded i cant see any way of making the feed compatable with an RSS feed – unless we change the way the movies are embeded just for feeds – then feeds will fall foul of the activex issue in ie (click to activate problem). Even if we did this, if you use relative paths or complex flash movies or movies locked to a domain, they wouldn’t run in a feed anyway!
This could most probably do with a re-think…. I’m gona have a root around and see what the plugin API can do for us…
18 July, 2006 [8:35 am]
http://www.web-engineer.co.uk/codex/?feed=rss2
Our feed, although the flash movies arn’t shown, is not effectd – are you using a feed component? or the built in one?
This might be a v1.5 issue as we are using v2.
19 July, 2006 [4:10 am]
Hey,
First off, your feed is dead here. Just an empty white page.
I am using the built in feed reader.
But yeah ok your right, I just changed to Summary and works fine. Never really thought about. Guess that is just fine for now.
Take Care,
Will
19 July, 2006 [4:21 am]
Also, about the flash player.
Perhaps something with this:
http://www.jeroenwijering.com/?item=Flash_Video_Player
I’m not good enough to get it work so…
Not sure if I even understand it right…
But maybe you could use it with your plug-in. So when you enter your code on the page you use his flash player to play the file specified?
19 July, 2006 [8:31 am]
Ahh – I turned the feed off when I realised that the viewlevel mod we are using doesn’t work with the feeds (just after investigating your problem), which makes it pointless to use viewlevel unless you turn your feeds off…. Anyway issues with viewlevel are for another thread i think….
RE: Player – thats an interesting one, i’ll most likely make a bespoke one for this as that one needs a licence to use comercially.
26 July, 2006 [9:38 am]
Um, oh ok.
2 August, 2006 [2:59 pm]
Craig,
Great plugin, thanks…
I have got the plugin working within posts and pages, but I am not sure what code I need to add to make it work in the sidebar? What do I need to put around the [swf][/swf] tags?
Cheers
Adam
2 August, 2006 [3:12 pm]
This plugin is designed to work as a post plugin – i.e. it only processes the content of a post. Your best bet is to include flash movies using the swfObject javascript class this plugin adds to your pages.
Visit -
http://blog.deconcept.com/swfobject/
This is the documentation for the JavaScript class included by my wordpress plugin – if you have the plugin installed then this class will be loaded in the head of your document, so you can then utilise it in your template.
Good Luck…
1 September, 2006 [8:09 am]
Hi Craig,
i’ve installed wp 2.0.4 and want to make you plug-in running on this site
http://scs2.rocksoul.de
But it didn’t works for me – the hack you described doesn’t works as well.
When i embed the flash in the old-school way it works –
do you have any ideas
Greets Bo
1 September, 2006 [9:50 am]
ok – i’ve spotted your problem… the plugin doesn’t appear to be installed properly, the following files are not present –
/wp-content/plugins/swfEmbed/swfobject.js
/wp-content/plugins/swfEmbed/webEngInsertWPFlash.js
These are essential for the plugin to work and should have been in the package – please re-upload the plugin files and try again…
If you still have problems feel free to post back…
3 September, 2006 [5:22 pm]
That’s it – now it works – but how do handle with Flash-Vars, if i want to send an variable
(eg. the xml-file for the data).
In the geoff stearns original i’ve got the parameter to set the variables
3 September, 2006 [6:22 pm]
Thats a good idea – perhaps next version i will address this more directly – however for now there is a quick fix for this, simply add the variable name/value pairs to the address of the movie – e.g. yourmovie.swf?var=value&anothervar=anothervalue
These will then be accessable in your movie.
9 November, 2006 [8:29 pm]
I’ve got to WordPress pages and the plugin doesn’t work in any of those two pages.
One ar version 2.0.2
And the other is 1.5.2
10 November, 2006 [1:15 pm]
Can you give the URL of the pages you are having problems with?
12 January, 2007 [1:52 pm]
Thnx for this!! Works great!! I also like ur site design.
12 January, 2007 [1:56 pm]
Thanks! Glad to be of service! Happy flashing…
24 December, 2007 [3:08 am]
Hello
I’m trying to run WP-Email but it’s not compatible with swfEmbed plugin, which i’ve been working whith for months.
Can I change something to make both plugins compatible and work at the same time?
The blog I’m working in is http://preciousliquids.awardspace.com
Thanks a lot
JaimecÃn
24 December, 2007 [11:57 am]
if you could leave a URL for the WP-email plugin you are using, I’ll take a quick look…
Chances are this can be fixed by altering lines 52/53 in swfEmbed.php and try changing the last argument in the method call to change the order of execution…