YouTube Brackets (WordPress Plugin)
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:
[ youtube=http://youtube.com/watch?v=4yX1F_nTcfc]
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.
Usage
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).
YouTube.com directions
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.
Download
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.
Installation
Upload to plugin directory and activate through admin-section/plugins.
- You have to register at wordpress.com in order to to get an api-key. You can register without creating a blog. It’s stupid YouTube asks for an API key with Self-Hosted WordPress blogs. They don’t need it at all. With Flickr you don’t have to provide an API key.[back]
Lees op deze blog meer over english, hack, nerd talk, plugin, software, wordpress.

















