DISQUS

SubZane Blog: SZ YouTube Recent Videos Widget

  • Clem Stein · 9 months ago
    How do I have videos sent to a lightbox style pop-up instead of redirecting to Youtube website?

    Clem
  • Andreas Norman · 6 months ago
    I've added lightbox support for the plugin now :)
  • MD · 5 months ago
    Have lightbox (shadow JS) installed but the videos are still showing as a full youtube page and not a popup.
  • Tim Wheatley · 9 months ago
    Hi,

    I would like to put this in my template, I don't use the widgetized sidebar... Slight noob too.. Can you tell me how I would get it in my template?

    Thanks,

    Tim.
  • Andreas Norman · 6 months ago
    To display it in your template this should work:

    if(function_exists("subzane_youtube_recent_videos_widget")) {
    subzane_youtube_recent_videos_widget();
    }
  • simon · 9 months ago
    I did it like you said above,but it looks like not very well.
  • nathan · 9 months ago
    Hi, I'm trying to use this plugin but I get an error when I try to activate. I get a Parse error: syntax error, unexpected T_OBJECT_OPERATOR on line 58.
    Any help?
    much appreciated, I think this plugin is exactly what I need. thanks.
  • Andreas Norman · 6 months ago
    You need to upgrade from PHP4 to PHP5 for it to work.
  • Paul · 9 months ago
    I'm also trying to install this plugin, but I get a fatal error -
    Parse error: syntax error, unexpected T_OBJECT_OPERATOR in /hermes/web09c/b2897/hoc.obiwayne/wordpress/wp-content/plugins/subzane-youtube-recent-videos-widget/subzane-youtube-recent-videos-widget.php on line 58

    Can you help? Thank you.
  • ed adkins · 8 months ago
    @Andreas Norman

    I'm attempting to place this in an area that's not in my sidebar, and I see that you've posted the code to do so, but I don't know how to place the parameters for 'type' or 'url'. Each thing I've tried has broken it.

    Could you post some more detailed instructions for what to place if you're not using this in a widget-enabled area or template?

    Thanks! Great plugin!
  • Andreas Norman · 8 months ago
    Sorry but in this version you'd have to first place it as a wdiget, set the parameters and then remove the widget from the sidebar and then place it anywhere you want using the code above.

    This is because it only reads from the settings and takes no params. But I'll add a todo so the next version also can take parameters.
  • Big Al · 8 months ago
    How do I get the thumbnails to be centered in the display? I like my text left-aligned and images centered in the sidebar. Thanks for the help & the plug-in.
  • michael kane · 8 months ago
    How can I change thumbnail size appearing on the blog.

    Thanks.
  • Andreas Norman · 8 months ago
    @michael kane You can't. Not in the current version that is. The size of the thumbnails I get is the ones given to me by youtube. You could edit the plugin to set the width and height of the IMG tag to be smaller if you wish however.
  • Ben · 8 months ago
    Thanks for the great plugin! Any possibility of producing something similar for Google videos? :-)

    Thanks.
  • michaelkane · 8 months ago
    Hi,

    Thanks for your comment. Your plugins is great and I would appreciate another upgrade sometime in the future. Would it be possible to give replacement code for increasing thumbnail sizes by adding pixels lets say increase/decrease 20 pixels width.height. I think the corresponding code is this.

    $str .= 'item($i)->nodeValue.'" src="'.$thumbnails->item($i)->getAttribute('url').'" height="'.$thumbnails->item($i)->getAttribute('height').'" width="'.$thumbnails->item($i)->getAttribute('width').'" />';

    Thanks!!
  • Jon · 8 months ago
    Hi,

    Is it possible to show the video title besides the thumbnail?
  • Andreas Norman · 8 months ago
    @Ben It might be possible for Google Videos. If they supply an RSS feed that is :)
  • Big Al · 7 months ago
    I had this installed on my site, and it not only broke the sidebar it was in, it also stopped the footer from displaying AND when I went to the widgets section of the admin, it stopped displaying all the widgets and the 'save' button. Just thought I'd let you know.
  • anon nyc · 7 months ago
    today just started getting errors like big al mentioned.

    i figure youtube changed something and there's no error handler in the widget?

    Warning: DOMDocument::load() [domdocument.load]: Document is empty in http://www.youtube.com/rss/user/xxx/videos.rss, line: 1 in /home/xxx/public_html/xxx.com/wordpress/wp-content/plugins/subzane-youtube-recent-videos-widget/subzane-youtube-recent-videos-widget.php on line 37

    Warning: DOMDocument::load() [domdocument.load]: Start tag expected, '<' not found in http://www.youtube.com/rss/user/xxx/videos.rss, line: 1 in /home/xxx/public_html/xxx.com/wordpress/wp-content/plugins/subzane-youtube-recent-videos-widget/subzane-youtube-recent-videos-widget.php on line 37

    Fatal error: Call to a member function getElementsByTagName() on a non-object in /home/xxx/public_html/xxx.com/wordpress/wp-content/plugins/subzane-youtube-recent-videos-widget/subzane-youtube-recent-videos-widget.php on line 40
  • WWIII · 7 months ago
    this is the error i get as well as the same symptoms reported by Big Al

    Fatal error: Call to a member function getAttribute() on a non-object in /home/wwiii/public_html/ipigals.com/wp-content/plugins/subzane-youtube-recent-videos-widget/subzane-youtube-recent-videos-widget.php on line 62

    any thoughts?
    thx
  • Andreas Norman · 7 months ago
    @Big Al @anon nyc

    I will look into the problems today and look for bugs. Thank you for reporting them to me.
  • Andreas Norman · 7 months ago
    Please post all bugs and issues to the Google Code page I've just setup. It will be easier to keep track of everything.

    http://code.google.com/p/subzane-youtube-recent...
  • Andreas Norman · 7 months ago
    @anon nyc @ Big Al I'm unable to recreate the problems you posted. Could write down the steps on how to reproduce them in the issue tracker?

    http://code.google.com/p/subzane-youtube-recent...
  • anon nyc · 7 months ago
    all i did was activate the plugin and widget (for specific youtube user feed). was working for a few weeks then suddenly the errors yesterday (maybe day before).
  • Andreas Norman · 7 months ago
    Then something must be up with that feed. What user feed is it?
  • anon nyc · 7 months ago
    felipepcs

    but the feed is fine as i'm able to parse it via simplexml_load_file and show thumbs/etc.

    truly odd.
  • Will · 7 months ago
    Same exact problem happened with me as Big Al posted above. Was working fine, then poof, as of this morning, none of my widgets were display and I found out it was because of this plugin. It made impossible to edit or save any of my widgets. I had to reset my widgets back to the wordpress default and remove the plugin in order to display any of my other sidebar items again.

    Also, I also agree that it would be great if this plugin could be called directly from anywhere within a theme.

    Thanks for all your hard work. Hope to hear of a "fix" for this latest problem. As it is now, I am unable to use the plugin.
  • anon nyc · 7 months ago
    however my code is directly doing:

    simplexml_load_file('http://gdata.youtube.com/feeds/api/users/felipepcs/uploads?max-results=10&orderby=updated');

    and not:

    http://www.youtube.com/rss/user/felipepcs/video...

    like the sz widget is trying (at least that's the error i see on the widget page/dashboard). which gives the first error of:

    Warning: DOMDocument::load() [domdocument.load]: Document is empty in http://www.youtube.com/rss/user/felipepcs
  • Andreas Norman · 7 months ago
    OK

    It seems that YouTube has changed their RSS feeds so now they are cluttered with huge amounts of HTML and the structure is way different. That's why the widget fails.

    I'll try and correct this ASAP.
  • Andreas Norman · 7 months ago
    I've fixed the bug. version 1.2 should soon be available for download as soon as Wordpress refreshes their repository.

    Thank you for the bug reports! :)
  • michael kane · 7 months ago
    Plugin broke after 1.2 update. Its not displaying anything once placed on top, and shows just the title when placed in the bottom of the widgets.

    Thanks.
  • Andreas Norman · 7 months ago
    @michael kane It works fine over here. What user/tag are you using?

    Again. It's _very_ difficult for me to track down bugs if the only information I get is "It doesn't work". I need more info to reproduce the error.
  • Mario · 7 months ago
    Warning: simplexml_load_file(http://gdata.youtube.com/feeds/api/videos/-/poker) [function.simplexml-load-file]: failed to open stream: Connection refused in /var/www/web272/html/wett-freund/wp-content/plugins/subzane-youtube-recent-videos-widget/subzane-youtube-recent-videos-widget.php on line 36
  • Andreas Norman · 7 months ago
    @Mario The "Connection refused" error suggests that there is something going wrong on the other end - you said you can connect manually so that's obviously not it.

    Are your server behind a proxy or something perhaps? Also check your PHP configuration. You'll need "allow_url_fopen = On" to be able to open remote files like this plugin does.
  • michael kane · 7 months ago
    To reproduce error:
    I used tag "morning musume" without "", 10 results, size 640 480, recent videos + lightbox support.

    I reverted back to version 1.1 and its working Fine here still.

    Thanks!
  • Mario · 7 months ago
    @ Andreas Norman: Thank you. It functions now, however 25 videos are indicated, although I adjusted 5 videos.
  • Andreas Norman · 7 months ago
    If you have patience with me I will release a new version pretty soon with some major bug fixes as well as new features :)
  • michael kane · 7 months ago
    Thanks for the update! But I am still having following error.

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

    I think your testing system might be an ideal environment, not supported everywhere.
  • Andreas Norman · 7 months ago
    @michael kane Make sure you're not using any spaces or stuff like that. If you wish to get videos with morning musume you'll need to type "morning-musume" without the quotes since they are two different keywords.
  • michael kane · 7 months ago
    Thanks it worked. may be you can include spaces support as someone might have the same problem, just a suggestion.
    Thanks again.
  • michael kane · 7 months ago
    hi, I am not sure if its a bug or not but for me script is showing most popular videos not the most recent ones.

    Thanks.
  • Andreas Norman · 7 months ago
    Hmm that might be possible. The whole feed API is quite confusing for me but I'm trying to figure it out :)

    The API if you're interested: http://tinyurl.com/c9tlcc
  • baron · 7 months ago
    Works great, thank you
  • michaelkane · 7 months ago
    working great, thanks!
  • Daryl · 7 months ago
    just installed it and nothing happens.. Title shows up on sidebar; thats about it.
  • aleks · 5 months ago
    Hey thanks alot for your contribution!
    any chance this will update for 2.8? also some more clear examples on the tags would helpful..
    regards
  • Maxy · 4 months ago
    hey, thankx for the plugin. Is there away to display the youtube user's FAVOURITE rather than recent UPLOADS? or even ALL?

    Thanks in advance,
    Maxy
  • huphtur · 4 months ago
    Yeah, I would like to know if that would be a possibility as well. Pull from favorites or playlists? Or does that require API interaction?
  • justinmoser · 4 months ago
    I have a problem, the menu i get for this widget is nothing like the one that your screens show, i can only post single videos, with their title and size, nothing else, whats going on? why is this?
  • davetesh · 3 months ago
    Hey How do I make it autoplay when they click one of the videos and it comes up on the shadow js?
  • Justin Moser · 2 months ago
    just a quick question,
    ive installed this plugin and used the widget in my sidebar, only thing bugging me is that the thumbnails and titles of the videos are left aligned…ive tried styling all the "li" and "ul" tagged elements of the widget in my css file and aligning them to center and using left and right auto margins etc but nothing seems to work…any suggestions?

    Thanks a lot :)

    Justin