HTML Logo by World Wide Web Consortium ( Click to learn more about our commitment to accessibility and standards.

Moving forward with Composr

ocPortal has been relaunched as Composr CMS, which is now in beta. ocPortal 9 will be superseded by Composr 10.

Head over to for our new site, and to our migration roadmap. Existing ocPortal member accounts have been mirrored.

YouTube Channel Integration Block

**IMPORTANT** If you have a previous version of this addon installed, see before upgrading this addon!

Integrate YouTube channels and playlists into your web site. Specify a YouTube channel name, username, or playlist and some other parameters and you can integrate YouTube videos and video info in your web site. The block can automatically update with new content as it is added to the YouTube channel. This addon was developed under ocPortal v9.0.19, but should work for all 8.x and 9.x versions. The addon requires PHP with the JSON extension installed. You shouldn't have to worry about this unless you're running an older version of PHP (< v5.2) or a specially compiled stripped down version of PHP.  Changes in this updated version:

  • The block is updated to work with the YouTube Data API v3.
  • YouTube Data API v3 requires an API key. A block config option and block parameter have been added to allow you to specify your API key.
  • Added support for specifying playlist IDs.
  • The orderby block parameter no longer functions due to changes in the YouTube Data API v3. It is left in for backward compatibility, but it doesn't do anything.
  • You won't be able to use the start_video parameter to pull video results beyond the 50 video return result limit of the YouTube API call. The v3 API implements a new next-page/prev-page mechanism that I won't be implementing in this block. You can still use the start_video parameter. For example, you can define one youtube_channel block with a start_video of 1, max_videos of 1, and a style of 2, then another youtube_channel block under it with a start_video of 2, max_videos of 9, and style of 3, to give you a page of 10 videos where the first video uses style 2 and the remaining 9 use style 3.
  • Shortened version of the descriptions are now available with the {DESCRIPTION_SHORT} tempcode.
  • Star rating images are no longer being served by YouTube so I have now included them with the addon.
  • Added two new thumbnail options (6 = Standard definition and 7 = Max resolution). They aren't available for all videos, so they may not be very useful. Thumbnails 3, 4, and 5 are no longer returned by the API calls but seem to still be available when calling their links, so I've left them in for backward compatibility and manually build the links to these three thumbnails.
  • Some minor bug fixes and code cleanup, and heavy commenting of the code.

You can get detailed instructions on template usage in the YouTube Channel Integration discussion topic here:

NOTE: If you have upgraded this addon without reading the instructions and are having problems, you should be able to quickly recover by uninstalling the addon and reinstalling it.