=== Video Thumbnails === Contributors: sutherlandboswell Donate link: http://amzn.com/w/1L25YG6FO8AZ1 Tags: Video, YouTube, Vimeo, Blip.tv, Justin.tv, Thumbnails Requires at least: 3.0 Tested up to: 3.0.4 Stable tag: 1.0 Video Thumbnails is a simple plugin that makes it easy to automatically display video thumbnails in your template. == Description == Video Thumbnails makes it easy to automatically display video thumbnails in your template. This plugin will pull the thumbnail for you, save it to your media library, and set it as the featured image. You can choose to turn off featured images Video Thumbnails currently supports these video services: * YouTube * Vimeo * Justin.tv * Blip.tv Support is also included for the following plugins, with universal plugin support coming soon: * [Simple Video Embedder](http://wordpress.org/extend/plugins/simple-video-embedder/) * [Vimeo Shortcode](http://blog.esimplestudios.com/2010/08/embedding-vimeo-videos-in-wordpress/) * [JR Embed](http://plugins.jakeruston.co.uk/wordpress/wordpress-plugin-jr-embed/) Some functions are available to advanced users who want to customize their theme: * `` will echo a thumbnail URL or the default image located at `wp-content/plugins/video-thumbnails/default.jpg` if a thumbnail cannot be found. Here is an example: `` * `` will return the thumbnail URL or return NULL if none is found. In this example, a thumbnail is only shown if one is found: `"; } ?>` == Installation == 1. Upload the `/video-thumbnails/` directory to the `/wp-content/plugins/` directory 1. Activate the plugin through the 'Plugins' menu in WordPress == Frequently Asked Questions == = My theme isn't showing thumbnails, what's wrong? = The most likely problem is that your theme doesn't support post thumbnails. If thumbnails are supported, you should see a box titled "Featured Image" on the edit post page. If thumbnails aren't supported, your theme will have to be modified. = Can I use the functions outside of a loop? = Yes, but you must pass the post ID to the function as a parameter. For example: `` = My video service/embedding plugin isn't included, can you add it? = If the service allows a way to retrieve thumbnails, I'll do my best to add it. = I am editing my theme and only want to display a thumbnail if one is found. How do I do this? = `"; } ?>` will only display a thumbnail when one exists. = I edited my theme and now I'm getting huge thumbnails, how can I resize them? = Adding a width attribute to the image element should scale the image in most modern browsers. Ex: `"; } ?>` You can also assign a class to the element and style it with CSS, or even use a library like [TimThumb](http://code.google.com/p/timthumb/) to resize your images. = I edited my theme and now I'm seeing the thumbnail and the video, how do I only display the thumbnail? = Every theme is different, so this can be tricky if you aren't familiar with WordPress theme development. You need to edit your template in the appropriate place, replacing `` with `` so that only an excerpt of the post is shown on the home page or wherever you would like to display the video thumbnail. = Why are there black bars on some YouTube thumbnails? = This is an unfortunate side effect of widescreen videos on YouTube. The thumbnail YouTube provides is always the same ratio, which creates black bars when a video is widescreen. Some themes will crop featured images and it may not be visible, but if you are comfortable editing your theme, I recommend using [TimThumb](http://code.google.com/p/timthumb/) to resize and crop your images. = Why did it stop finding thumbnails for Vimeo? = The Vimeo API has a rate limit, so in rare cases you may exceed this limit. Try again after a few hours. == Screenshots == 1. The Video Thumbnail meta box on the Edit Post page == Changelog == = 1.0 = * Video Thumbnails can now be stored in the local WordPress media library * Video Thumbnails stored locally can automatically be set as the featured image, making it support many themes automatically * Added an options page to enable/disable local storage and enable/disable automatically setting that thumbnail as the featured image * Settings page also includes a button to scan all posts for video thumbnails = 0.6 = * Added support for Justin.tv * Fixed bug that could cause a conflict with other plugins = 0.5.5 = * Video thumbnails are now found at the time the post is saved = 0.5.4 = * Video thumbnails can be retrieved for a specific post ID by passing a parameter to the `video_thumbnail()` or `get_video_thumbnail()` function. For example: `` = 0.5.3 = * Better support for Vimeo Shortcode (thanks to Darren for the tip) = 0.5.2 = * Added support for [Simple Video Embedder](http://wordpress.org/extend/plugins/simple-video-embedder/) = 0.5.1 = * Added a test to make sure the YouTube thumbnail actually exists. This prevents you from getting that ugly default thumbnail from YouTube. = 0.5 = * Thumbnail URLs are now stored in a custom field with each post, meaning the plugin only has to interact with outside APIs once per post. * Added a "Video Thumbnail" meta box to the edit screen for each post, which can be manually set or will be set automatically once `video_thumbnail()` or `get_video_thumbnail()` is called in a loop for that post. = 0.3 = * Added basic support for Blip.tv auto embedded using URLs in this format: http://blip.tv/file/12345 = 0.2.3 = * Added support for any Vimeo URL = 0.2.2 = * Added support for [Vimeo Shortcode](http://blog.esimplestudios.com/2010/08/embedding-vimeo-videos-in-wordpress/) = 0.2.1 = * Added support for Vimeo players embedded using an iframe = 0.2 = * Added `get_video_thumbnail()` to return the URL without echoing or return null if no thumbnail is found, making it possible to only display a thumbnail if one is found. = 0.1.3 = * Fixed an issue where no URL was returned when Vimeo's rate limit had been exceeded. The default image URL is now returned, but a future version of the plugin will store thumbnails locally for a better fix. = 0.1.2 = * Fixed a possible issue with how the default image URL is created = 0.1.1 = * Fixed an issue with the plugin directory's name that caused the default URL to be broken * Added support for YouTube URLs = 0.1 = * Initial release == Upgrade Notice == = 1.0 = This is the single biggest update to Video Thumbnails so far, so be sure to check out the new settings page and documentation. = 0.5 = This version adds the thumbnail URL to the post's meta data, meaning any outside APIs only have to be queried once per post. Vimeo's rate limit was easily exceeded, so this should fix that problem. == Known Issues == * While not really an issue, the current method for only displaying a thumbnail if one is found seems like it could be streamlined for less experienced users, so if you have any suggestions let me know. == Roadmap == This plugin is still very young, and has a future planned as the ultimate plugin for video thumbnails. Here's some of the planned additions: * Better Blip.tv support * More services * Universal plugin compatibility * Option to display video thumbnails on the admin post list page