Youtube Channel Integration Block

This is a spacer post for a website comment topic. The content this topic relates to: Youtube Channel Integration Block
Hi Jason. Some parts of this addon are no longer working (ie, lead text and pagination). Also the instructions for obtaining an API key need updating. Managed to recreate a similar output to your screenshot, though the Name field refused to take the channel ID and I cannot find a way to list recent uploads (maybe due to it not being a playlist). Would be nice to have a way to reverse the listing, so it picks the most recent video in a playlist if it cannot pull the  "feed?activity_view=1" data. First time I've tried this addon so perhaps I'm just not choosing the correct options.
No problem and no rush. I will send the relevant details now and thanks for responding.
Thanks for the report. I'll look into the issues and see what needs fixing. It'll probably take a few days since I'll have to read up on the YouTube API to see what has changed over the past two years. I'll also step through the setup process and update the documentation for obtaining the API key.

For the channel ID issue, can you provide the channel ID or possibly the whole comcode block code you used that didn't work as expected (in Whisper or Private Topic if you don't want to post it publicly)? It's possible it's incorrect options, but it's also very possible YouTube API changes are causing problems. For the sorting of the videos, the YouTube API once supported a way to select the sorting but for some odd reason YouTube removed it. I'll check to see if sorting has been brought back in the YouTube API.

Now that I have a better understanding of jQuery and AJAX, this addon could probably use an overhaul…the pagination should be more automatic and should just update the block element of the web page instead of having to manually create new pages with slightly different block parameters.
I've fixed the issue with the Name parameter not taking channel IDs. Until the update gets pulled into the compo.sr site, you can grab the files from GitHub and upload them over the existing files. The updated files are /sources_custom/blocks/youtube_channel.php and /lang_custom/EN/youtube_channel.ini. After updating the files, just prefix the channel ID with id= when entering it in the Name field...and be aware, entering anything in the Name field will override anything in the Playlist ID field. So if you enter a YouTube username or channel ID in the Name field and a playlist ID in the Playlist ID field, the block will only display the channel uploads playlist and ignore the Playlist ID field.

To address some of the other issues in more depth… The lead text parameters (formorelead, formoretext, and formoreurl) are only used in the template when the Style parameter is set to 3. The template(s) would need to be customised to include those parameters where desired. For pagination, the block itself doesn't do pagination internally. If you had a channel or playlist with 100 videos and wanted 10 videos per page, you would need to manually create 10 comcode pages, add the YouTube Channel block to each of those pages, and change the start_video block parameter on each comcode page (start_video=1, max_videos=10 for page 1, start_video=11, max_videos=10 for page 2, etc). For sorting/ordering videos, the YouTube Data API is limited as far as which API calls allow sorting. The PlaylistItems API call I am using doesn't have any sorting options available. For YouTube user created playlists, the ordering in the block will match the order in the playlist on YouTube. If you wanted a different order, you would have to create your own version of the playlist with the ordering you want and then use your newly created YouTube playlist in the YouTube Channel block. For the YouTube-created channel uploads playlist that contain all videos uploaded to a channel, the ordering should always be reverse order by date and time so the newest uploads are listed first.
Would be awesome if you could take the time to look at this addon again Jason. Doesn't seem to be working anymore.
This has been included in our Git repository for quite some time and hence also maintained by the core team and subject to sweeping changes across the code. It may be working in the v11 dev tree, I'm not sure.
That's all I have to say, just thought I'd mention to add some more context.
0 guests and 0 members have just viewed this.