WordPress plugin: Youtuber

YouTube logo

Youtuber has moved to WordPress.org. The information on this page is no longer maintained. Please see http://wordpress.org/extend/plugins/youtuber/ for the latest version of the plugin and documentation.

By default, embedded YouTube videos are 425 pixels wide, which is wider than the content column on Choking on Popcorn. To be able to easily resize and add cool videos to that site I copy-pasted together a very basic plugin for WordPress. It allows you to simply use something like [youtube ]xxxxxxxxx[/youtube] to embed the video. The ‘xxxxxxxxx’ bit needs to be replaced with the actual video’s ID of course. I know there are tons of plugins that do similar things and are vastly superior, but this one suits my needs perfectly.

The output is valid XHTML, and you can adjust the display size by editing the plugin a bit. The entire thing is only a few lines so you’ll have no trouble finding the dimensions in the code. Simply replace the numbers 425 (width) and 350 (height) with numbers that fit your site’s layout. Simply use the options panel under Options -> Youtuber.

Feel free to download it and play around with it a bit. If you make improvements or can think of a cooler name for the plugin, please let me know.

Download the Youtuber plugin at http://wordpress.org/extend/plugins/youtuber/

Installation

  • Download the zip file and unpack the file inside.
  • Upload this file to the wp-content/plugins folder on your server.
  • Activate it on WordPress’s ‘plugins’ tab.

To embed a video using the plugin, follow these steps:

  • Find the video on YouTube.
  • Extract the ID fromthe video page url. These look something like: http://youtube.com/watch?v=Krhl2o_uwdc. The bit I put in bold type is the ID.
  • Type [youtube ]Krhl2o_uwdc[/youtube] anywhere in your post. Leave out the space in the first tag.
  • Save and publish the post.

To change the display resolution for the videos:

  • Open youtuber.php in a text editor (I use Notepad++)
  • Find the numbers 425 and 350.
  • Replace these numbers with your preferred display dimensions. The control bar underneath the video is about 20 pixels high, so the height should ideally be 3/4 of the width plus 20 pixels.
  • Save the file and (re)upload to your plugins folder.
  • Go to Options -> Youtuber and type in the values that work for your blog.

History

  • Version 1.3 was the first to be hosted on WordPress.org, and released under GPL.
  • Version 1.2 adds better default values, case insensitive tags, and fixes an issue with WPMU.
  • Version 1.1 adds a basic options panel.
  • Version 1.0 was the initial release.

90 Comments

  1. Link: Weblog Tools Collection » Blog Archive » WordPress Plugin Releases for 8/28
  2. yes i have idea for the name “tube sizer” :)
    if u like it and decide to use it , pls refer me :)
    http://www.sunipeyk.com

    Comment by sunipeyk — August 28, 2007 @ 7:39 am

  3. I like the name YouTuber, so I’d stick with that :-) Cool plugin!

    Comment by suzero — August 28, 2007 @ 8:58 am

  4. Link: Poldis Blog - meine Welt
  5. Link: matthew trevino’s scarform.com » Blog Archive » Recap for August 23rd to the 28th (Wordpress)
  6. Link: pavl op ‘t web 2.0 » video
  7. Thanks for the plugin. I tried some other plugins, but they didn’t work. Yours is very simple and it does work!

    Comment by Paul — August 28, 2007 @ 8:07 pm

  8. Thanks Paul, that was what I was aiming for :)

    Comment by Roy — August 28, 2007 @ 8:46 pm

  9. This plugin was exactly what I was looking for. It was easy to get it up and running. Keep up the good work.

    Comment by me — August 29, 2007 @ 5:12 am

  10. Worked great on my page. Resizing was absolutely necessary and this worked without any fuss. Thanks a lot for the nice work.

    Comment by Christopher — August 29, 2007 @ 9:16 pm

  11. Link: Youtuber | わーどぷれすっ!
  12. Link: WordPress Plugins Database » Plugin Details » Youtuber
  13. After trying all the other You Tube plugins I decided to opt for your one as I could not get the others to work quickly enough. i am quite impatient and want things done for yesterday and your plugin did the trick.

    You can see the results at http://www.tipsfordogs.com Many thanks for the plugin!
    Haydn

    Comment by Haydn Tomas — September 17, 2007 @ 9:07 am

  14. Link: le junk
  15. hi, i’ve uploaded and activated the plugin into my wordpress 2.3. however when i type the code, e.g.: [youtube ]ID[/youtube] into my post, the youtube video didn’t display. kindly help…thank you very much….:)

    Comment by CE — October 12, 2007 @ 4:46 am

  16. i’ve manage to get this plugin works! thanks! sorry forgot to leave out the space in the code. hehe…. :P

    Comment by CE — October 12, 2007 @ 5:07 am

  17. Link: The Blog for DesignCreatology » Blog Archive » WP Plugs October 19, 2007
  18. Thank you! Thank you! I could not get a YouTube video to post on my site correctly until I tried your plugin. Works great and very easy! Love the name of it, too. Thanks!

    Comment by TLS — October 26, 2007 @ 7:39 pm

  19. Nice plugin! This is what i am looking for. Thank you. ^_^

    Comment by Direct Download Center — November 1, 2007 @ 4:31 pm

  20. Link: Wordpress plugins and themes for the week - Web 2.0 style
  21. Cool plugins that i’ve waiting for, thanks….

    Comment by juragan — December 9, 2007 @ 11:13 am

  22. it’s good to have this plugins for enbed my videos…

    Comment by Am — December 24, 2007 @ 8:14 pm

  23. Dude, thanks for making this so simple. Much appreciated, and great work. :-)

    Comment by Gav Reilly — January 13, 2008 @ 12:11 am

  24. Thanks for the plug in…I was having trouble embedding the vids. Looks great now, thanks for the work!

    Comment by joe | download 10000 BC full movie — March 2, 2008 @ 9:41 pm

  25. I found this site where they explain you how to get direct links to your website directly from you tube. Its cool. thanks

    Comment by Javier — March 8, 2008 @ 12:59 am

  26. hello,

    i personally use the plugin on my site,it’s simple and works great!

    a beginner or expert would love this kind of plugin

    regards

    Comment by funnyvideo! — March 11, 2008 @ 3:44 pm

  27. Hello,

    I did already the first step´s, but im stucking :(
    i don´t get this step :

    # Extract the ID fromthe video page url. These look something like: http://youtube.com/watch?v=Krhl2o_uwdc. The bit I put in bold type is the ID.
    # Type [youtube ]Krhl2o_uwdc[/youtube] anywhere in your post. Leave out the space in the first tag.
    # Save and publish the post.

    Where should i post it? in “Beitrag schreiben(write an article)” ?

    i hope somebody could help me … thanks

    Comment by Faro — March 11, 2008 @ 8:18 pm

  28. Hi Faro,

    Yes, the [youtube]id[/youtube] should go in your post. They’ll be replaced with the video when the page is called by a visitor.

    Comment by Roy — March 12, 2008 @ 8:40 am

  29. Nice job! I’ve tested it and it works great! Keep up the good work!

    Comment by Jw Bobbink SEO — March 18, 2008 @ 3:12 am

  30. Link: garcía-valenciano » Blog Archive » Wordpress toma las riendas…
  31. This is a great post and have kept it in my bookmarks. Will continue to read it as i’m very new to a lot of the points you mention!

    Thanks though, i’m glad some people share good stuff like this!

    Comment by Bob Mildon — June 9, 2008 @ 2:35 pm

  32. hi. Thanks for plugin

    perfect.

    Regards

    Comment by baron — August 24, 2008 @ 3:11 pm

  33. Link: Leonaut.com
  34. Your plugin works just fine in embedding youtube vids.

    The problem I have is admin side. When I go to options and change the width and height, after I click update I get sent to a blank page and none of the changes have been applied.

    There’s no problem in playing the videos but I cannot alter the default size from the ACP. My browser just redirects to a blank page. I’m using IE6 and WP2.6.1

    Comment by James — August 26, 2008 @ 4:24 pm

  35. Hi James. Thanks for bringing this to my attention. A fixed version is available now from wordpress.org.

    Comment by Roy — August 26, 2008 @ 6:11 pm

  36. Had a couple memory errors upon install. Third time was a charm.

    Comment by Pablo DiCiacco — August 27, 2008 @ 6:15 am

  37. It give me this error : “This video was embedded using the YouTuber plugin by Roy Tanck. Adobe Flash Player is required to view the video.” but i have the last version and the video doesn`t appear.

    Comment by Bogdan Radu — September 6, 2008 @ 12:37 pm

  38. Hi Bogdan. Hmmm, in Firefox (on Ubuntu) it looks fine. I’ll check with my Vista machine when I get the chance.

    Comment by Roy — September 6, 2008 @ 7:15 pm

  39. It is from plugin , until now i have this [youtube]http://www.youtube.com/1234567[/youtube], but now i must put only [youtube]1234567[/youtube], but i cant do that because I have some videos and its hard to change all.

    Comment by Bogdan Radu — September 7, 2008 @ 10:51 am

  40. Link: » Youtube Ofnature.org Backend Updates
  41. Hello, i modified you plugin – just add a new option in setting, “Video Quality”.

    If it checked, video on you site will be shown in high quality.

    I can send you a my little code for you plugin, please, contact with me.

    Comment by Igor A. Melekhine — September 18, 2008 @ 3:11 pm

  42. Link: 20款Youtube视频相关的WordPress插件 | 帕兰映像
  43. Link: WP Plugs October 19, 2007 « blog.designcreatology
  44. Link: Nowog.com » 20个可放Youtube视频的WordPress视频插件
  45. I’ll give it a serious try.
    It misses ONE thing to be rocking : read files with absolute path as the asysound player does..

    Comment by video — November 9, 2008 @ 11:38 pm

  46. A great plugin 4 sure.

    However… something that I miss is a button on the new / edit entry form.
    A button that by clicking it gives me the [youtube][/youtube] code where my marker is at.

    Just making it easier and quicker to use this great plugin.

    Do you get what I´m talking about?

    Something that you can fix?

    Thanks

    Comment by kim — January 2, 2009 @ 10:57 pm

  47. Hi Kim. I’ll look into that. I have no idea how to add buttons to the editor, bit it would indeed be great addition to the plugin. Thanks.

    Comment by Roy — January 3, 2009 @ 7:31 pm

  48. sounds great, it would be welcomed.
    tnx

    Comment by kim — January 4, 2009 @ 11:14 am

  49. Hi,

    I’ve downloaded your plugin and followed the directions to embed a video. I’ve checked and double checked the ID several times. The video is not posting. I’ve even tried selecting another random video just to see if it was the video. It did not work either.

    Any suggestions?

    Thanks.
    Lisa

    Comment by lisa — January 15, 2009 @ 1:35 am

  50. Link: Wordpress plugins and themes for the week - Web 2.0 style | aw-aw.com