Welcome to the Personal Website of George Michael Huff
mytube wordpress plugin
By George Huff
So far Wordpress has been impressing me left and right. The plugin developers are building some amazing stuff that integrates so well that my job of building the site becomes effortless. My good friend Nicholas Galanin wanted to have his YouTube videos pull into his site. While there was definitely assumption on my behalf that there would be someone out there that had developed a plugin, there was still uncertainty.
Enter MyTube.
Some guy named VaamYob created this plugin for reasons he states on his site, “This is a plugin that I wrote because I thought videos would look cool on my site. ” While VaamYob did a great job with the plugin, the documentation across the net was sparse. I decided to give a quick rundown of how I integrated MyTube into http://www.nicholasgalanin.com.
Being a bit afraid of php, I did the following in this order, searched VaamYob’s site, searched wordpress support, googled it, and then looked into the code. As one can guess, there were no answers any of these places for what I was trying to do. Nicholas wanted to have videos showing in a sidebar, not as an entry, anyone can post YouTube code in an entry.
1) The plugin files I used:
mytube.php
thetube.php
2) Editing mytube.php
Around line 148 there is a comment about providing flexibility (hey what do ya know!?) which lists out different functions to call. I’m not sure what each one does, I picked the one I wanted out at the top, yt_output_user_thumbs.
Call the funtion in your sidebar, or wherever else you want to call with:
<?php yt_output_user_thumbs(); ?>
3) Editing thetube.php
This file is just like a template. I stripped out everything but the call to the video and then copied my header and footer from the video list page and pasted it above and below, respectively. There is some code that says “don’t delete” so…don’t delete it. Upload everything and watch it work.
4) Styling everything
The plugin comes with some recommended classes, so I used those. Here is the code to make the image float to the left and have the description (which can be turned on in the options within wordpress) float to the right.
div.yt_video_thumb_img img {
float: left;
margin-right: 10px;
margin-bottom: 10px;
clear: both;
}
div.yt_video_thumb_img div.yes {
float: left;
overflow: hidden;
width: 150px;
}
And that’s it! Pretty simple, now there is documentation. Check it out.
Popularity: 13% [?]
Comments for mytube wordpress plugin
You Say about mytube wordpress plugin
Recent Entries
Welcome to the Website of Eleven3. I like to build clean websites, period.
This Is George Huff
He is a web designer / entrepreneur / conspirator / blogger / fianceé living in Portland, Oregon.
When not fully immersed building websites, he runs a record label, writes music, throws a music festival, grows vegetables, and happens to be a huge advocate of his friends and family.
Currently My Latest Twitter
it's slowly turning into a work night. Gotta say it is going to be tough getting anything done on a Sunday for awhile. 5 hrs ago Follow Me
Featured Work My Portfolio
Topics You've made it this far
- Alaska
- Apple
- Applications
- Browsers
- Business
- CMS(s)
- Community
- Conferences
- CSS
- Education
- Freelance
- General
- HomeSkillet Records
- How To
- Inspiration
- Internet
- JavaScript
- Marketing
- Microsoft
- Partners
- PDX
- Plug-Ins
- Portfolio
- Print Design
- Pub-Love
- Ruby On Rails
- Standards
- SXSW
- Uncategorized
- Usability
- We The Media
- Web Design
- Web Services
- XHTML
















Comments
Add Yours