I was disappointed to see that the YouTube extension for BlogEngine was no longer available for download, so I decided to create my own.
I had recently installed Sean Blakemore's Silverlight Extension, and since I have never coded an extension for BlogEngine I figured I'd learn from a similar application. Thanks for the head start, Sean! I really used the base of his code and modified it to work for YouTube videos instead.
UPDATE 10.28.2008: Version 1.1 Released, instructions modified.
Version history at end of this post.
So, installation is quite easy:
- Take this ZIP file - YouTubePlayer-1-1.zip (1.39 kb) - and extract the YouTubePlayer.cs file into your /App_Code/Extensions folder within the root of your BlogEngine installation.
- Log into the "Extensions" portion of your admin panel, you should see the YouTubePlayer extension.
- Click the Edit link to change settings. NOTE: You do not need to modify these settings if you don't want, you can skip to step 4.
- Width and Height are set to the default YouTube size, you can change them if you wish but I don't believe it will change the size of the video.
- Show Border is nice if you want to blend the video border into the color scheme of your website. By default this is turned off (0). Turn it on by changing the setting to "1".
- Primary and Secondary colors are used for the border and need to be entered in Hexidecimal value. The example below uses 709397 for the secondary (the aqua in this site) and 000000 (black) for the primary. You can see how it looks below.
- Create a new entry and add this code to your blog to insert a YouTube video: [ youtube:YourVideoCodeGoesHere ] (without the spaces).
- Note that the "YourVideoCodeGoesHere" part is typically random characters and letters. You can see them in the URL of your YouTube video.
That being said, the code entered for this is [ youtube:Ddn4MGaS3N4 ]
(minus the spaces)
The video looks like this:
Enjoy!
=================
VERSION HISTORY
=================
10.28.2008
Version 1.1
YouTubePlayer-1-1.zip (1.39 kb)
Change: Code used within [ youtube: ] tag is no longer the entire URL (i.e. http://www.youtube.com/v/Ddn4MGaS3N4). On occasion, if the WYSIWYG editor set the URL as a hyperlink, the rendering of the video would fail. Now, it's only required that the random video code is entered (i.e. Ddn4MGaS3N4)
--------
10.25.2008
Version 1.0, first release
YouTubePlayer.zip (1.36 kb)
Share or Bookmark this Post…