Skip to content

Commit

Permalink
Add tag placeholder to video mode output
Browse files Browse the repository at this point in the history
  • Loading branch information
davidpede committed Nov 15, 2017
1 parent 9943c62 commit 05df7c4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion core/components/getyoutube/model/getyoutube/search.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ public function playlist($playlistUrl,$tpl,$tplAlt,$toPlaceholder,$pageToken,$to
$modx->setPlaceholder('thumbnail_large',$video['snippet']['thumbnails']['high']['url']); //480px wide and 360px tall
$modx->setPlaceholder('thumbnail_standard',$video['snippet']['thumbnails']['standard']['url']); //640px wide and 480px tall
$modx->setPlaceholder('thumbnail_maxres',$video['snippet']['thumbnails']['maxres']['url']); //1280px wide and 720px tall

/* SET TEMPLATES */
if (!empty($tplAlt)) {
if($idx % 2 == 0) { // Checks if index can be divided by 2 (alt)
Expand Down Expand Up @@ -157,6 +157,8 @@ public function video($videoUrl,$tpl,$tplAlt,$toPlaceholder,$totalVar){
$modx->setPlaceholder('channel_title',$video['snippet']['channelTitle']);
$modx->setPlaceholder('description',$video['snippet']['description']);
$modx->setPlaceholder('publish_date',$video['snippet']['publishedAt']);
$modx->setPlaceholder('tags',implode(", ", $video['snippet']['tags']));
/* SET IMAGE PLACEHOLDERS */
$modx->setPlaceholder('thumbnail_small',$video['snippet']['thumbnails']['default']['url']); //120px wide and 90px tall
$modx->setPlaceholder('thumbnail_medium',$video['snippet']['thumbnails']['medium']['url']); //320px wide and 180px tall
$modx->setPlaceholder('thumbnail_large',$video['snippet']['thumbnails']['high']['url']); //480px wide and 360px tall
Expand Down

0 comments on commit 05df7c4

Please sign in to comment.