Top

Featured Video Plugin/Widget

January 15, 2008

Featured Video automatically features the latest video you include in a post in your sidebar.

Current Version: 1.2 (January 15, 2008)

Download: Download Featured Video Here

Wordpress Compatibility: Tested on 2.3.1, probably won’t work on less than 2.3 

History:
This was a plugin that I looked and looked for when I was putting a new blog together for my Brother-in-law. He wanted to start vlogging, but he wanted to have a youtube video display in the sidebar that he didn’t have to change manually, instead he wanted it to change when he made a new post to the video category.

Well, as you can guess, I found a TON of “Easy Youtube” Post/Gallery plugins and the like, but nothing even came close to pulling a video out of a post and featuring it in the sidebar. And thus, Featured Video was born.

I based the code on Paul Bain’s EasyTube plugin, (Thanks Paul!) but modified it heavily to include the functionality I needed in addition to the easy youtube/google video posting that EasyTube provided. And then I widgetized it for added usability.

Installation Instructions:
Upload the featuredvideo.php file to your /wp-content/plugins folder, then log into your admin account, and go to the Plugins page and click “Activate” in the Featured Video row

Usage:
First, go to Options > Featured Video and set your options. You can choose the height and width of the control, whether or not you want it to autorun (not recommended, because it’s really annoying when it’s on every one of your pages), and the text for the link back to the post the video is from.

If you don’t want to display a link, you can simply leave the link box blank and it won’t display a link

To use Featured Video as a plugin:
Put <?php vsf_show_video() ?> in your theme’s sidebar file

To use Featured Video as a widget:
Point and click, baby. You can also set the title text if you want to

CSS Considerations:
The entire chunk of HTML generated by the Featured Video plugin is surrounded by <div class=”featuredvideo”>…<div> so it’s pretty easy to manipulate in CSS.

For example, if you wanted a bigger margin between the video and the link, and you wanted the link centered, try this:

.featuredvideo object {
        margin-bottom: 5px;
}

.featuredvideo .link {
        text-align: center;
}

(Since all designs are different, I can’t support the CSS on your site. If the above CSS doesn’t work for you, keep trying!)

Nuts and Bolts:
Just like Paul’s plugin, Featured Video will also parse all posts for the following syntax:

[youtube:url] and [googlevideo:url]

So, if you wanted to post a youtube video in your posts, you could use a line like this:

[youtube:http://www.youtube.com/watch?v=0md6Flcrd0s]

or Google Video:

[googlevideo:http://video.google.com/videoplay?docid=6204903272262158881]

If you use a [youtube or [googlevideo tag in any post, Featured Video will convert it to the required code for it to be displayed right there in the post. If you use one of those tags in a category that you’ve set in the Options page for Featured Video, it will display the first video from the most recent post wherever you put the <?php vsf_show_video() ?>  code.

Happy blogging!

Known Bugs:
When you delete the latest post in one of the categories you have Featured Video set up to use, the plugin knows about it, but fires its’ update code before the post delete actually happens. Workaround: Simply go to the Options > Featured Video page and click the Update button and it will pick up the correct video.

Any ideas on how I can get around that without coding a whole extra function for the delete? This case wont happen very often, so an entire function seems a little overkill.

Because this plugin/widget is provided free of charge, I simply ask you to link back to Pressography.com in a post on your blog, or from one of your sites. It doesn't need to be anything fancy - just a note saying that you're using it, and whether or not you like it. However, there is no requirement that you do this, you're free to use the plugin regardless.

Comments

4 Responses to “Featured Video Plugin/Widget”

  1. Jason on June 12th, 2008 10:29 am

    @Frank - Yep, that’s what this plugin does - it takes the latest video you post (using the [youtube] or [googlevideo] tags, as mentioned on this page) and puts it in the widget

  2. Frank on June 11th, 2008 4:50 am

    Hi, can i show always the “last/latest” postet Video and not the most Featured?
    I have an Category in my Blog with Videos, but the Category is Hidden.

    I hope you can understand my English.

    Greetings Frank

  3. Featured Video Plugin For WordPress » » Saheltech Blog on July 26th, 2008 2:33 pm

    [...] WordPress Featured Video Plugin is a very useful and powerful feature to add in your wordpress blog. * It woudl read and display a [...]

  4. Featured Images Widget : Pressography on January 22nd, 2008 11:36 pm

    [...] After creating the Featured Video plugin, I was looking at the front page of this blog, and thought it would be really great to be [...]

Got something to say?





Tags:
Separate individual tags by commas
Bottom