Tag Archives: YouTube Layout

Add YouTube Layout to Google AJAX API

First things first, a big thanks to my friend Garry Conn for the great idea. Garry had a post this morning (Free YouTube Layouts) on how to add a You Tube layout to videos embedded in a blog post. I had not seen this done before and really liked the way it adds a little something to an otherwise plain video embed. Of course, the bad news is this caused me to get off track on my objectives for the day to see if I could do the same thing with the Google AJAX API videos, like I need any help getting off track.

By adding an image to the background and a few little tweaks of the CSS file I was able to get the same result. I think it actually helps augment the video player and video title. To see the results click on one of the URL’s below and click on a video in the left sidebar.

I placed this new page in its own folder to demonstrate the ability of making a dynamic page that can have different URL structures. Using PHP I setup a default variable or you can pass any variables to create the following.

  • Page Name
  • Page Title
  • Keywords
  • Description
  • API results

Examples : (default variable is “Blog Search”)

http://www.cybercoder.net/layout/

http://www.cybercoder.net/layout/You-Tube-Layouts

http://www.cybercoder.net/layout/You-Tube-Layouts/

http://www.cybercoder.net/layout/You-Tube-Layouts.html

The search box will pass input to PHP and the result will be displayed with the following URL. It is not hard to convert this search box to use any of the above URL structures.

http://www.cybercoder.net/layout/index.php?a=You+Tube-Layouts

This project took approximately 2 hours to complete. The bulk of the time was getting a good image formatted just right for the results. No programming was needed on the actual page as the CSS file took care of everything once the image was formatted. I also use the htaccess file to create the redirects for the multiple URL structures.