Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

All other Modules /

Discuss all other Modules here.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Youtube Module / Widget not working


Reply


2 Posts   1734 Views

Avatar
lazerscience

Community Member, 16 Posts

13 August 2009 at 9:56pm

Hi,
I have installed the youtube module, but it doesnt display me any videos. I have tracked the problem down to the line

$results->push(new ArrayData($data));


in YoutubeService / getVideosFeed()! $data looks ok to me, also the transformation via new ArrayData.... seems to work, but result stays empty!
Any fast help is appreciated!

Avatar
lazerscience

Community Member, 16 Posts

14 August 2009 at 3:48am

Could figure it out now. The spelling was somehow a little bit different in YoutubeWidget.php than in YoutubeService.php!
Change YoutubeWidget.php to

   foreach($videos as $video) {
         $videoId = array_pop(explode("/", $video->id));   
         
         $output->push(new ArrayData(array(
            "Title" => $video->Title,
            "Link" => $video->PlayerURL,
            "Image" => $video->SmallThumbnail->URL,
            "Duration" => $video->RuntimeMin
         )));
         
      }

and you have it working again!