mirror of
https://github.com/DanielnetoDotCom/YouPHPTube
synced 2025-10-03 01:39:24 +02:00
Add PDF opening functionality and improve playlist handling
- Added translation for "Open PDF" in Portuguese locale. - Updated Video::getURL to support embedding. - Implemented automatic redirection to the current video in the playlist if available. - Enhanced row and row_info views to handle video type and display appropriate buttons. - Introduced deep-linking functionality for mobile app integration in open-in-app-button.php.
This commit is contained in:
parent
22407c9e24
commit
64b57d1b99
8 changed files with 240 additions and 187 deletions
|
@ -347,6 +347,7 @@ $t['Only direct mp4-files - if you download it with the link, it should be a mov
|
|||
$t['Only verified users can upload'] = 'Somente usuários verificados podem fazer upload';
|
||||
$t['Only you can see this, because you are an admin.'] = 'Só você pode ver isso, porque você é um administrador.';
|
||||
$t['Open pop-up Login window'] = 'Abrir janela pop-up para login';
|
||||
$t['Open PDF'] = 'Abrir PDF';
|
||||
$t['Order'] = 'Ordem';
|
||||
$t['Organize'] = 'Organizar';
|
||||
$t['Other Files'] = 'Outros arquivos';
|
||||
|
|
|
@ -5647,7 +5647,7 @@ if (!class_exists('Video')) {
|
|||
|
||||
public static function getURL($videos_id)
|
||||
{
|
||||
return self::getLink($videos_id, '', isIframe());
|
||||
return self::getLink($videos_id, '', isIframe() || isEmbed());
|
||||
}
|
||||
|
||||
public static function getLink($videos_id, $clean_title, $embed = false, $get = [])
|
||||
|
|
29
plugin/MobileYPT/open-in-app-button.php
Normal file
29
plugin/MobileYPT/open-in-app-button.php
Normal file
|
@ -0,0 +1,29 @@
|
|||
<?php
|
||||
$videos_id = getVideos_id();
|
||||
?>
|
||||
<button class="btn btn-primary">
|
||||
<span class="glyphicon glyphicon-phone"></span> <?php echo __('Open in the app'); ?>
|
||||
</button>
|
||||
|
||||
<script>
|
||||
/* Attempt deep-link first, fallback keeps user on the web page.
|
||||
Works on iOS & Android mobile browsers that allow custom-scheme redirect. */
|
||||
|
||||
$('#open-in-app').on('click', function (e) {
|
||||
e.preventDefault(); // stop immediate navigation
|
||||
var webURL = this.href; // original link
|
||||
var deepLink = 'ypt://video?videos_id=<?php echo $videos_id; ?>'; // build dynamically if preciso
|
||||
var timeout = 1200; // ms to decide fallback
|
||||
|
||||
/* Create hidden iframe (Android < 5) or set window.location (iOS/modern) */
|
||||
var clickedAt = +new Date();
|
||||
window.location = deepLink;
|
||||
|
||||
/* If after timeout the page hasn't switched, assume failure and stay */
|
||||
setTimeout(function () {
|
||||
if (+new Date() - clickedAt < timeout + 100) {
|
||||
window.location = webURL; // graceful fallback
|
||||
}
|
||||
}, timeout);
|
||||
});
|
||||
</script>
|
|
@ -153,6 +153,15 @@ $playListData_videos_id = getPlayListDataVideosId();
|
|||
|
||||
TimeLogEnd($timelogname, __LINE__);
|
||||
if (empty($playListData)) {
|
||||
$plp = new PlayListPlayer(@$_GET['playlists_id'], @$_GET['playlists_tags_id']);
|
||||
$video = $plp->getCurrentVideo();
|
||||
if (!empty($video)) {
|
||||
$url = Video::getURL($video['id']);;
|
||||
if (!empty($url)) {
|
||||
header('Location: ' . $url);
|
||||
exit;
|
||||
}
|
||||
}
|
||||
forbiddenPage(__("The program is empty"));
|
||||
}
|
||||
|
||||
|
@ -410,7 +419,7 @@ TimeLogEnd($timelogname, __LINE__);
|
|||
$('#mainVideo').bind('contextmenu', function () {
|
||||
return false;
|
||||
});
|
||||
|
||||
|
||||
addCloseButtonInVideo(<?php echo json_encode(!empty($_REQUEST['forceCloseButton'])); ?>);
|
||||
});
|
||||
|
||||
|
@ -457,4 +466,4 @@ TimeLogEnd($timelogname, __LINE__);
|
|||
|
||||
<?php
|
||||
include $global['systemRootPath'] . 'objects/include_end.php';
|
||||
?>
|
||||
?>
|
||||
|
|
|
@ -1,94 +1,95 @@
|
|||
<?php
|
||||
global $global, $config;
|
||||
|
||||
$playlists_id = intval(@$_REQUEST['playlists_id']);
|
||||
|
||||
if (empty($playlists_id)) {
|
||||
die('Playlist ID is empty');
|
||||
}
|
||||
|
||||
if (!isset($global['systemRootPath'])) {
|
||||
require_once '../../../videos/configuration.php';
|
||||
}
|
||||
_session_write_close();
|
||||
|
||||
$video = Video::getVideoFromSeriePlayListsId($playlists_id);
|
||||
if (empty($video)) {
|
||||
die('Video from playlist is empty ' . $playlists_id);
|
||||
}
|
||||
|
||||
if (empty($_REQUEST['uid'])) {
|
||||
$uid = uniqid();
|
||||
} else {
|
||||
$uid = preg_replace('/[^a-z0-0_]/i', '', $_REQUEST['uid']);
|
||||
}
|
||||
/*
|
||||
* If enable the cache the javascript fails due the uuid
|
||||
$uid = '{serie_uid}';
|
||||
|
||||
$cacheName = "modeFlixSerie" . md5(json_encode($_GET)) . User::getId();
|
||||
$cache = ObjectYPT::getCache($cacheName, 600);
|
||||
if (!empty($cache)) {
|
||||
echo str_replace('{serie_uid}', uniqid(), $cache);
|
||||
return false;
|
||||
}
|
||||
ob_start();
|
||||
*
|
||||
*/
|
||||
$obj = AVideoPlugin::getObjectData("YouPHPFlix2");
|
||||
|
||||
//if ($obj->PlayList) {
|
||||
$dataFlickirty = new stdClass();
|
||||
$dataFlickirty->wrapAround = true;
|
||||
$dataFlickirty->pageDots = !empty($obj->pageDots);
|
||||
$dataFlickirty->lazyLoad = true;
|
||||
$dataFlickirty->fade = true;
|
||||
$dataFlickirty->setGallerySize = false;
|
||||
$dataFlickirty->cellAlign = 'left';
|
||||
$dataFlickirty->groupCells = true;
|
||||
if ($obj->PlayListAutoPlay) {
|
||||
$dataFlickirty->autoPlay = 10000;
|
||||
$dataFlickirty->wrapAround = true;
|
||||
} else {
|
||||
$dataFlickirty->wrapAround = true;
|
||||
}
|
||||
$videos = PlayList::getAllFromPlaylistsID($playlists_id);
|
||||
|
||||
if (empty($videos)) {
|
||||
?>
|
||||
<div class="alert alert-info text-center" role="alert">
|
||||
<h4><?php echo __('No videos in this playlist yet'); ?>!</h4>
|
||||
<p><?php echo __('Please come back later'); ?>.</p>
|
||||
</div>
|
||||
<?php
|
||||
return;
|
||||
}
|
||||
|
||||
$uidFlickirty = uniqid();
|
||||
?>
|
||||
<div class="row topicRow" id="<?php echo $uidFlickirty; ?>-Flickirty">
|
||||
<!-- Serie -->
|
||||
<?php
|
||||
$rowPlayListLink = PlayLists::getLink($playlists_id);
|
||||
$rowPlayListLinkEmbed = PlayLists::getLink($playlists_id, true);
|
||||
include $global['systemRootPath'] . 'plugin/YouPHPFlix2/view/row.php';
|
||||
unset($rowPlayListLink);
|
||||
unset($rowPlayListLinkEmbed);
|
||||
?>
|
||||
</div>
|
||||
<script>
|
||||
startModeFlix('#<?php echo $uidFlickirty; ?>-Flickirty ');
|
||||
</script>
|
||||
<?php
|
||||
$rowlink = false;
|
||||
$rowlinkEmbed = false;
|
||||
//}
|
||||
/*
|
||||
$cache = ob_get_clean();
|
||||
|
||||
ObjectYPT::setCache($cacheName, $cache);
|
||||
|
||||
echo str_replace('{serie_uid}', uniqid(), $cache);
|
||||
*
|
||||
*/
|
||||
?>
|
||||
<?php
|
||||
global $global, $config;
|
||||
|
||||
$playlists_id = intval(@$_REQUEST['playlists_id']);
|
||||
|
||||
if (empty($playlists_id)) {
|
||||
die('Playlist ID is empty');
|
||||
}
|
||||
|
||||
if (!isset($global['systemRootPath'])) {
|
||||
require_once '../../../videos/configuration.php';
|
||||
}
|
||||
_session_write_close();
|
||||
|
||||
$video = Video::getVideoFromSeriePlayListsId($playlists_id);
|
||||
if (empty($video)) {
|
||||
die('Video from playlist is empty ' . $playlists_id);
|
||||
}
|
||||
|
||||
if (empty($_REQUEST['uid'])) {
|
||||
$uid = uniqid();
|
||||
} else {
|
||||
$uid = preg_replace('/[^a-z0-0_]/i', '', $_REQUEST['uid']);
|
||||
}
|
||||
/*
|
||||
* If enable the cache the javascript fails due the uuid
|
||||
$uid = '{serie_uid}';
|
||||
|
||||
$cacheName = "modeFlixSerie" . md5(json_encode($_GET)) . User::getId();
|
||||
$cache = ObjectYPT::getCache($cacheName, 600);
|
||||
if (!empty($cache)) {
|
||||
echo str_replace('{serie_uid}', uniqid(), $cache);
|
||||
return false;
|
||||
}
|
||||
ob_start();
|
||||
*
|
||||
*/
|
||||
$obj = AVideoPlugin::getObjectData("YouPHPFlix2");
|
||||
|
||||
//if ($obj->PlayList) {
|
||||
$dataFlickirty = new stdClass();
|
||||
$dataFlickirty->wrapAround = true;
|
||||
$dataFlickirty->pageDots = !empty($obj->pageDots);
|
||||
$dataFlickirty->lazyLoad = true;
|
||||
$dataFlickirty->fade = true;
|
||||
$dataFlickirty->setGallerySize = false;
|
||||
$dataFlickirty->cellAlign = 'left';
|
||||
$dataFlickirty->groupCells = true;
|
||||
if ($obj->PlayListAutoPlay) {
|
||||
$dataFlickirty->autoPlay = 10000;
|
||||
$dataFlickirty->wrapAround = true;
|
||||
} else {
|
||||
$dataFlickirty->wrapAround = true;
|
||||
}
|
||||
$videos = PlayList::getAllFromPlaylistsID($playlists_id);
|
||||
|
||||
if (empty($videos)) {
|
||||
?>
|
||||
<div class="alert alert-info text-center" role="alert">
|
||||
<h4><?php echo __('No videos in this playlist yet'); ?>!</h4>
|
||||
<p><?php echo __('Please come back later'); ?>.</p>
|
||||
</div>
|
||||
<?php
|
||||
return;
|
||||
}
|
||||
|
||||
$uidFlickirty = uniqid();
|
||||
?>
|
||||
<div class="row topicRow" id="<?php echo $uidFlickirty; ?>-Flickirty">
|
||||
<!-- Serie -->
|
||||
<?php
|
||||
$rowPlayListLink = PlayLists::getLink($playlists_id);
|
||||
$rowPlayListLinkEmbed = PlayLists::getLink($playlists_id, true);
|
||||
include $global['systemRootPath'] . 'plugin/YouPHPFlix2/view/row.php';
|
||||
unset($rowPlayListLink);
|
||||
unset($rowPlayListLinkEmbed);
|
||||
?>
|
||||
</div>
|
||||
<script>
|
||||
startModeFlix('#<?php echo $uidFlickirty; ?>-Flickirty ');
|
||||
</script>
|
||||
<?php
|
||||
$rowLinkType = '';
|
||||
$rowlink = false;
|
||||
$rowlinkEmbed = false;
|
||||
//}
|
||||
/*
|
||||
$cache = ob_get_clean();
|
||||
|
||||
ObjectYPT::setCache($cacheName, $cache);
|
||||
|
||||
echo str_replace('{serie_uid}', uniqid(), $cache);
|
||||
*
|
||||
*/
|
||||
?>
|
||||
|
|
|
@ -54,40 +54,41 @@ TimeLogStart($timeLog3);
|
|||
$cssClass = "posterPortrait";
|
||||
}
|
||||
|
||||
if(ImagesPlaceHolders::isDefaultImage($img)){
|
||||
if (ImagesPlaceHolders::isDefaultImage($img)) {
|
||||
$cssClass .= ' ImagesPlaceHoldersDefaultImage';
|
||||
}
|
||||
?>
|
||||
<div class="carousel-cell" >
|
||||
?>
|
||||
<div class="carousel-cell">
|
||||
<div class="tile">
|
||||
<div class="slide thumbsImage _<?php echo $uidOriginal; ?>" crc="<?php echo $uid; ?>"
|
||||
uidOriginal="<?php echo $uidOriginal; ?>"
|
||||
videos_id="<?php echo $value['id']; ?>"
|
||||
poster="<?php echo $poster; ?>"
|
||||
href="<?php echo Video::getLink($value['id'], $value['clean_title']); ?>"
|
||||
video="<?php echo $value['clean_title']; ?>"
|
||||
iframe="<?php echo $global['webSiteRootURL']; ?>videoEmbed/<?php echo $value['clean_title']; ?>"
|
||||
ajaxLoad="<?php echo $ajaxLoad; ?>">
|
||||
uidOriginal="<?php echo $uidOriginal; ?>"
|
||||
videos_id="<?php echo $value['id']; ?>"
|
||||
poster="<?php echo $poster; ?>"
|
||||
href="<?php echo Video::getLink($value['id'], $value['clean_title']); ?>"
|
||||
video="<?php echo $value['clean_title']; ?>"
|
||||
iframe="<?php echo $global['webSiteRootURL']; ?>videoEmbed/<?php echo $value['clean_title']; ?>"
|
||||
ajaxLoad="<?php echo $ajaxLoad; ?>">
|
||||
<div class="tile__media">
|
||||
<img alt="<?php echo str_replace('"', '', $value['title']); ?>"
|
||||
src="<?php echo ImagesPlaceHolders::getImageLandscape(ImagesPlaceHolders::$RETURN_URL); ?>"
|
||||
class="tile__img <?php echo $cssClass; ?> thumbsJPG img img-responsive carousel-cell-image" data-flickity-lazyload="<?php echo $img; ?>" />
|
||||
src="<?php echo ImagesPlaceHolders::getImageLandscape(ImagesPlaceHolders::$RETURN_URL); ?>"
|
||||
class="tile__img <?php echo $cssClass; ?> thumbsJPG img img-responsive carousel-cell-image" data-flickity-lazyload="<?php echo $img; ?>" />
|
||||
<?php if (!empty($imgGif)) { ?>
|
||||
<img style="position: absolute; top: 0; display: none;" src="<?php echo ImagesPlaceHolders::getImageLandscape(ImagesPlaceHolders::$RETURN_URL); ?>" alt="<?php echo $value['title']; ?>" id="tile__img thumbsGIF<?php echo $value['id']; ?>" class="thumbsGIF img-responsive img carousel-cell-image" data-flickity-lazyload="<?php echo $imgGif; ?>" />
|
||||
<img style="position: absolute; top: 0; display: none;" src="<?php echo ImagesPlaceHolders::getImageLandscape(ImagesPlaceHolders::$RETURN_URL); ?>" alt="<?php echo $value['title']; ?>" id="tile__img thumbsGIF<?php echo $value['id']; ?>" class="thumbsGIF img-responsive img carousel-cell-image" data-flickity-lazyload="<?php echo $imgGif; ?>" />
|
||||
<?php } ?>
|
||||
<?php
|
||||
if ($advancedCustom->paidOnlyShowLabels && $obj->paidOnlyLabelOverPoster) {
|
||||
foreach ($value['tags'] as $value2) {
|
||||
if (!empty($value2->label) && $value2->label === __("Paid Content")) {
|
||||
?><span class="paidOnlyLabel label label-<?php echo $value2->type; ?>"><?php echo $value2->text; ?></span><?php
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!empty($obj->titleLabel)) {
|
||||
?>
|
||||
<h4 style="<?php if (!empty($obj->titleLabelOverPoster)) { ?>margin-top: -27px;<?php } echo $obj->titleLabelCSS; ?> "><?php echo $value['title']; ?></h4>
|
||||
<?php
|
||||
}
|
||||
?><span class="paidOnlyLabel label label-<?php echo $value2->type; ?>"><?php echo $value2->text; ?></span><?php
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!empty($obj->titleLabel)) {
|
||||
?>
|
||||
<h4 style="<?php if (!empty($obj->titleLabelOverPoster)) { ?>margin-top: -27px;<?php }
|
||||
echo $obj->titleLabelCSS; ?> "><?php echo $value['title']; ?></h4>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<div class="progress" style="height: 3px; margin-bottom: 2px;">
|
||||
<div class="progress-bar progress-bar-danger" role="progressbar" style="width: <?php echo $value['progress']['percent'] ?>%;" aria-valuenow="<?php echo $value['progress']['percent'] ?>" aria-valuemin="0" aria-valuemax="100"></div>
|
||||
|
@ -96,17 +97,17 @@ TimeLogStart($timeLog3);
|
|||
if ($advancedCustom->paidOnlyShowLabels && !$obj->paidOnlyLabelOverPoster) {
|
||||
foreach ($value['tags'] as $value2) {
|
||||
if (!empty($value2->label) && $value2->label === __("Paid Content")) {
|
||||
?><div class="label label-<?php echo $value2->type; ?>" style="margin: 0; margin-top: -2px; width: 100%; display: block; border-top-left-radius: 0; border-top-right-radius: 0; "><?php echo $value2->text; ?></div><?php
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
?><div class="label label-<?php echo $value2->type; ?>" style="margin: 0; margin-top: -2px; width: 100%; display: block; border-top-left-radius: 0; border-top-right-radius: 0; "><?php echo $value2->text; ?></div><?php
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="arrow-down" style="display:none;"></div>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
<?php
|
||||
TimeLogEnd($timeLog4, __LINE__, $timeLog4Limit);
|
||||
}
|
||||
TimeLogEnd($timeLog3, __LINE__);
|
||||
|
@ -141,6 +142,7 @@ foreach ($videos as $_index => $value) {
|
|||
}
|
||||
TimeLogEnd($timeLog5, __LINE__, $timeLog5Limit);
|
||||
|
||||
$rowLinkType = $value['type'];
|
||||
if (!empty($rowPlayListLink)) {
|
||||
$rowLink = addQueryStringParameter($rowPlayListLink, 'playlist_index', $_index);
|
||||
$rowLinkEmbed = addQueryStringParameter($rowPlayListLinkEmbed, 'playlist_index', $_index);
|
||||
|
@ -157,7 +159,6 @@ foreach ($videos as $_index => $value) {
|
|||
include $global['systemRootPath'] . 'plugin/YouPHPFlix2/view/row_serie.php';
|
||||
TimeLogEnd($timeLog5, __LINE__, $timeLog5Limit);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
TimeLogEnd($timeLog3, __LINE__);
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
$timeLog6Limit = 0.4;
|
||||
$timeLog6 = "row_info.php {$value['clean_title']}";
|
||||
TimeLogStart($timeLog6);
|
||||
//var_dump(debug_backtrace());
|
||||
?>
|
||||
<!-- row_info start -->
|
||||
<div class="infoDetails">
|
||||
|
@ -139,6 +140,15 @@ TimeLogStart($timeLog6);
|
|||
}
|
||||
TimeLogEnd($timeLog6, __LINE__, $timeLog6Limit);
|
||||
$_GET = $get;
|
||||
if($rowLinkType === Video::$videoTypePdf){
|
||||
?>
|
||||
<button class="btn btn-danger playBtn <?php echo $canWatchPlayButton; ?>"
|
||||
onclick="avideoModalIframe('<?php echo $rowLinkEmbed; ?>');return false;">
|
||||
<i class="fas fa-file-pdf"></i>
|
||||
<span class="hidden-xs"><?php echo __("Open PDF"); ?></span>
|
||||
</button>
|
||||
<?php
|
||||
}else{
|
||||
?>
|
||||
<a class="btn btn-danger playBtn <?php echo $canWatchPlayButton; ?>"
|
||||
href="<?php echo $rowLink; ?>"
|
||||
|
@ -147,6 +157,7 @@ TimeLogStart($timeLog6);
|
|||
<span class="hidden-xs"><?php echo __("Play"); ?></span>
|
||||
</a>
|
||||
<?php
|
||||
}
|
||||
if (!empty($value['trailer1'])) {
|
||||
?>
|
||||
<a href="#" class="btn btn-warning" onclick="flixFullScreen('<?php echo parseVideos($value['trailer1'], 1, 0, 0, 0, 1); ?>', '');return false;">
|
||||
|
|
|
@ -1,61 +1,62 @@
|
|||
<div class="poster rowSerie" id="poster<?php echo $uid; ?>" poster="<?php echo $poster; ?>"
|
||||
style="
|
||||
display: none;
|
||||
background-image: url(<?php echo $global['webSiteRootURL']; ?>plugin/YouPHPFlix2/view/img/loading.gif);
|
||||
-webkit-background-size: cover;
|
||||
-moz-background-size: cover;
|
||||
-o-background-size: cover;
|
||||
background-size: cover;
|
||||
">
|
||||
<!-- row serie -->
|
||||
<div class="posterDetails " style="
|
||||
background: -webkit-linear-gradient(left, rgba(<?php echo $obj->backgroundRGB; ?>,1) 40%, rgba(<?php echo $obj->backgroundRGB; ?>,0) 100%);
|
||||
background: -o-linear-gradient(right, rgba(<?php echo $obj->backgroundRGB; ?>,1) 40%, rgba(<?php echo $obj->backgroundRGB; ?>,0) 100%);
|
||||
background: linear-gradient(right, rgba(<?php echo $obj->backgroundRGB; ?>,1) 40%, rgba(<?php echo $obj->backgroundRGB; ?>,0) 100%);
|
||||
background: -moz-linear-gradient(to right, rgba(<?php echo $obj->backgroundRGB; ?>,1) 40%, rgba(<?php echo $obj->backgroundRGB; ?>,0) 100%);">
|
||||
<div class="topicRow">
|
||||
<?php
|
||||
if (empty($obj->doNotShowSeriesInfoOnMainPage)) {
|
||||
?>
|
||||
<h2 class="infoTitle">
|
||||
<?php
|
||||
$rowLink = $link = PlayLists::getLink($value['serie_playlists_id']);
|
||||
$rowLinkEmbed = $linkEmbed = PlayLists::getLink($value['serie_playlists_id'], true);
|
||||
$canWatchPlayButton = "";
|
||||
if (User::canWatchVideoWithAds($value['id'])) {
|
||||
$canWatchPlayButton = "canWatchPlayButton";
|
||||
} else if ($obj->hidePlayButtonIfCannotWatch) {
|
||||
$canWatchPlayButton = "hidden";
|
||||
}
|
||||
$value['title'] = "<a href='{$link}' embed='{$linkEmbed}' class='{$canWatchPlayButton}'>{$value['title']}</a>";
|
||||
echo $value['title'];
|
||||
?>
|
||||
</h2>
|
||||
<div class="col-sm-12">
|
||||
<?php
|
||||
include $global['systemRootPath'] . 'plugin/YouPHPFlix2/view/row_info.php';
|
||||
?>
|
||||
</div>
|
||||
<?php
|
||||
} else {
|
||||
?>
|
||||
<h2 class="infoTitle pull-left">
|
||||
<?php
|
||||
$rowLink = $link = PlayLists::getLink($value['serie_playlists_id']);
|
||||
$value['title'] = "<a href='{$link}' embed='{$linkEmbed}' class='{$canWatchPlayButton}'>{$value['title']}</a>";
|
||||
echo $value['title'];
|
||||
?>
|
||||
</h2>
|
||||
<span style="margin-left: 5px;">
|
||||
<?php
|
||||
echo Video::generatePlaylistButtons($value['id'], 'btn btn-dark', 'background-color: #11111199;', false);
|
||||
?>
|
||||
</span>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<div id="ajaxLoad-<?php echo $uid; ?>" class="flickity-area col-sm-12"><?php echo __('Loading...'); ?></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="poster rowSerie" id="poster<?php echo $uid; ?>" poster="<?php echo $poster; ?>"
|
||||
style="
|
||||
display: none;
|
||||
background-image: url(<?php echo $global['webSiteRootURL']; ?>plugin/YouPHPFlix2/view/img/loading.gif);
|
||||
-webkit-background-size: cover;
|
||||
-moz-background-size: cover;
|
||||
-o-background-size: cover;
|
||||
background-size: cover;
|
||||
">
|
||||
<!-- row serie -->
|
||||
<div class="posterDetails " style="
|
||||
background: -webkit-linear-gradient(left, rgba(<?php echo $obj->backgroundRGB; ?>,1) 40%, rgba(<?php echo $obj->backgroundRGB; ?>,0) 100%);
|
||||
background: -o-linear-gradient(right, rgba(<?php echo $obj->backgroundRGB; ?>,1) 40%, rgba(<?php echo $obj->backgroundRGB; ?>,0) 100%);
|
||||
background: linear-gradient(right, rgba(<?php echo $obj->backgroundRGB; ?>,1) 40%, rgba(<?php echo $obj->backgroundRGB; ?>,0) 100%);
|
||||
background: -moz-linear-gradient(to right, rgba(<?php echo $obj->backgroundRGB; ?>,1) 40%, rgba(<?php echo $obj->backgroundRGB; ?>,0) 100%);">
|
||||
<div class="topicRow">
|
||||
<?php
|
||||
if (empty($obj->doNotShowSeriesInfoOnMainPage)) {
|
||||
?>
|
||||
<h2 class="infoTitle">
|
||||
<?php
|
||||
$rowLinkType = $value['type'];
|
||||
$rowLink = $link = PlayLists::getLink($value['serie_playlists_id']);
|
||||
$rowLinkEmbed = $linkEmbed = PlayLists::getLink($value['serie_playlists_id'], true);
|
||||
$canWatchPlayButton = "";
|
||||
if (User::canWatchVideoWithAds($value['id'])) {
|
||||
$canWatchPlayButton = "canWatchPlayButton";
|
||||
} else if ($obj->hidePlayButtonIfCannotWatch) {
|
||||
$canWatchPlayButton = "hidden";
|
||||
}
|
||||
$value['title'] = "<a href='{$link}' embed='{$linkEmbed}' class='{$canWatchPlayButton}'>{$value['title']}</a>";
|
||||
echo $value['title'];
|
||||
?>
|
||||
</h2>
|
||||
<div class="col-sm-12">
|
||||
<?php
|
||||
include $global['systemRootPath'] . 'plugin/YouPHPFlix2/view/row_info.php';
|
||||
?>
|
||||
</div>
|
||||
<?php
|
||||
} else {
|
||||
?>
|
||||
<h2 class="infoTitle pull-left">
|
||||
<?php
|
||||
$rowLink = $link = PlayLists::getLink($value['serie_playlists_id']);
|
||||
$value['title'] = "<a href='{$link}' embed='{$linkEmbed}' class='{$canWatchPlayButton}'>{$value['title']}</a>";
|
||||
echo $value['title'];
|
||||
?>
|
||||
</h2>
|
||||
<span style="margin-left: 5px;">
|
||||
<?php
|
||||
echo Video::generatePlaylistButtons($value['id'], 'btn btn-dark', 'background-color: #11111199;', false);
|
||||
?>
|
||||
</span>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<div id="ajaxLoad-<?php echo $uid; ?>" class="flickity-area col-sm-12"><?php echo __('Loading...'); ?></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue