WPreso Video FeatureBox is a WordPress plugin that allows you to create a list of Featured Videos slides from your video posts or video category.

It looks through the post, finds the video, gets the image for the video and displays this image along with an excerpt of the post.

All images are cached and if one of the other video plugins from WPreso is used, the same image cache is used, to save space and speed up performance.

Installation

  1. Upload the whole plugin folder to your /wp-content/plugins/ folder.
  2. Go to the Plugins page and activate the plugin.
  3. Activate the plug-in as usual.
  4. Click the Settings link to customize the settings.

Documentation

Options

All options are optional and when set will override the defaults set in the settings page.

title Adds a h2 heading to the FeatureBox.
cat Takes the category ID number, separate multiple category IDs by comma (,). If you wish to exclude a category, add a minus sign in front (-1). If it is not set, all categories will be used.
num Takes the number of posts you would like to check for videos. If a post does not contain a video, it will be excluded, but will still count as one of these numbers. So lets say you want the FeatureBox to show the last 5 posts, but post number 3 does not have a video, it will then only show 4 posts in the FeatureBox.
off Takes the offset number that you would like the FeatureBox to start at. Lets say you are using one of the other WPreso Video Plugins to display the first 5 video posts of a category. Then you can exclude the first 5 posts from that category in the FeatureBox by setting an offset.
ran Can be set to “true” (lowercase) and will display random posts from the selected categories.
exi Takes the ID numbers of posts that you would like to exclude. Lets say you have a special post or you know that this post will not contain a video, you can exclude it by adding the posts ID number here. To exclude multiple posts, separate them by comma (,).
ani Can be set to “true” (lowercase) and will enable the slides to slide automatically.
ans Takes the number of seconds you would like the animation to take. Only works if animation is set to true. Default is 5 seconds.

Shortcodes

To add the WPreso Video FeatureBox inside a post or page, use the shortcode
[wpvfb].
All options are optional and when set will override the defaults set in the settings page.
Here is how the options will look when using shortcodes.

title [wpvfb title="Featured Videos"] will display a h2 heading inside the FeatureBox.
cat [wpvfb cat="1,-2,4"] will display posts with videos from category 1 and 4 but exclude posts with videos from category 2.
num [wpvfb num="5"] will display 5 post with videos, if one of the 5 posts does not contain a video it will be skipped and it will then only display 4 posts.
off [wpvfb off="5"] will display posts starting from the sixth post.
ran [wpvfb ran="true"] will enable random posts.
exi [wpvfb exi="1,2,10"] will exclude the posts with the IDs 1, 2 and 10.
ani [wpvfb ani="true"] will enable slide animation, so that the slides change automatically.
ans [wpvfb ans="7"] will delay the slide animation with 7 seconds, default is 5 seconds.

Theme functions

To add the WPreso Video FeatureBox inside Theme, use the function
<?php echo wpreso_videofeaturebox();?>.
All options are optional and when set will override the defaults set in the settings page.
Here is how the options will look when using the function.

title <?php echo wpreso_videofeaturebox("Featured Videos");?> will display a h2 heading inside the FeatureBox.
cat <?php echo wpreso_videofeaturebox("","1,-2,4");?> will display posts with videos from category 1 and 4 but exclude posts with videos from category 2.
num <?php echo wpreso_videofeaturebox("","","5");?> will display 5 post with videos, if one of the 5 posts does not contain a video it will be skipped and it will then only display 4 posts.
off <?php echo wpreso_videofeaturebox("","","","5");?> will display posts starting from the sixth post.
ran <?php echo wpreso_videofeaturebox("","","","","true");?> will enable random posts.
exi <?php echo wpreso_videofeaturebox("","","","","","1,2,10");?> will exclude the posts with the IDs 1, 2 and 10.
ani <?php echo wpreso_videofeaturebox("","","","","","","true");?> will enable slide animation, so that the slides change automatically.
ans <?php echo wpreso_videofeaturebox("","","","","","","","7");?> will delay the slide animation with 7 seconds, default is 5 seconds.

CSS

These are the default CSS rules, but you may override them at any time via your own CSS rules.

.VideoFeatureBox { position:relative;	width: 938px;	height: 348px;	margin: 0 auto;	padding: 0;	background:#ebebeb; clear: both; border:1px solid #fff;  -moz-border-radius:5px; -webkit-border-radius: 5px; overflow:hidden;}
.VideoFeatureBox h2{ position:absolute; top:10px; left:10px; z-index:1; color:#1c1c1c !important; margin:0; font-size:28px;}
#jFlowSlide{ float: left;}
.controlswrap{margin:0 0 4px 5px; overflow:hidden;}
.controllers{float:left; margin:7px 0;}
.controllers span{	text-indent:-10000px; background:#ebebeb; border:1px solid #ccc; cursor:pointer;	height:8px;	width:8px;	display:block;	float:left;	margin:0 4px 0 0; -moz-border-radius:25px; -webkit-border-radius: 25px;}
.controllers span:hover{ background:#ccc; border-color:#999;}
.controllers span.jFlowSelected {background:#1c1c1c; border-color:#666;}
.jFlowPrev{	float: left;	width: 24px;	height: 24px;	margin: 0 5px 0 0;	text-indent:-10000px;	cursor:pointer;	background: transparent url('../images/prev.png') -5px -5px no-repeat;}
.jFlowPrev:hover{background-position:-5px -39px;}
.jFlowNext{	float: left;	width: 24px;	height: 24px;	margin: 0 0 0 5px;	text-indent:-10000px;	cursor:pointer;	background: transparent url('../images/next.png') -5px -5px no-repeat;}
.jFlowNext:hover{background-position:-5px -39px;}
.wpvfb_slides{overflow:hidden;}
.featbox_lft{	float:left;	margin:	45px 0 0 30px;	width:300px;	height:255px;}
.featbox_lft h3 a{	color:#158BB7 !important;	text-decoration: none;	}
.featbox_lft h3 a:hover{	color:#484848;	text-decoration: none;}
.featbox_lft h3{	color:#B71517;	}
.featbox_lft p{	font-size: 1.2em;	line-height: 1;	margin-bottom: .15em; color:#000; 	}
.featbox_rgt{ position:relative; float:right;	margin:52px 30px 0 0;	padding: 11px 0 0 42px;	width:458px;	height:237px;	background:transparent url('../images/frame.png') top left no-repeat;	}
.featbox_rgt img{	width: 413px;	height: 212px;	border: none;	}
.featbox_rgt em{position:absolute; right:55px; bottom:35px; width:34px;height:34px;background:transparent url('../images/next.png') 0px -34px no-repeat; display:block;}

Cache

The Video Images are cached for improved performance. The Video Image Cache directory is located in the wp-content folder and is called wpreso-video-cache. The reason it is located there is to have one cache folder for all WPreso video plugins, that is not deleted when the plugins are updated.

Localization

The plugin is currently available in:

  • English
  • Danish

If you have a translation for this plugin, please send it to trans[at]wpreso.com and mark it with the featurebox and your name, so that you may get credit for your work.

Demo

You can see this plugin in action at the showcase site WPVideoTutorialSite.com.

Screenshots

WPreso Video FeatureBoxWPreso Video FeatureBoxWPreso Video FeatureBox

Requirements

Has been tested with WordPress 2.8+.
Requires the <?php wp_head(); ?> hook for the css and javascript to be loaded.
Works well with Viper’s Video Quicktags.
Only works with the following video sites:

  • Blip.tv
  • Dailymotion
  • Google Video
  • Metacafe
  • Myspace
  • Viddler
  • Vimeo
  • Youtube

Changelog

0.2 Removed dependency on deprecated function mime_content_type() for CSS inclusion.
0.1 Initial release.

Download

Download

License

My part in the plugin is released under the X11 (MIT) License.
jFlow is also released under the X11 (MIT) license.

Credits