YouTube offers a service that sends a video you are watching to your blog. It does not send html-code to your blog, but a code like this:
This works fine for blogs hosted on wordpress.com, but with standalone setups of wordpress it doesn’t work at all.
That’s why I quickly put together a plugin that makes the bracket code work. I used the Quicktime posting plugin as a starter. Thank you, Shawn Van Every.
Setup your standalone wordpress blog at YouTube and send a video to your blog. Or just copy the url of the YouTube video you are watching and put it in your blog like this:
[ youtube=http://youtube.com/watch?v=4yX1F_nTcfc] (without the space between bracket and y, though).
You can also set the size of the video in your post. Do something like this: [ youtube=http://www.youtube.com/watch?v=0jjgk1-ac1I 150 100] (without the space between bracket and y, though).
1. Go to YouTube.com
2. (Create an acount and) login
3. Go to ‘My Account/Account settings/Video posting Settings’
4. Choose ‘Add a Blog/Site’.
5. Choose ‘WordPress Self-Hosted’, fill in username and password of your WP blog, fill in api URL (http://your blog’s URL/xmlrpc.php) and a random WP API key (get one here).1 and click on the ‘Add Blog’ button.
6. Watch a video at YouTube.com and choose ‘Post Video’ from the options below the video.
Changelog: Cleaner code, pretty url support (youtube.com/v/), css (span class youtube). -Special thanks to Mike Thompson-
Changelog: Resolved conflict with Shawns great quicktime posting plugin and added html-comment around code.
Change log: Code now validates as XHTML 1.0 Transitional (thanks to Karen). Is only tested with Firefox and Internet Explorer though, but most probably works with all browsers. If you want to be sure, use version 1 (below).
Change log: Added size variables and cleaned up the code a bit.
Upload to plugin directory and activate through admin-section/plugins.