SZ YouTube Plugin

14 januari, 2010

This widget displays a thumbnail list of the most recent videos from a selected youtube user or youtube tag in your sidebar.

Features

  • Lightbox support with Shadowbox JS.
  • The number of recent videos displayed can be configured
  • List videos uploaded by a specific user.
  • List videos tagged as favorites by a specific user.
  • List videos from a specific playlist.
  • Search for videos and display the results in a widget or a post/page.
  • Order the results by published, viewCount, rating or relevance.
  • Use short codes to add youtube video listings into your posts.

Screenies

Installation

  1. Upload the folder `subzane_youtube_plugin` to the `/wp-content/plugins/` directory
  2. Activate the plugin through the ‘Plugins’ menu in WordPress
  3. Add the widget to your sidebar
  4. For lightbox support download and install Shadowbox JS
  5. 5. To add listing inside posts use the shortcode [sz-youtube].

Important

If you get any T_OBJECT_OPERATOR error it means you are running PHP 4 when you should be running PHP 5 on your server. You’ll need to upgrade to PHP 5.

Fatal error: Call to undefined function: simplexml_load_file() also means that you’ll need to upgrade to PHP 5.

Shortcode syntax

Write like this [sz-youtube value="subzane" type="favorites" max="5" sortorder="viewCount"]

  • value = a username or a tag
  • type = tag/user/favorites
  • max = Max number of videos to list.
  • sortorder = published, relevance, viewCount or rating
  • autoplay = Autoplay videos in lightbox or not (1/0)
  • related = Display related videos or not (1/0)
  • lightbox = Use lightbox or not (1/0)
  • aspect = Aspect ratio (4:3, 16:9 or 16:10)
  • width = Width of the video. Height is calculated from width and aspect.
  • hd = HD Video if available (1/0)

Download

The latest version is 1.6.3 and was released on 2010-03-23. It’s compatible with WordPress 2.5 – 2.9.2.

To download head over to the WordPress Plugin directory

Support

Please keep all questions regarding this plugin in the comments below and please mind that writing these plugins is something I do on my free time so I won’t be able to update or fix bugs super fast.

Share & bookmark

Show your appreciation by sharing this with your network.

Facebook Twitter LinkedIn Digg Delicious Friendfeed Stumbler
  • Onemorerun2003
    Hi,

    I was hoping you could point me in the right direction. I am using the widget in the sidebar. I get no critical errors. I just can't seem to get the youtube video to open in the lightbox. It just opens in a new tab. I have checked the settings in the widget.

    I am wondering if there are particular settings in the JS Shadowbox that I need to tick off. I tried to play around with the Javascript library dropdown (jquery, mootools). Anything else? I do have the appropriate

    Also, I am working on this site locally. This shouldn't make a difference should it?
  • capricciolandia
    Hi, in my website I need to view widget horizzontally, how can I do?
  • The widget was pulling "2.jpg" for the thumbnail use (which was the element sored in the thumbnail[0] spot of that array). I re-wrote the section there to re-write the URL and use default.jpg instead (requested by a client), and I believe that will always pull the thumbnail they have set the movie to use. Snipit of the code is below if you're interested, it starts at line 99 of the plugin's php file.

    // get video thumbnail
    $attrs = $media->group->thumbnail[0]->attributes();
    $thumb = (string) $attrs['url'];
    $thumb = preg_replace("/[0-9].jpg/", "default.jpg", $thumb);

    $videoobj[$i]['thumb'] = (string) $thumb;
    $videoobj[$i]['title'] = (string) $media->group->title;
    $i++;
  • Anders
    Hej, finns det någon enkelt sätt att under den sista videon lägga in en länk till användarens Youtube-sida? Helst så att man själv kan välja vilken text det ska vara.
  • Hello, I have a similar question like cristina_cristina who asked if the size of the thumbnail can be increased? (My sidebar's width is 300 so I would like the thumbnail size to be that much too)

    Thanks for the awesome plugin!
  • Hello,

    I'm using WP2.9.2, SubZane YouTube Plugin 1.6.4 and a php template tag.

    I randomly have this error message :

    Warning: Invalid argument supplied for foreach() in /home/name/public_html/wp-content/plugins/subzane-youtube-recent-videos-widget/subzane_youtube_plugin.php on line 143

    Thanks for your help.

    Fabien
  • Mark
    Any news on compatibility with wp 3.0?
  • From what I can tell it works just fine on 3.0
  • Sureens
    Hi I love the plugin.
    Only prob is videos opens in the same page even if i selected the new window in settings
  • Sureens
    any idea how to solve it pls
  • is it normal that the widget isnt refreshing? I uploaded a new video and its stuck with yesterday's recent videos. am i doing something wrong?
  • oh it takes a very long whole, thats why.
  • Hi Id want to show ramdon videos on the sidebar, how can i acomplish this please
  • I'm using this without issue on my page www.tiredofit.ca - However, I'd like for the Widget Sidebar to have an option to display one video - RANDOMLY from a users collection of Videos. Is this possible? I'm currently doing it with Daikos widget, but it is conflicting with other lightbox plugins.
  • No random support at the moment but I can add the feature in the next version maybe. I have to look into how to do this best.
  • FYI Here is the shortcode I am using
    [sz-youtube][sz-youtube value="lifealmostlived" type="favorites" max="0" sortorder="published" autoplay ="1"]
  • Hey:
    Great plugin - I am trying to load it on a page and I get the thumbnail images from my favorites, but when I press to play all I get is a blank shadowbox and no video here is the shortcode I am using what could be wrong?

    Thanks,
    Jeff
  • I looks like PERFECT.
    But it worked for me... It show this error:

    "simplexml_load_file(http://gdata.youtube.com/feeds/api/videos?q=brasil&orderby=published&v=2) [function.simplexml-load-file]: failed to open stream: HTTP request failed! in C:\xampp\htdocs\testes\wp-content\plugins\subzane-youtube-recent-videos-widget\subzane_youtube_plugin.php on line 83"

    I'd like to use it... =/
  • Hello, I got this error:

    Warning: Invalid argument supplied for foreach() in ... /wp-content/plugins/subzane-youtube-recent-videos-widget/subzane_youtube_plugin.php on line 140

    When using the following shortcode in the page:
    [sz-youtube value="lshzds" type="favorites" max="0" sortorder="published"]

    Any ideas how to fix it?

    Thanks
  • Are you using the latest version? I get no errors using that short code
  • chrishoughton194
    Hi - great plugin thanks very much. It's going to make our news site so much better!

    I was wondering - in the list of videos shown, is it possible to show the number of views that video has received? Thanks for your help.
  • cristina_cristina
    Hello, how I can change the size of the thumb on my sidebar widget? Before that it open full sreen? Thank you
  • Hello, I first installed your plugin and it worked fantastically - thank you! However, after setting up and configuring your plugin, I then installed the Shadowbox JS plugin. After that was installed, your plugin disappeared! I mean, it was no long showing up in my sidebar and was no longer available (completely vanished) from the widgets setup page. I tried many things, and uninstalling Shadowbox JS was the only solution I found to get your plugin to come back (although I also had to reinstall your plugin after removing some extra entries in the wp_options table or else it wouldn't reappear). Any ideas on why this may be happening? I'd love to use shadowbox if I can.

    Thanks again for a great plugin, it's just what I needed!
  • ipadblogs
    Hi there, great plugin, I was wonderig, is there any way to get the video to play on our page instead of going to the youtube page?
  • you can install shadowbox and use the lightbox feature for the plugin.
  • ipadblogs
    Is there anyway to get this working without using flash?
    the lightbox part does not work on my ipad, and that is our target audience!

    we like the lightbox functionality for regular websites, but when I visit the link on my iPad, it does not work, is there any way to differentiate?

    say if use firefox lightbox is on, but when I visti from mobile device lightbox detects it and turns it off?
  • send me an ipad and I'll solve your problem :D

    Just kidding, but when I get an ipad I can look into the problem as it's difficult to test and bugfix what I cannot see :)

    I'll add it on my todo-list. Make it work on ipad!
  • ipadblogs
    hehe, ok thanx, that's all I can ask! in the mean time, our website viewers should just be content to let the link open to youtube!

    is there anyway we can make it open in a new tab or new browserscreen?
    we like our page to stay open when they click the link?
  • I think there already is a settings for open in new window from the widget settings. Doesn't it work?
  • ipadblogs
    We're using it on a page, not as a widget, is there a shortcode?
blog comments powered by Disqus

Denna blogg av Andreas Norman är licensierat under Creative Commons Erkännande-Dela Lika 2.5 Sverige License.

Tillstånd utöver denna licens kan vara tillgängligt från Andreas Norman.