videoGallery

TV for parsing name, description, image and embed-URL from YouTube-link
Free
Download the package from the manager of your site.
How to download?
The author
Павел
Packages
32
Downloads
43 906
Автор дополнения
Packages
32
Downloads
43 906
Version 1.4.0-beta
Release date 03.18.2022
Downloads 1 095
Views 2 573
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 — developers.google.com/youtube/v3/getting-started?hl=ru


The component uses 2 classes for processing links:


  1. videoThumb from Vasily Naumkin — bezumkin.ru/sections/blog/441/ Russian
  2. Panorama PHP from frandieguez — github.com/frandieguez/Panorama-PHP

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


{set $video_json = json_decode($_modx->resource.video, true)}
{if $video_json.video?}
	<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}
	{if $video_json.desc?}
		<div><b>Description:</b> {$video_json.desc}</div>
	{/if}
{else}
	No video
{/if}

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