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

34 Responses to “Featured Video Plugin/Widget”

  1. ivan on April 24th, 2009 1:20 pm

    hmm so that works, i got question for all of you

    how do i exclude posting video in my post ??

    so i dont want it to show in posts

  2. ivan on April 24th, 2009 1:15 pm

    hey guys, there is simple tweak to get this working right (to show latest video)

    open featuredvideo.php and add ORDER BY post_date DESC”;
    so the whole section of code looks like:

    $sql = “SELECT distinct ID, post_title, post_date, post_content
    FROM {$prefix}posts, {$prefix}term_relationships, {$prefix}term_taxonomy
    WHERE {$prefix}posts.ID = {$prefix}term_relationships.object_id
    AND {$prefix}term_relationships.term_taxonomy_id = {$prefix}term_taxonomy.term_taxonomy_id
    AND {$prefix}term_taxonomy.taxonomy = ‘category’
    {$catsql}
    AND post_status = ‘publish’
    AND post_type != ‘page’
    ORDER BY post_date DESC”;

    **note: you have to delete symbol ; after the ‘page’. The symbol “;” has to be at the end of that code section..

    Cheers

  3. spencer on April 23rd, 2009 12:02 am

    cannot load videosidebar.php
    (it doesnt exist.. tthis is when i edit the featured video widget it sends me to videosidebar.php wich you forgot to include in your download..
    are you an imbecile?
    im deinstalling your useless widget

    Comment Tags: nonexistent files
  4. spencer on April 22nd, 2009 11:57 pm

    i now included all categories to make sure, and it doesnt work buddy.. which is probably the reason why this plugin is no longer listed in the wordpress plugin cp?

    Comment Tags: crap
  5. spencer on April 22nd, 2009 11:52 pm

    doesnt work mate i set it up correctly chmodd 777 the plugin installs, and i included the category with all videos on the admin backend control panel for this plugin but it says “There is no video to display just yet”
    doesnt work

    Comment Tags: faulty plugin
  6. Brian on April 14th, 2009 1:43 pm

    Can I pull video from another blog and feature it in a sidebar widget using this plug-in? I can’t seem to find what I need anywhere. Any help would be greatly appreciated.

  7. Brian on April 14th, 2009 1:39 pm

    This plug-in is the closest I found to the type of program I need. I want to place Video posts in a sidebar, but the video posts are coming from another blog site. Can I use this plug-in to pull the latest post from another site (www.vaalbarany.com/videojournalblog) and place in the sidebar via a widget?

    Any help would be greatly appreciated.

  8. sam on April 9th, 2009 7:05 pm

    can u use other vids than google and youtube that show up in featured video

  9. Pierre on April 7th, 2009 11:33 am

    Hello
    This is q nice pluggin however i have got a problem
    when i put a google video i don t know why but the video play automaticly in the sidebar but i have set up the option and when it asks me “Play The Video When The Page Loads?” i have selected “no”

    Does anyone know how to do for to swtch off or take off the autoplay ???

  10. ChuckMcB on March 17th, 2009 6:03 pm

    Nice hack freakery. Working well for me. Cheers!

  11. Ed on March 12th, 2009 8:41 am

    @Ed - sorry that should be:

    ‘I’ve added the ?php vsf_show_video() ? code to my page-sidebar.php’

  12. Ed on March 12th, 2009 8:37 am

    Thanks, this is exactly what I’ve been looking for..

    Is there a way to have featured videos on a page’s sidebar? I’ve added to my page-sidebar.php but its not displaying my latest video. I just get ‘There is no video to display just yet’.

    I’ve tried going into settings and hitting ‘update’ but no joy. Any ideas?
    (using wordpress 2.7)

    Cheers

  13. freakery on March 11th, 2009 5:02 am

    okay got it to update automatically! YAY!

    look for the commented widget code eg.

    //===================================
    // Widget Code
    //===================================

    (ADD THIS!) vsf_get_latest_video(0);

    YAY!

  14. freakery on March 11th, 2009 4:57 am

    okay i got the plugin to select videos randomly with a simple shuffle(); function

    right after
    * $posts = (array)$wpdb->get_results($sql); *

    i added
    * shuffle($posts); *

    seems to work ONLY if I press the update button in the admin section. Is there a way around this (automatically updates when I refresh the page)

    cheers

  15. rohith on March 8th, 2009 1:19 am

    hai
    i install the plugin and upload the video in google ( http://video.google.com/videoplay?docid=5609658004883630305 ) how i point to my website please help me
    thank you

  16. ChuckMcB on February 11th, 2009 6:23 am

    Another couple of suggestions:

    - add the video usage/syntax to the admin page as a reminder
    - parse pages as well as posts looking for videos (on one of my sites all my videos are on pages)

  17. ChuckMcB on February 5th, 2009 10:22 am

    Nice plugin, came bundled with a theme I’ve started using. Did a couple of hacks to stop it displaying related items (add &rel=0 to the video QS)

    Any chance of a quick hack that randomly picks a video rather than one that was in the last post?

    TIA

  18. Martin on January 24th, 2009 7:45 pm

    Hi,

    This is exactly the sort of thing I was after, but I seem to be having same trouble as the rest.. the videos within my new posts don’t seem to be updating so it just keeps displaying the first video all the time..
    I really really want to try and get this to work!…

    Was this fixed, did I miss something.. or..

    Many Thanks

    M

  19. Editor on January 7th, 2009 9:40 pm

    Originally Posted By DaveHas the old/new post bug been solved??

    I’m trying to use this on my blog, but it is only pulling the earliest video post…..

    Same for me. Updating files doesn’t help. Adding “ORDER BY post_date DESC”; to the end of the $sql function in featuredvideo.php (as suggested elsewhere on the Web) just breaks everything.

  20. Dave on December 19th, 2008 10:36 am

    Has the old/new post bug been solved??

    I’m trying to use this on my blog, but it is only pulling the earliest video post…..

  21. Danny Foo on December 1st, 2008 3:53 am

    Originally Posted By Danny Foo

    Originally Posted By Danny FooI’m facing a bug - I think.

    I installed on Wordpress 2.6. Even after I posted 2 new videos, the first video is still displaying. When I unpublished the first post, the most recent video (of the 2) shows.

    I’ve tried the Update method - doesn’t work.

    Any other suggestions? Thanks.

    Just to update. It’s only displaying the most 2 recent videos. In other words, I’ve to unpublish/delete oldest 1 (if there’s 3) before the most recent will display.

    Hope that’s understood.

    Okie. Found a probable cause.

    It’s not pulling the latest but the earliest post published. Weird.

  22. Danny Foo on December 1st, 2008 3:47 am

    Originally Posted By Danny FooI’m facing a bug - I think.

    I installed on Wordpress 2.6. Even after I posted 2 new videos, the first video is still displaying. When I unpublished the first post, the most recent video (of the 2) shows.

    I’ve tried the Update method - doesn’t work.

    Any other suggestions? Thanks.

    Just to update. It’s only displaying the most 2 recent videos. In other words, I’ve to unpublish/delete oldest 1 (if there’s 3) before the most recent will display.

    Hope that’s understood.

  23. Danny Foo on December 1st, 2008 3:43 am

    I’m facing a bug - I think.

    I installed on Wordpress 2.6. Even after I posted 2 new videos, the first video is still displaying. When I unpublished the first post, the most recent video (of the 2) shows.

    I’ve tried the Update method - doesn’t work.

    Any other suggestions? Thanks.

  24. Danny Foo on November 19th, 2008 10:27 pm

    Awesome simple plugin. But you might need to re-look into the code because of Firefox 3.

    Firefox 3:
    Keeps displaying; You need to have flashplayer enabled to watch this Google video.

    Even with the latest Flash player, it still does it. No idea why.

  25. Vladimir on October 30th, 2008 1:23 pm

    Just installed the plugin. Seemed to be working well. But now I just uploaded a new video and the old video still shows. Any ideas why?

    I’ve also tried to update the options just to make sure it recognizes the latest video.

  26. Alex on September 19th, 2008 3:12 pm

    @Alex - Never mind! I just figured out that putting link text in Settings > Featured Video will point to the post. Awesome. Sorry to bother you. . .

  27. Alex on September 19th, 2008 1:46 pm

    Very nice and easy plugin, and I’m happy to link back. Thanks!
    P.S. Can I add parameters, like a title, to the PHP or [youtube] code?

  28. 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

  29. 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

  30. Essential Plugins For Wordpress 2.6.2 - blog - BlueBoxSols.com on March 3rd, 2009 6:44 am

    [...] Featured Video automatically features the latest video you include in a post in your sidebar. Not necessary if you do not post videos obviously. Download [...]

  31. Featured Video Plugin For WordPress « DreamWeaver Kit on March 2nd, 2009 1:38 pm

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

  32. Featured Video Plugin - Widget - WP Plugin Archive on October 17th, 2008 3:21 am

    [...] Featured Video Plugin - Widget von Jason DeVelvis featured automatisch das zuletzt in einem Beitrag eingebundene Video über [...]

  33. 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 [...]

  34. 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