I've created a small script that lets novice to experienced webmasters and blog owners include a block of YouTube video thumbnails on any place in your website. You can include: playlist videos, user videos, search result videos, and for example a interactive YouTube search.
This generator will help you create the full code needed to get this all working. You can copy & paste this into your website and your are done.
The installation is very simple, provides super fast results, and has a wide set of features. Lets continue with some examples:
To install the YouTube video thumbnail results you can use the generator or follow the instruction below.
First: download this javascript file (4kb), and upload it to your server. On the page that you want the YouTube video thumbnail results to appear include this line in your document (remember to replace yvoschaap.com, with your location of the file):
<script src='http://www.yvoschaap.com/ytcp.js' type="text/javascript"></script>
Up next is finding a nice spot where you want to have the YouTube video thumbnails. Insert there this html code that creates a block with the ID youtubeDiv (must be unique).
<div id="youtubeDiv"></div>
Directly below the code provide the configuration of the YouTube video thumbnails you want to show. An example:
<script type="text/javascript">insertVideos({'block':'youtubeDiv','type':'search','q':'baby laughing','results':'4','order':'new_first'});</script>
The detailed explanation is below, but this code will do a YouTube video search on the newest videos uploaded on "baby laughing" and have 4 thumbnails returned that link to the YouTube video player.
And now comes the part to configure the script to your liking. You must tell the script what kind of videos you want to display on your page, this is done by providing several settings. You can do this by hand as explained below, or with our generator. The settings that are available:
You use these settings by placing them in this template style 'what':'value'. Separated by a comma. This is then placed within this function insertVideo({'what':'value','what2':'value2'}); surrounded by <script type="text/javascript"> tags, again an example below:
<script type="text/javascript">
insertVideos({'block':'youtubeDiv','type':'search','q':'baby laughing'});
</script>
This piece of script is added below your <div id="youtubeDiv></div>.
To see the non-minified version of the script check it our here the script is freely usable and adjustable. For a more advanced explanation of the YouTube data API and JSON check this article. And if yo think all of this was all too complicated we have a final resort here.
More scripts and other webmaster resources @ yvoschaap.com.