<?php defined('_JEXEC') or die('Direct Access Denied'); require_once dirname(__FILE__) . '/helper.php'; if (isset($_POST['my_youtube_btn'])) { $jinput = JFactory::getApplication()->input; $youtube_link = $jinput->get('yt_link'); $helper = new YoutubeVideo($params); $youtube_duration =& $helper->youtube_duration($youtube_link); $youtube_title =& $helper->youtube_title($youtube_link); $youtube_description =& $helper->youtube_description($youtube_link); $youtube_publishedAt =& $helper->youtube_publishedAt($youtube_link); $youtube_statistics_dislikeCount =& $helper->youtube_statistics_dislikeCount($youtube_link); $youtube_statistics_likeCount =& $helper->youtube_statistics_likeCount($youtube_link); $youtube_statistics_viewCount =& $helper->youtube_statistics_viewCount($youtube_link); echo '<h1>' . $youtube_title . '</h1>'; echo '<p>Opis: <br> ' . $youtube_description . '</p>'; echo '<h3>Opublikowane: ' . $youtube_publishedAt . '</h3>'; echo '<span>Czas trwania: ' . $youtube_duration . '</span>'; echo '<p><span>Obejrzane: ' . $youtube_statistics_viewCount . '</span> | <span>Like: ' . $youtube_statistics_likeCount . '</span> | <span>DisLike: ' . $youtube_statistics_dislikeCount . '</span></p>'; echo '<iframe width="560" height="315" src="https://www.youtube.com/embed/' . $youtube_link . '" frameborder="0" allowfullscreen></iframe><br><hr>'; } else { require JModuleHelper::getLayoutPath('mod_youtubevideo'); }