TV for parsing name, description, image and embed-URL from YouTube-link
Version 1.4.0-beta
Release date 03.18.2022
Downloads 1 100
Views 2 596
Warning! This component requires PHP version 5.4 or higher! If your site uses PHP less than required, the installation of this package could break it.
Warning! This package requires MODX not less than 2.3 !

A small component that creates the new TV type — videoGallery. There you can insert a link to the YouTube video and get result in JSON in this TV value (it'll enough for Fenom). But also you can insert video data into document fields automatically, by specifying the required fields in the system settings of the component.

In order for the component to get the name and description of the video, it is necessary to enter in the settings YouTube Data API Key v3. Here is more information on how to get it —

The component uses 2 classes for processing links:

  1. videoThumb from Vasily Naumkin — Russian
  2. Panorama PHP from frandieguez —

Example of JSON field processing using Fenom (from pdoTools) tools:

{set $video_json = json_decode($_modx->, true)}
{if $}
	<div><img src="{$video_json.image}" /></div>
	<iframe width="860" height="650" src="{$video_json['video']}" frameborder="0" allowfullscreen></iframe>
	{if $video_json.title?}
		<div><b>Title:</b> {$video_json.title}</div>
	{if $video_json.desc?}
		<div><b>Description:</b> {$video_json.desc}</div>
	No video

Amount of the functions will be significantly expanded in the future.

Discussion of the component in the MODX.PRO community Russian

1.2.2-beta (11.01.2017)

  • Fixed a bug related to the TV output

1.2.1-beta (28.09.2016)

  • In the processor mgr/gallery/handle fixed incorrect processing for non-existent resources

1.2.0-pl (18.07.2016)

  • A time zone reset has been added to the video duration handler

1.2.0-beta (13.07.2016)

  • Added a section in the Manager with the ability to update the information of existing videos on the website