Blosxom plugin for YouTube videos
Tue, 19 Dec 2006
I upgraded my rss feed to support enclosures and RSS 2.0 standards. When I checked to see if it would validate, it didn't. The YouTube video I had embedded into a blog post caused an error in the validation. Embedded elements and objects aren't allowed in rss feeds, as they pose a potential security risk.
I didn't like it one bit. So I fixed it. It wasn't easy, but I found a method. This cached page gave me a method of coding around the embed: The Good Harvest - Web Valid Code and You Tube (together at last)
The SWFObject method of loading the video into a div container is cool, but that's a lot of code to cut-and-paste and change for each YouTube video I might want to post. That's where Blosxom's plugin and template architecture comes in handy.
I used the existing meta plugin to pass a variable, (the YouTube video's parameter string), to my new plugin, which performs some voodoo to construct the SWFObject code to be used in my html templates. An optional meta description tag is also used to construct an anchor link, (in formats specific to html and rss templates).
I plan more work on the meta_youtube plugin, before I release it. I'd like to make the SWFObject method optional and add other configuration options. While I have the hood up, I might as well add some chrome.
» Comments are closed.
» Link: / devlog / Blosxom plugin for YouTube videos