mirror of
https://github.com/DanielnetoDotCom/YouPHPTube
synced 2025-10-04 10:19:24 +02:00
Merge origin/master
This commit is contained in:
commit
d3357dda15
46 changed files with 927 additions and 480 deletions
|
@ -59,7 +59,7 @@ $ogURL = Video::getLinkToVideo($videos_id);
|
||||||
<meta property="og:description" content="<?php echo $description; ?>" />
|
<meta property="og:description" content="<?php echo $description; ?>" />
|
||||||
<meta property="og:url" content="<?php echo $ogURL; ?>" />
|
<meta property="og:url" content="<?php echo $ogURL; ?>" />
|
||||||
<meta property="og:type" content="video.other" />
|
<meta property="og:type" content="video.other" />
|
||||||
<link rel=”canonical” href=”<?php echo $ogURL; ?>” />
|
<link rel="canonical" href="<?php echo $ogURL; ?>" />
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
$source = Video::getHigestResolution($video['filename']);
|
$source = Video::getHigestResolution($video['filename']);
|
||||||
|
|
|
@ -67,7 +67,7 @@ if(!empty($metaDescription)){
|
||||||
<meta property="og:title" content="<?php echo $title; ?>" />
|
<meta property="og:title" content="<?php echo $title; ?>" />
|
||||||
<meta property="og:description" content="<?php echo $description; ?>" />
|
<meta property="og:description" content="<?php echo $description; ?>" />
|
||||||
<meta property="og:url" content="<?php echo $url; ?>" />
|
<meta property="og:url" content="<?php echo $url; ?>" />
|
||||||
<link rel=”canonical” href=”<?php echo $url; ?>” />
|
<link rel="canonical" href="<?php echo $url; ?>" />
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
if (!empty($advancedCustom->twitter_summary_large_image)) {
|
if (!empty($advancedCustom->twitter_summary_large_image)) {
|
||||||
|
|
|
@ -1677,7 +1677,7 @@ function im_resizeV3($file_src, $file_dest, $wd, $hd) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function im_resize_gif($file_src, $file_dest, $max_width, $max_height) {
|
function im_resize_gif($file_src, $file_dest, $max_width, $max_height) {
|
||||||
if(class_exists('Imagick')){
|
if (class_exists('Imagick')) {
|
||||||
$imagick = new Imagick($file_src);
|
$imagick = new Imagick($file_src);
|
||||||
|
|
||||||
$format = $imagick->getImageFormat();
|
$format = $imagick->getImageFormat();
|
||||||
|
@ -1692,7 +1692,7 @@ function im_resize_gif($file_src, $file_dest, $max_width, $max_height) {
|
||||||
|
|
||||||
$imagick->clear();
|
$imagick->clear();
|
||||||
$imagick->destroy();
|
$imagick->destroy();
|
||||||
}else{
|
} else {
|
||||||
copy($file_src, $file_dest);
|
copy($file_src, $file_dest);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2157,7 +2157,7 @@ function combineFiles($filesArray, $extension = "js") {
|
||||||
$str = "";
|
$str = "";
|
||||||
$fileName = "";
|
$fileName = "";
|
||||||
foreach ($filesArray as $value) {
|
foreach ($filesArray as $value) {
|
||||||
$fileName .= $value;
|
$fileName .= $value.filectime($global['systemRootPath'] . $value).filemtime($global['systemRootPath'] . $value);
|
||||||
}
|
}
|
||||||
if ($advancedCustom != false) {
|
if ($advancedCustom != false) {
|
||||||
$minifyEnabled = $advancedCustom->EnableMinifyJS;
|
$minifyEnabled = $advancedCustom->EnableMinifyJS;
|
||||||
|
@ -2543,6 +2543,10 @@ function isMobile($userAgent = null, $httpHeaders = null) {
|
||||||
return $detect->isMobile($userAgent, $httpHeaders);
|
return $detect->isMobile($userAgent, $httpHeaders);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function isChannelPage(){
|
||||||
|
return strpos($_SERVER["SCRIPT_NAME"], 'view/channel.php') !== false;
|
||||||
|
}
|
||||||
|
|
||||||
function isAVideoMobileApp($user_agent = "") {
|
function isAVideoMobileApp($user_agent = "") {
|
||||||
if (empty($user_agent)) {
|
if (empty($user_agent)) {
|
||||||
$user_agent = @$_SERVER['HTTP_USER_AGENT'];
|
$user_agent = @$_SERVER['HTTP_USER_AGENT'];
|
||||||
|
@ -5899,7 +5903,7 @@ function getSocialModal($videos_id, $url = "", $title = "") {
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<center>
|
<center>
|
||||||
<?php include $global['systemRootPath'] . 'view/include/social.php'; ?>
|
<?php include $global['systemRootPath'] . 'view/include/social.php'; ?>
|
||||||
</center>
|
</center>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -6966,3 +6970,36 @@ function mysqlCommit() {
|
||||||
$global['mysqli']->commit();
|
$global['mysqli']->commit();
|
||||||
$global['mysqli']->autocommit(true);
|
$global['mysqli']->autocommit(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function number_format_short($n, $precision = 1) {
|
||||||
|
if ($n < 900) {
|
||||||
|
// 0 - 900
|
||||||
|
$n_format = number_format($n, $precision);
|
||||||
|
$suffix = '';
|
||||||
|
} else if ($n < 900000) {
|
||||||
|
// 0.9k-850k
|
||||||
|
$n_format = number_format($n / 1000, $precision);
|
||||||
|
$suffix = 'K';
|
||||||
|
} else if ($n < 900000000) {
|
||||||
|
// 0.9m-850m
|
||||||
|
$n_format = number_format($n / 1000000, $precision);
|
||||||
|
$suffix = 'M';
|
||||||
|
} else if ($n < 900000000000) {
|
||||||
|
// 0.9b-850b
|
||||||
|
$n_format = number_format($n / 1000000000, $precision);
|
||||||
|
$suffix = 'B';
|
||||||
|
} else {
|
||||||
|
// 0.9t+
|
||||||
|
$n_format = number_format($n / 1000000000000, $precision);
|
||||||
|
$suffix = 'T';
|
||||||
|
}
|
||||||
|
|
||||||
|
// Remove unecessary zeroes after decimal. "1.0" -> "1"; "1.00" -> "1"
|
||||||
|
// Intentionally does not affect partials, eg "1.50" -> "1.50"
|
||||||
|
if ($precision > 0) {
|
||||||
|
$dotzero = '.' . str_repeat('0', $precision);
|
||||||
|
$n_format = str_replace($dotzero, '', $n_format);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $n_format . $suffix;
|
||||||
|
}
|
||||||
|
|
|
@ -10,7 +10,7 @@ if (empty($advancedCustom->disableHTMLDescription)) {
|
||||||
?>
|
?>
|
||||||
<script>
|
<script>
|
||||||
tinymce.init({
|
tinymce.init({
|
||||||
language: "<?php echo $_SESSION['language']; ?>",
|
language: "<?php echo ($_SESSION['language']=='en_US')?'us':$_SESSION['language']; ?>",
|
||||||
selector: '#<?php echo $id; ?>', // change this value according to your HTML
|
selector: '#<?php echo $id; ?>', // change this value according to your HTML
|
||||||
plugins: 'code print preview fullpage searchreplace autolink directionality visualblocks visualchars fullscreen image link media codesample table charmap hr pagebreak nonbreaking anchor toc insertdatetime advlist lists wordcount imagetools textpattern help ',
|
plugins: 'code print preview fullpage searchreplace autolink directionality visualblocks visualchars fullscreen image link media codesample table charmap hr pagebreak nonbreaking anchor toc insertdatetime advlist lists wordcount imagetools textpattern help ',
|
||||||
//toolbar: 'fullscreen | formatselect | bold italic strikethrough forecolor backcolor permanentpen formatpainter | link image media pageembed | alignleft aligncenter alignright alignjustify | numlist bullist outdent indent | removeformat | addcomment',
|
//toolbar: 'fullscreen | formatselect | bold italic strikethrough forecolor backcolor permanentpen formatpainter | link image media pageembed | alignleft aligncenter alignright alignjustify | numlist bullist outdent indent | removeformat | addcomment',
|
||||||
|
|
|
@ -4444,7 +4444,7 @@ if (!class_exists('Video')) {
|
||||||
|
|
||||||
if (empty($advancedCustom->doNotDisplayViews)) {
|
if (empty($advancedCustom->doNotDisplayViews)) {
|
||||||
if (AVideoPlugin::isEnabledByName('LiveUsers')) {
|
if (AVideoPlugin::isEnabledByName('LiveUsers')) {
|
||||||
$viewsHTML = '<div class="text-muted pull-right" style="display:flex;font-size: 1.2em;">' . getLiveUsersLabelVideo($value['id'], $value['views_count']) . '</div>';
|
$viewsHTML = '<div class="text-muted pull-right" style="display:flex;">' . getLiveUsersLabelVideo($value['id'], $value['views_count']) . '</div>';
|
||||||
} else {
|
} else {
|
||||||
$viewsHTML = '<div class="text-muted pull-right"><i class="fas fa-eye"></i> ' . number_format($value['views_count'], 0) . '</strong></div>';
|
$viewsHTML = '<div class="text-muted pull-right"><i class="fas fa-eye"></i> ' . number_format($value['views_count'], 0) . '</strong></div>';
|
||||||
}
|
}
|
||||||
|
|
|
@ -60,6 +60,7 @@ $count = $obj->getViews_count();
|
||||||
$obj2 = new stdClass();
|
$obj2 = new stdClass();
|
||||||
$obj2->status = !empty($resp);
|
$obj2->status = !empty($resp);
|
||||||
$obj2->count = $count;
|
$obj2->count = $count;
|
||||||
|
$obj2->countHTML = number_format_short($count);
|
||||||
$obj2->resp = $resp;
|
$obj2->resp = $resp;
|
||||||
|
|
||||||
echo json_encode($obj2);
|
echo json_encode($obj2);
|
||||||
|
|
|
@ -35,7 +35,7 @@ foreach ($items as $item) {
|
||||||
<a class="h6 evideo" >
|
<a class="h6 evideo" >
|
||||||
<h2>...</h2>
|
<h2>...</h2>
|
||||||
</a>
|
</a>
|
||||||
<div class="text-muted galeryDetails" style="overflow: hidden;">
|
<div class="galeryDetails" style="overflow: hidden;">
|
||||||
<div>
|
<div>
|
||||||
<i class="fa fa-eye"></i>
|
<i class="fa fa-eye"></i>
|
||||||
<span itemprop="interactionCount">
|
<span itemprop="interactionCount">
|
||||||
|
|
|
@ -52,7 +52,7 @@ if (is_object($obj) && empty($obj->error)) {
|
||||||
$youtubeTitle = $video->title;
|
$youtubeTitle = $video->title;
|
||||||
$youtubeThumbs = $video->thumbnails;
|
$youtubeThumbs = $video->thumbnails;
|
||||||
?>
|
?>
|
||||||
<div class="col-lg-<?php echo 12 / $objGallery->screenColsLarge; ?> col-md-<?php echo 12 / $objGallery->screenColsMedium; ?> col-sm-<?php echo 12 / $objGallery->screenColsSmall; ?> col-xs-<?php echo 12 / $objGallery->screenColsXSmall; ?> galleryVideo thumbsImage fixPadding" style="min-height: 175px;" itemscope itemtype="http://schema.org/VideoObject">
|
<div class="col-lg-<?php echo 12 / $objGallery->screenColsLarge; ?> col-md-<?php echo 12 / $objGallery->screenColsMedium; ?> col-sm-<?php echo 12 / $objGallery->screenColsSmall; ?> col-xs-<?php echo 12 / $objGallery->screenColsXSmall; ?> galleryVideo thumbsImage fixPadding" style="min-height: 175px;">
|
||||||
<a class="evideo" href="<?php echo $youtubeEmbedLink; ?>" title="<?php echo $youtubeTitle; ?>">
|
<a class="evideo" href="<?php echo $youtubeEmbedLink; ?>" title="<?php echo $youtubeTitle; ?>">
|
||||||
<div class="aspectRatio16_9">
|
<div class="aspectRatio16_9">
|
||||||
<img src="<?php echo $youtubeThumbs; ?>" alt="<?php echo $youtubeTitle; ?>" class="thumbsJPG img img-responsive" />
|
<img src="<?php echo $youtubeThumbs; ?>" alt="<?php echo $youtubeTitle; ?>" class="thumbsJPG img img-responsive" />
|
||||||
|
@ -61,7 +61,7 @@ if (is_object($obj) && empty($obj->error)) {
|
||||||
<a class="h6 evideo" href="<?php echo $youtubeEmbedLink; ?>" title="<?php echo $youtubeTitle; ?>">
|
<a class="h6 evideo" href="<?php echo $youtubeEmbedLink; ?>" title="<?php echo $youtubeTitle; ?>">
|
||||||
<h2><?php echo $youtubeTitle; ?></h2>
|
<h2><?php echo $youtubeTitle; ?></h2>
|
||||||
</a>
|
</a>
|
||||||
<div class="text-muted galeryDetails" style="overflow: hidden;">
|
<div class="galeryDetails" style="overflow: hidden;">
|
||||||
<?php
|
<?php
|
||||||
if (empty($advancedCustom->doNotDisplayViews)) {
|
if (empty($advancedCustom->doNotDisplayViews)) {
|
||||||
?>
|
?>
|
||||||
|
@ -78,7 +78,7 @@ if (is_object($obj) && empty($obj->error)) {
|
||||||
</div>
|
</div>
|
||||||
<?php if (!empty($video->trailer1)) { ?>
|
<?php if (!empty($video->trailer1)) { ?>
|
||||||
<div>
|
<div>
|
||||||
<span onclick="showTrailer('<?php echo parseVideos($video->trailer1, 1); ?>'); return false;" class="text-primary cursorPointer" >
|
<span onclick="showTrailer('<?php echo parseVideos($video->trailer1, 1); ?>'); return false;" class="cursorPointer" >
|
||||||
<i class="fa fa-video"></i> <?php echo __("Trailer"); ?>
|
<i class="fa fa-video"></i> <?php echo __("Trailer"); ?>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -182,7 +182,7 @@ function createGallerySection($videos, $crc = "", $get = array(), $ignoreAds = f
|
||||||
$isserieClass = "isserie";
|
$isserieClass = "isserie";
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<div class=" <?php echo $colsClass; ?> galleryVideo thumbsImage fixPadding" style="z-index: <?php echo $zindex--; ?>; min-height: 175px;" itemscope itemtype="http://schema.org/VideoObject">
|
<div class=" <?php echo $colsClass; ?> galleryVideo thumbsImage fixPadding" style="z-index: <?php echo $zindex--; ?>; min-height: 175px;">
|
||||||
<a class="galleryLink <?php echo $isserieClass; ?>" videos_id="<?php echo $value['id']; ?>"
|
<a class="galleryLink <?php echo $isserieClass; ?>" videos_id="<?php echo $value['id']; ?>"
|
||||||
href="<?php echo Video::getLink($value['id'], $value['clean_title'], false, $getCN); ?>"
|
href="<?php echo Video::getLink($value['id'], $value['clean_title'], false, $getCN); ?>"
|
||||||
embed="<?php echo Video::getLink($value['id'], $value['clean_title'], true, $getCN); ?>" title="<?php echo $value['title']; ?>">
|
embed="<?php echo Video::getLink($value['id'], $value['clean_title'], true, $getCN); ?>" title="<?php echo $value['title']; ?>">
|
||||||
|
@ -277,10 +277,10 @@ function createGallerySection($videos, $crc = "", $get = array(), $ignoreAds = f
|
||||||
<a class="h6 galleryLink <?php echo $isserieClass; ?>" videos_id="<?php echo $value['id']; ?>"
|
<a class="h6 galleryLink <?php echo $isserieClass; ?>" videos_id="<?php echo $value['id']; ?>"
|
||||||
href="<?php echo Video::getLink($value['id'], $value['clean_title'], false, $getCN); ?>"
|
href="<?php echo Video::getLink($value['id'], $value['clean_title'], false, $getCN); ?>"
|
||||||
embed="<?php echo Video::getLink($value['id'], $value['clean_title'], true, $getCN); ?>" title="<?php echo $value['title']; ?>">
|
embed="<?php echo Video::getLink($value['id'], $value['clean_title'], true, $getCN); ?>" title="<?php echo $value['title']; ?>">
|
||||||
<h2><?php echo $value['title']; ?></h2>
|
<strong class="title"><?php echo $value['title']; ?></strong>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
<div class="text-muted galeryDetails" style="overflow: hidden;">
|
<div class="galeryDetails" style="overflow: hidden;">
|
||||||
<div class="galleryTags">
|
<div class="galleryTags">
|
||||||
<!-- category tags -->
|
<!-- category tags -->
|
||||||
<?php
|
<?php
|
||||||
|
@ -330,8 +330,8 @@ function createGallerySection($videos, $crc = "", $get = array(), $ignoreAds = f
|
||||||
<?php echo humanTiming(strtotime($value['videoCreation'])), " ", __('ago'); ?>
|
<?php echo humanTiming(strtotime($value['videoCreation'])), " ", __('ago'); ?>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<i class="fa fa-user"></i>
|
<a href="<?php echo User::getChannelLink($value['users_id']); ?>">
|
||||||
<a class="text-muted" href="<?php echo User::getChannelLink($value['users_id']); ?>">
|
<i class="fa fa-user"></i>
|
||||||
<?php echo $name; ?>
|
<?php echo $name; ?>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
@ -344,7 +344,7 @@ function createGallerySection($videos, $crc = "", $get = array(), $ignoreAds = f
|
||||||
$titleAlert = str_replace(array('"', "'"), array('``', "`"), $value['title']);
|
$titleAlert = str_replace(array('"', "'"), array('``', "`"), $value['title']);
|
||||||
?>
|
?>
|
||||||
<div>
|
<div>
|
||||||
<a href="#" onclick='avideoAlert("<?php echo $titleAlert; ?>", "<div style=\"max-height: 300px; overflow-y: scroll;overflow-x: hidden;\" id=\"videoDescriptionAlertContent<?php echo $duid; ?>\" ></div>", "");$("#videoDescriptionAlertContent<?php echo $duid; ?>").html($("#videoDescription<?php echo $duid; ?>").html());return false;' class="text-primary" data-toggle="tooltip" title="<?php echo __("Description"); ?>"><i class="far fa-file-alt"></i> <span class="hidden-sm hidden-xs"><?php echo __("Description"); ?></span></a>
|
<a href="#" onclick='avideoAlert("<?php echo $titleAlert; ?>", "<div style=\"max-height: 300px; overflow-y: scroll;overflow-x: hidden;\" id=\"videoDescriptionAlertContent<?php echo $duid; ?>\" ></div>", "");$("#videoDescriptionAlertContent<?php echo $duid; ?>").html($("#videoDescription<?php echo $duid; ?>").html());return false;' data-toggle="tooltip" title="<?php echo __("Description"); ?>"><i class="far fa-file-alt"></i> <span class="hidden-sm hidden-xs"><?php echo __("Description"); ?></span></a>
|
||||||
<div id="videoDescription<?php echo $duid; ?>" style="display: none;"><?php echo $desc; ?></div>
|
<div id="videoDescription<?php echo $duid; ?>" style="display: none;"><?php echo $desc; ?></div>
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
|
@ -353,7 +353,7 @@ function createGallerySection($videos, $crc = "", $get = array(), $ignoreAds = f
|
||||||
?>
|
?>
|
||||||
<?php if (Video::canEdit($value['id'])) { ?>
|
<?php if (Video::canEdit($value['id'])) { ?>
|
||||||
<div>
|
<div>
|
||||||
<a href="#" onclick="avideoModalIframe('<?php echo $global['webSiteRootURL']; ?>mvideos?video_id=<?php echo $value['id']; ?>');return false;" class="text-primary" data-toggle="tooltip" title="<?php echo __("Edit Video"); ?>">
|
<a href="#" onclick="avideoModalIframe('<?php echo $global['webSiteRootURL']; ?>mvideos?video_id=<?php echo $value['id']; ?>');return false;" data-toggle="tooltip" title="<?php echo __("Edit Video"); ?>">
|
||||||
<i class="fa fa-edit"></i> <span class="hidden-sm hidden-xs"><?php echo __("Edit Video"); ?></span>
|
<i class="fa fa-edit"></i> <span class="hidden-sm hidden-xs"><?php echo __("Edit Video"); ?></span>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
@ -361,7 +361,7 @@ function createGallerySection($videos, $crc = "", $get = array(), $ignoreAds = f
|
||||||
?>
|
?>
|
||||||
<?php if (!empty($value['trailer1'])) { ?>
|
<?php if (!empty($value['trailer1'])) { ?>
|
||||||
<div>
|
<div>
|
||||||
<span onclick="showTrailer('<?php echo parseVideos($value['trailer1'], 1); ?>'); return false;" class="text-primary cursorPointer" >
|
<span onclick="showTrailer('<?php echo parseVideos($value['trailer1'], 1); ?>'); return false;" class="cursorPointer" >
|
||||||
<i class="fa fa-video"></i> <?php echo __("Trailer"); ?>
|
<i class="fa fa-video"></i> <?php echo __("Trailer"); ?>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
@ -513,10 +513,10 @@ function createGalleryLiveSection($videos) {
|
||||||
<a class="h6 galleryLink" videos_id="<?php echo $video['title']; ?>"
|
<a class="h6 galleryLink" videos_id="<?php echo $video['title']; ?>"
|
||||||
href="<?php echo $video['href']; ?>"
|
href="<?php echo $video['href']; ?>"
|
||||||
embed="<?php echo $video['link']; ?>" title="<?php echo $video['title']; ?>">
|
embed="<?php echo $video['link']; ?>" title="<?php echo $video['title']; ?>">
|
||||||
<h2><?php echo $video['title'] ?></h2>
|
<strong class="title"><?php echo $video['title'] ?></strong>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
<div class="text-muted galeryDetails" style="overflow: hidden;">
|
<div class="galeryDetails" style="overflow: hidden;">
|
||||||
<div class="galleryTags">
|
<div class="galleryTags">
|
||||||
<?php if (empty($_GET['catName']) && !empty($obj->showCategoryTag)) { ?>
|
<?php if (empty($_GET['catName']) && !empty($obj->showCategoryTag)) { ?>
|
||||||
<a class="label label-default" href="<?php echo $global['webSiteRootURL']; ?>cat/<?php echo $video['clean_category']; ?>">
|
<a class="label label-default" href="<?php echo $global['webSiteRootURL']; ?>cat/<?php echo $video['clean_category']; ?>">
|
||||||
|
@ -533,7 +533,7 @@ function createGalleryLiveSection($videos) {
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<i class="fa fa-user"></i>
|
<i class="fa fa-user"></i>
|
||||||
<a class="text-muted" href="<?php echo User::getChannelLink($video['users_id']); ?>">
|
<a href="<?php echo User::getChannelLink($video['users_id']); ?>">
|
||||||
<?php echo $name; ?>
|
<?php echo $name; ?>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
font-size: 0.9em;
|
font-size: 0.9em;
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
}
|
}
|
||||||
.gallery h2,
|
.gallery .title,
|
||||||
.videosDetails .title {
|
.videosDetails .title {
|
||||||
font-size: 1em;
|
font-size: 1em;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
|
@ -74,14 +74,17 @@ h3.galleryTitle{
|
||||||
border-bottom: solid 1px #EEE;
|
border-bottom: solid 1px #EEE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.galeryDetails{
|
||||||
|
font-size: smaller;
|
||||||
|
}
|
||||||
|
|
||||||
.galeryDetails div{
|
.galeryDetails div{
|
||||||
float: left;
|
float: left;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
padding-right: 5px;
|
padding-right: 5px;
|
||||||
font-size: 0.7em;
|
margin: 2px 0;
|
||||||
margin: 1px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.firstRow .galeryDetails div{
|
.firstRow .galeryDetails div{
|
||||||
|
@ -205,5 +208,5 @@ a.h6{
|
||||||
font-size: 0.9em;
|
font-size: 0.9em;
|
||||||
}
|
}
|
||||||
.galleryTags{
|
.galleryTags{
|
||||||
margin: 1px;
|
margin: 0 !important;
|
||||||
}
|
}
|
|
@ -162,17 +162,21 @@ if ($obj->BigVideo && empty($_GET['showOnly'])) {
|
||||||
title="<?php echo $videoRow['title']; ?>">
|
title="<?php echo $videoRow['title']; ?>">
|
||||||
<strong><?php echo $videoRow['title']; ?></strong>
|
<strong><?php echo $videoRow['title']; ?></strong>
|
||||||
</a>
|
</a>
|
||||||
<div class="mainAreaDescriptionContainer">
|
<div class="descriptionArea">
|
||||||
<p class="mainAreaDescription" itemprop="description"><?php
|
<div class="descriptionAreaPreContent">
|
||||||
if (strpos($videoRow['description'], '<br') !== false || strpos($videoRow['description'], '<p') !== false) {
|
<div class="descriptionAreaContent">
|
||||||
echo $videoRow['description'];
|
<?php
|
||||||
} else {
|
echo Video::htmlDescription($videoRow['description']);
|
||||||
echo nl2br(textToLink(htmlentities($videoRow['description'])));
|
?>
|
||||||
}
|
</div>
|
||||||
?></p>
|
</div>
|
||||||
|
<button onclick="$(this).closest('.descriptionArea').toggleClass('expanded');" class="btn btn-xs btn-default descriptionAreaShowMoreBtn" style="display: none; ">
|
||||||
|
<span class="showMore"><i class="fas fa-caret-down"></i> <?php echo __("Show More"); ?></span>
|
||||||
|
<span class="showLess"><i class="fas fa-caret-up"></i> <?php echo __("Show Less"); ?></span>
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="text-muted galeryDetails">
|
<div class="galeryDetails">
|
||||||
<div>
|
<div class="galleryTags">
|
||||||
<?php if (empty($_GET['catName'])) { ?>
|
<?php if (empty($_GET['catName'])) { ?>
|
||||||
<a class="label label-default" href="<?php echo Video::getLink($videoRow['id'], $videoRow['clean_title'], false, $get); ?>">
|
<a class="label label-default" href="<?php echo Video::getLink($videoRow['id'], $videoRow['clean_title'], false, $get); ?>">
|
||||||
<?php
|
<?php
|
||||||
|
@ -220,19 +224,19 @@ if ($obj->BigVideo && empty($_GET['showOnly'])) {
|
||||||
<?php echo humanTiming(strtotime($videoRow['videoCreation'])), " ", __('ago'); ?>
|
<?php echo humanTiming(strtotime($videoRow['videoCreation'])), " ", __('ago'); ?>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<i class="fa fa-user"></i>
|
<a href="<?php echo User::getChannelLink($videoRow['users_id']); ?>">
|
||||||
<a class="text-muted" href="<?php echo User::getChannelLink($videoRow['users_id']); ?>">
|
<i class="fa fa-user"></i>
|
||||||
<?php echo $name; ?>
|
<?php echo $name; ?>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<?php if (Video::canEdit($videoRow['id'])) { ?>
|
<?php if (Video::canEdit($videoRow['id'])) { ?>
|
||||||
<div>
|
<div>
|
||||||
<a href="#" onclick="avideoModalIframe('<?php echo $global['webSiteRootURL']; ?>mvideos?video_id=<?php echo $videoRow['id']; ?>');return false;" class="text-primary"><i class="fa fa-edit"></i> <?php echo __("Edit Video"); ?></a>
|
<a href="#" onclick="avideoModalIframe('<?php echo $global['webSiteRootURL']; ?>mvideos?video_id=<?php echo $videoRow['id']; ?>');return false;"><i class="fa fa-edit"></i> <?php echo __("Edit Video"); ?></a>
|
||||||
</div>
|
</div>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<?php if (!empty($videoRow['trailer1'])) { ?>
|
<?php if (!empty($videoRow['trailer1'])) { ?>
|
||||||
<div>
|
<div>
|
||||||
<span onclick="showTrailer('<?php echo parseVideos($videoRow['trailer1'], 1); ?>'); return false;" class="text-primary cursorPointer" >
|
<span onclick="showTrailer('<?php echo parseVideos($videoRow['trailer1'], 1); ?>'); return false;" class="cursorPointer" >
|
||||||
<i class="fa fa-video"></i> <?php echo __("Trailer"); ?>
|
<i class="fa fa-video"></i> <?php echo __("Trailer"); ?>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
$isFirstPage = 1;
|
$isFirstPage = 1;
|
||||||
include $global['systemRootPath'] . 'plugin/Gallery/view/topLogic.php';
|
include $global['systemRootPath'] . 'plugin/Gallery/view/topLogic.php';
|
||||||
|
$leaderBoardTop = getAdsLeaderBoardTop();
|
||||||
?>
|
?>
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="<?php echo $_SESSION['language']; ?>">
|
<html lang="<?php echo $_SESSION['language']; ?>">
|
||||||
|
@ -14,14 +15,20 @@ include $global['systemRootPath'] . 'plugin/Gallery/view/topLogic.php';
|
||||||
<body class="<?php echo $global['bodyClass']; ?>">
|
<body class="<?php echo $global['bodyClass']; ?>">
|
||||||
<?php include $global['systemRootPath'] . 'view/include/navbar.php'; ?>
|
<?php include $global['systemRootPath'] . 'view/include/navbar.php'; ?>
|
||||||
<div class="container-fluid gallery">
|
<div class="container-fluid gallery">
|
||||||
<div class="row text-center" style="padding: 10px;">
|
<?php
|
||||||
<?php echo getAdsLeaderBoardTop(); ?>
|
if(!empty($leaderBoardTop)){
|
||||||
</div>
|
echo '<div class="row text-center" style="padding: 10px;">'.$leaderBoardTop.'</div>';
|
||||||
<div class="col-lg-10 col-lg-offset-1 list-group-item addWidthOnMenuOpen">
|
}
|
||||||
<?php
|
?>
|
||||||
include $global['systemRootPath'] . 'view/include/categoryTop.php';
|
<div class="col-lg-10 col-lg-offset-1 addWidthOnMenuOpen">
|
||||||
include $global['systemRootPath'] . 'plugin/Gallery/view/mainArea.php';
|
<div class="panel panel-default">
|
||||||
?>
|
<div class="panel-body">
|
||||||
|
<?php
|
||||||
|
include $global['systemRootPath'] . 'view/include/categoryTop.php';
|
||||||
|
include $global['systemRootPath'] . 'plugin/Gallery/view/mainArea.php';
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
|
|
|
@ -187,8 +187,8 @@ class Live extends PluginAbstract {
|
||||||
self::addDataObjectHelper('doNotShowOfflineLiveOnCategoryList', 'Do not show offline lives on site category list', 'We will not show the live thumbs on the main Gallery page if it is offline');
|
self::addDataObjectHelper('doNotShowOfflineLiveOnCategoryList', 'Do not show offline lives on site category list', 'We will not show the live thumbs on the main Gallery page if it is offline');
|
||||||
$obj->limitLiveOnVideosList = 12;
|
$obj->limitLiveOnVideosList = 12;
|
||||||
self::addDataObjectHelper('limitLiveOnVideosList', 'Videos List Limit', 'This will limit the maximum of videos that you will see in the Videos page');
|
self::addDataObjectHelper('limitLiveOnVideosList', 'Videos List Limit', 'This will limit the maximum of videos that you will see in the Videos page');
|
||||||
//$obj->doNotShowGoLiveButton = false;
|
$obj->doNotShowGoLiveButton = false;
|
||||||
//self::addDataObjectHelper('doNotShowGoLiveButton', 'Hide Top Button', 'This will hide the "Go Live" button on the top menu bar');
|
self::addDataObjectHelper('doNotShowGoLiveButton', 'Hide Top Go live Button', 'This will hide the "Go Live" button on the top menu bar');
|
||||||
$obj->doNotProcessNotifications = false;
|
$obj->doNotProcessNotifications = false;
|
||||||
self::addDataObjectHelper('doNotProcessNotifications', 'Do not show notifications', 'Do not show the notification on the top bar');
|
self::addDataObjectHelper('doNotProcessNotifications', 'Do not show notifications', 'Do not show the notification on the top bar');
|
||||||
$obj->useLiveServers = false;
|
$obj->useLiveServers = false;
|
||||||
|
@ -222,8 +222,8 @@ class Live extends PluginAbstract {
|
||||||
self::addDataObjectHelper('controllButtonsShowOnlyToAdmin_drop_publisher_reset_key', 'Show Drop Publisher and Reset Key Button Only to Admin', 'Regular users will not able to see this button');
|
self::addDataObjectHelper('controllButtonsShowOnlyToAdmin_drop_publisher_reset_key', 'Show Drop Publisher and Reset Key Button Only to Admin', 'Regular users will not able to see this button');
|
||||||
$obj->controllButtonsShowOnlyToAdmin_save_dvr = false;
|
$obj->controllButtonsShowOnlyToAdmin_save_dvr = false;
|
||||||
self::addDataObjectHelper('controllButtonsShowOnlyToAdmin_save_dvr', 'Show Save DVR Button Only to Admin', 'Regular users will not able to see this button');
|
self::addDataObjectHelper('controllButtonsShowOnlyToAdmin_save_dvr', 'Show Save DVR Button Only to Admin', 'Regular users will not able to see this button');
|
||||||
|
|
||||||
|
|
||||||
$obj->webRTC_player = 'https://webrtc.ypt.me/player/';
|
$obj->webRTC_player = 'https://webrtc.ypt.me/player/';
|
||||||
return $obj;
|
return $obj;
|
||||||
}
|
}
|
||||||
|
@ -487,7 +487,7 @@ class Live extends PluginAbstract {
|
||||||
if (!self::userCanRecordLive(User::getId())) {
|
if (!self::userCanRecordLive(User::getId())) {
|
||||||
return '<!-- User Cannot record -->';
|
return '<!-- User Cannot record -->';
|
||||||
}
|
}
|
||||||
return '<!-- SendRecordedToEncoder::getSaveDVRButton -->'.SendRecordedToEncoder::getSaveDVRButton($key, $live_servers_id, $class);
|
return '<!-- SendRecordedToEncoder::getSaveDVRButton -->' . SendRecordedToEncoder::getSaveDVRButton($key, $live_servers_id, $class);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
return '';
|
return '';
|
||||||
|
@ -1291,9 +1291,14 @@ class Live extends PluginAbstract {
|
||||||
$title = $row['title'];
|
$title = $row['title'];
|
||||||
$u = new User($row['users_id']);
|
$u = new User($row['users_id']);
|
||||||
$hiddenName = preg_replace('/^(.{5})/', '*****', $value->name);
|
$hiddenName = preg_replace('/^(.{5})/', '*****', $value->name);
|
||||||
|
//_error_log('Live::isLiveFromKey:_getStats '. json_encode($_SERVER));
|
||||||
if (!self::canSeeLiveFromLiveKey($value->name)) {
|
if (!self::canSeeLiveFromLiveKey($value->name)) {
|
||||||
$obj->hidden_applications[] = "{$row['channelName']} ($hiddenName} is a private live";
|
$obj->hidden_applications[] = array(
|
||||||
|
"key" => $value->name,
|
||||||
|
"name" => $row['channelName'],
|
||||||
|
"user" => $row['channelName'],
|
||||||
|
"title" => "{$row['channelName']} ($hiddenName} is a private live",
|
||||||
|
);
|
||||||
if (!User::isAdmin()) {
|
if (!User::isAdmin()) {
|
||||||
continue;
|
continue;
|
||||||
} else {
|
} else {
|
||||||
|
@ -1301,7 +1306,12 @@ class Live extends PluginAbstract {
|
||||||
}
|
}
|
||||||
} else
|
} else
|
||||||
if (empty($row) || empty($row['public'])) {
|
if (empty($row) || empty($row['public'])) {
|
||||||
$obj->hidden_applications[] = "{$row['channelName']} ($hiddenName} " . __("is set to not be listed");
|
$obj->hidden_applications[] = array(
|
||||||
|
"key" => $value->name,
|
||||||
|
"name" => $row['channelName'],
|
||||||
|
"user" => $row['channelName'],
|
||||||
|
"title" => "{$row['channelName']} ($hiddenName} " . __("is set to not be listed")
|
||||||
|
);
|
||||||
if (!User::isAdmin()) {
|
if (!User::isAdmin()) {
|
||||||
continue;
|
continue;
|
||||||
} else {
|
} else {
|
||||||
|
@ -1309,7 +1319,12 @@ class Live extends PluginAbstract {
|
||||||
}
|
}
|
||||||
} else
|
} else
|
||||||
if ($u->getStatus() !== 'a') {
|
if ($u->getStatus() !== 'a') {
|
||||||
$obj->hidden_applications[] = "{$row['channelName']} {$hiddenName} " . __("the user is inactive");
|
$obj->hidden_applications[] = array(
|
||||||
|
"key" => $value->name,
|
||||||
|
"name" => $row['channelName'],
|
||||||
|
"user" => $row['channelName'],
|
||||||
|
"title" => "{$row['channelName']} {$hiddenName} " . __("the user is inactive"),
|
||||||
|
);
|
||||||
if (!User::isAdmin()) {
|
if (!User::isAdmin()) {
|
||||||
continue;
|
continue;
|
||||||
} else {
|
} else {
|
||||||
|
@ -1351,12 +1366,61 @@ class Live extends PluginAbstract {
|
||||||
$title .= " ({$live_index})";
|
$title .= " ({$live_index})";
|
||||||
}
|
}
|
||||||
|
|
||||||
// this variable is to keep it compatible for Mobile app
|
// this variable is to keep it compatible for Mobile app
|
||||||
$UserPhoto = $photo;
|
$UserPhoto = $photo;
|
||||||
$key = LiveTransmition::keyNameFix($value->name);
|
$key = LiveTransmition::keyNameFix($value->name);
|
||||||
$link = Live::getLinkToLiveFromChannelNameAndLiveServer($u->getChannelName(), $live_servers_id, $live_index);
|
$link = Live::getLinkToLiveFromChannelNameAndLiveServer($u->getChannelName(), $live_servers_id, $live_index);
|
||||||
$m3u8 = self::getM3U8File($key);
|
$m3u8 = self::getM3U8File($key);
|
||||||
|
|
||||||
|
$liveUsers = AVideoPlugin::isEnabledByName('LiveUsers');
|
||||||
|
//$filename = $global['systemRootPath'] . 'plugin/LiveLinks/view/menuItem.html';
|
||||||
|
$filenameExtra = $global['systemRootPath'] . 'plugin/LiveLinks/view/extraItem.html';
|
||||||
|
$filenameExtraVideoPage = $global['systemRootPath'] . 'plugin/LiveLinks/view/extraItemVideoPage.html';
|
||||||
|
$filename = $filenameListItem = $global['systemRootPath'] . 'plugin/LiveLinks/view/videoListItem.html';
|
||||||
|
$search = array(
|
||||||
|
'_unique_id_',
|
||||||
|
'_user_photo_',
|
||||||
|
'_title_',
|
||||||
|
'_user_identification_',
|
||||||
|
'_description_',
|
||||||
|
'_link_',
|
||||||
|
'_imgJPG_',
|
||||||
|
'_imgGIF_',
|
||||||
|
'_class_',
|
||||||
|
'_total_on_live_links_id_',
|
||||||
|
'liveLink',
|
||||||
|
'LiveLink'
|
||||||
|
);
|
||||||
|
$content = file_get_contents($filename);
|
||||||
|
$contentExtra = file_get_contents($filenameExtra);
|
||||||
|
$contentExtraVideoPage = file_get_contents($filenameExtraVideoPage);
|
||||||
|
$contentListem = file_get_contents($filenameListItem);
|
||||||
|
$uid = "live_{$live_servers_id}_{$value->name}";
|
||||||
|
$replace = array(
|
||||||
|
$uid,
|
||||||
|
$UserPhoto,
|
||||||
|
$title,
|
||||||
|
$user,
|
||||||
|
str_replace('"', "", ''),
|
||||||
|
$link,
|
||||||
|
'<img src="' . getCDN() . 'view/img/loading-gif.png" data-src="' . $poster . '" class="thumbsJPG img-responsive" height="130">',
|
||||||
|
empty($obj->disableGifThumbs) ? ('<img src="' . getCDN() . 'view/img/loading-gif.png" data-src="' . $p->getLivePosterImage($row['users_id'], $live_servers_id, $playlists_id_live, $live_index, 'webp') . '" style="position: absolute; top: 0px; height: 0px; width: 0px; display: none;" class="thumbsGIF img-responsive" height="130">') : "",
|
||||||
|
"col-lg-2 col-md-4 col-sm-4 col-xs-6",
|
||||||
|
($liveUsers ? getLiveUsersLabelLive($value->name, $live_servers_id) : ''),
|
||||||
|
'liveVideo',
|
||||||
|
'LiveVideo'
|
||||||
|
);
|
||||||
|
|
||||||
|
$newContent = str_replace($search, $replace, $content);
|
||||||
|
$newContentExtra = str_replace($search, $replace, $contentExtra);
|
||||||
|
$newContentExtraVideoPage = str_replace($search, $replace, $contentExtraVideoPage);
|
||||||
|
$newContentVideoListItem = str_replace($search, $replace, $contentListem);
|
||||||
|
|
||||||
$obj->applications[] = array(
|
$obj->applications[] = array(
|
||||||
|
"html" => $newContent,
|
||||||
|
"htmlExtra" => $newContentExtra,
|
||||||
|
"htmlExtraVideoPage" => $newContentExtraVideoPage,
|
||||||
|
"htmlExtraVideoListItem" => $newContentVideoListItem,
|
||||||
"live_index" => $live_index,
|
"live_index" => $live_index,
|
||||||
"live_cleanKey" => $parameters['cleanKey'],
|
"live_cleanKey" => $parameters['cleanKey'],
|
||||||
"key" => $value->name,
|
"key" => $value->name,
|
||||||
|
@ -1374,13 +1438,12 @@ class Live extends PluginAbstract {
|
||||||
'link' => addQueryStringParameter($link, 'embed', 1),
|
'link' => addQueryStringParameter($link, 'embed', 1),
|
||||||
'href' => $link,
|
'href' => $link,
|
||||||
'playlists_id_live' => $playlists_id_live,
|
'playlists_id_live' => $playlists_id_live,
|
||||||
'live_index' => $live_index,
|
|
||||||
'm3u8' => $m3u8,
|
'm3u8' => $m3u8,
|
||||||
'isURL200' => isURL200($m3u8),
|
'isURL200' => isURL200($m3u8),
|
||||||
'users_id' => $row['users_id'],
|
'users_id' => $row['users_id'],
|
||||||
'live_servers_id' => $live_servers_id,
|
'live_servers_id' => $live_servers_id,
|
||||||
'categories_id' => intval($row['categories_id']),
|
'categories_id' => intval($row['categories_id']),
|
||||||
'className' => "live_{$live_servers_id}_{$value->name}"
|
'className' => $uid
|
||||||
);
|
);
|
||||||
if ($value->name === $obj->name) {
|
if ($value->name === $obj->name) {
|
||||||
$obj->error = property_exists($value, 'publishing') ? false : true;
|
$obj->error = property_exists($value, 'publishing') ? false : true;
|
||||||
|
@ -1400,6 +1463,14 @@ class Live extends PluginAbstract {
|
||||||
return $obj;
|
return $obj;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static function byPass() {
|
||||||
|
if (preg_match('/socket_notification/', $_SERVER['SCRIPT_FILENAME'])) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
static function getLiveParametersFromKey($key) {
|
static function getLiveParametersFromKey($key) {
|
||||||
$key = preg_replace('/[^a-z0-9_-]/i', '', $key);
|
$key = preg_replace('/[^a-z0-9_-]/i', '', $key);
|
||||||
$obj = AVideoPlugin::getObjectData('Live');
|
$obj = AVideoPlugin::getObjectData('Live');
|
||||||
|
@ -1539,13 +1610,16 @@ class Live extends PluginAbstract {
|
||||||
//_error_log('getStats execute getStats: ' . ($force_recreate?'force_recreate':'DO NOT force_recreate'));
|
//_error_log('getStats execute getStats: ' . ($force_recreate?'force_recreate':'DO NOT force_recreate'));
|
||||||
|
|
||||||
$json = self::getStats($force_recreate);
|
$json = self::getStats($force_recreate);
|
||||||
|
_error_log('Live::isKeyLiveInStats:self::getStats ' . json_encode($json));
|
||||||
$_isLiveFromKey[$index] = false;
|
$_isLiveFromKey[$index] = false;
|
||||||
if (!empty($json)) {
|
if (!empty($json)) {
|
||||||
_error_log("Live::isLiveFromKey {$key} JSON was not empty");
|
//_error_log("Live::isLiveFromKey {$key} JSON was not empty");
|
||||||
if (!is_array($json)) {
|
if (!is_array($json)) {
|
||||||
$json = array($json);
|
$json = array($json);
|
||||||
}
|
}
|
||||||
foreach ($json as $item) {
|
$namesFound = array();
|
||||||
|
foreach ($json as $ki => $item) {
|
||||||
|
//_error_log("Live::isLiveFromKey json [$ki] " . json_encode($item));
|
||||||
$applications = array();
|
$applications = array();
|
||||||
if (empty($item->applications) && is_array($item)) {
|
if (empty($item->applications) && is_array($item)) {
|
||||||
$applications = $item;
|
$applications = $item;
|
||||||
|
@ -1553,11 +1627,13 @@ class Live extends PluginAbstract {
|
||||||
$applications = $item->applications;
|
$applications = $item->applications;
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach ($applications as $value) {
|
foreach ($applications as $k => $value) {
|
||||||
$value = object_to_array($value);
|
$value = object_to_array($value);
|
||||||
|
//_error_log("Live::isLiveFromKey applications [$k] ". json_encode($value));
|
||||||
if (!is_array($value) || empty($value) || empty($value['key'])) {
|
if (!is_array($value) || empty($value) || empty($value['key'])) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
$namesFound[] = "({$value['key']})";
|
||||||
if (preg_match("/{$key}.*/", $value['key'])) {
|
if (preg_match("/{$key}.*/", $value['key'])) {
|
||||||
if (empty($live_servers_id)) {
|
if (empty($live_servers_id)) {
|
||||||
$_isLiveFromKey[$index] = true;
|
$_isLiveFromKey[$index] = true;
|
||||||
|
@ -1580,6 +1656,7 @@ class Live extends PluginAbstract {
|
||||||
if (!is_array($value) || empty($value) || empty($value['key'])) {
|
if (!is_array($value) || empty($value) || empty($value['key'])) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
$namesFound[] = "({$value['key']})";
|
||||||
if (preg_match("/{$key}.*/", $value['key'])) {
|
if (preg_match("/{$key}.*/", $value['key'])) {
|
||||||
if (empty($live_servers_id)) {
|
if (empty($live_servers_id)) {
|
||||||
$_isLiveFromKey[$index] = true;
|
$_isLiveFromKey[$index] = true;
|
||||||
|
@ -1596,6 +1673,7 @@ class Live extends PluginAbstract {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
_error_log("Live::isLiveFromKey namesFound " . json_encode($namesFound));
|
||||||
}
|
}
|
||||||
if (empty($_isLiveFromKey[$index])) {
|
if (empty($_isLiveFromKey[$index])) {
|
||||||
_error_log("Live::isLiveFromKey is NOT online [{$key}]");
|
_error_log("Live::isLiveFromKey is NOT online [{$key}]");
|
||||||
|
@ -1898,7 +1976,7 @@ class Live extends PluginAbstract {
|
||||||
unset($_isLiveAndIsReadyFromKey);
|
unset($_isLiveAndIsReadyFromKey);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function getReverseRestreamObject($m3u8, $users_id, $live_servers_id=-1) {
|
public static function getReverseRestreamObject($m3u8, $users_id, $live_servers_id = -1) {
|
||||||
if (!isValidURL($m3u8)) {
|
if (!isValidURL($m3u8)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -1936,10 +2014,10 @@ class Live extends PluginAbstract {
|
||||||
return $obj;
|
return $obj;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function reverseRestream($m3u8, $users_id, $live_servers_id=-1) {
|
public static function reverseRestream($m3u8, $users_id, $live_servers_id = -1) {
|
||||||
_error_log("Live:reverseRestream start");
|
_error_log("Live:reverseRestream start");
|
||||||
$obj = self::getReverseRestreamObject($m3u8, $users_id, $live_servers_id);
|
$obj = self::getReverseRestreamObject($m3u8, $users_id, $live_servers_id);
|
||||||
_error_log("Live:reverseRestream obj ". _json_encode($obj));
|
_error_log("Live:reverseRestream obj " . _json_encode($obj));
|
||||||
return self::sendRestream($obj);
|
return self::sendRestream($obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1978,16 +2056,16 @@ class Live extends PluginAbstract {
|
||||||
);
|
);
|
||||||
$output = curl_exec($ch);
|
$output = curl_exec($ch);
|
||||||
curl_close($ch);
|
curl_close($ch);
|
||||||
if(empty($output)){
|
if (empty($output)) {
|
||||||
_error_log('Live:sendRestream ERROR '.curl_error($ch));
|
_error_log('Live:sendRestream ERROR ' . curl_error($ch));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
$json = _json_decode($output);
|
$json = _json_decode($output);
|
||||||
if(empty($output)){
|
if (empty($output)) {
|
||||||
_error_log('Live:sendRestream JSON ERROR '.$output);
|
_error_log('Live:sendRestream JSON ERROR ' . $output);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
_error_log('Live:sendRestream complete '.$output);
|
_error_log('Live:sendRestream complete ' . $output);
|
||||||
return $json;
|
return $json;
|
||||||
} catch (Exception $exc) {
|
} catch (Exception $exc) {
|
||||||
_error_log("Live:sendRestream " . $exc->getTraceAsString());
|
_error_log("Live:sendRestream " . $exc->getTraceAsString());
|
||||||
|
@ -2022,7 +2100,7 @@ class Live extends PluginAbstract {
|
||||||
public function getUploadMenuButton() {
|
public function getUploadMenuButton() {
|
||||||
global $global;
|
global $global;
|
||||||
$obj = $this->getDataObject();
|
$obj = $this->getDataObject();
|
||||||
if (!empty($obj->doNotShowGoLiveButton) || !User::canStream()) {
|
if (!empty(!User::canStream())) {
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
$buttonTitle = $this->getButtonTitle();
|
$buttonTitle = $this->getButtonTitle();
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<li>
|
<li>
|
||||||
<a href="<?php echo $global['webSiteRootURL']; ?>plugin/Live" data-toggle="tooltip" title="<?php echo __("Broadcast a Live Stream"); ?>" data-placement="left" >
|
<a href="<?php echo $global['webSiteRootURL']; ?>plugin/Live" data-toggle="tooltip" title="<?php echo __($buttonTitle); ?>" data-placement="left" >
|
||||||
<i class="fa fa-circle faa-flash animated" style="color: red;" ></i> <?php echo $buttonTitle; ?>
|
<i class="fa fa-circle faa-flash animated" style="color: red;" ></i> <?php echo $buttonTitle; ?>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
|
@ -51,6 +51,7 @@ function url_get_contents($url, $timeout = 0) {
|
||||||
if (ini_get('allow_url_fopen')) {
|
if (ini_get('allow_url_fopen')) {
|
||||||
try {
|
try {
|
||||||
$tmp = file_get_contents($url, false, $context);
|
$tmp = file_get_contents($url, false, $context);
|
||||||
|
_log('file_get_contents:: '.htmlentities($tmp));
|
||||||
if (empty($tmp)) {
|
if (empty($tmp)) {
|
||||||
_log('file_get_contents fail return an empty content');
|
_log('file_get_contents fail return an empty content');
|
||||||
return false;
|
return false;
|
||||||
|
@ -76,7 +77,7 @@ function url_get_contents($url, $timeout = 0) {
|
||||||
}
|
}
|
||||||
$output = curl_exec($ch);
|
$output = curl_exec($ch);
|
||||||
curl_close($ch);
|
curl_close($ch);
|
||||||
|
_log('curl_init:: '.htmlentities($output));
|
||||||
if (empty($output)) {
|
if (empty($output)) {
|
||||||
_log('curl_init fail to download');
|
_log('curl_init fail to download');
|
||||||
return false;
|
return false;
|
||||||
|
@ -105,6 +106,7 @@ function url_get_contents($url, $timeout = 0) {
|
||||||
$filename = $tmpDir . md5($url);
|
$filename = $tmpDir . md5($url);
|
||||||
if (wget($url, $filename)) {
|
if (wget($url, $filename)) {
|
||||||
$result = file_get_contents($filename);
|
$result = file_get_contents($filename);
|
||||||
|
_log('wget:: '.htmlentities($result));
|
||||||
unlink($filename);
|
unlink($filename);
|
||||||
if (!empty($result)) {
|
if (!empty($result)) {
|
||||||
_log('wget works ');
|
_log('wget works ');
|
||||||
|
|
|
@ -14,6 +14,7 @@ $obj = AVideoPlugin::getDataObject("Live");
|
||||||
background-color: rgba(255,0,0,0.7);
|
background-color: rgba(255,0,0,0.7);
|
||||||
}
|
}
|
||||||
#availableLiveStream{
|
#availableLiveStream{
|
||||||
|
min-width: 300px;
|
||||||
max-width: 400px;
|
max-width: 400px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
max-height: 75vh;
|
max-height: 75vh;
|
||||||
|
@ -34,7 +35,9 @@ if (empty($obj->doNotShowGoLiveButton) && User::canStream()) {
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<li class="dropdown">
|
<li class="dropdown" onclick="setTimeout(function () {
|
||||||
|
lazyImage();
|
||||||
|
}, 500);">
|
||||||
<a href="#" class="faa-parent animated-hover btn btn-default navbar-btn" data-toggle="dropdown">
|
<a href="#" class="faa-parent animated-hover btn btn-default navbar-btn" data-toggle="dropdown">
|
||||||
<span class="fas fa-bell faa-ring"></span>
|
<span class="fas fa-bell faa-ring"></span>
|
||||||
<span class="badge onlineApplications" style=" background: rgba(255,0,0,1); color: #FFF;">0</span>
|
<span class="badge onlineApplications" style=" background: rgba(255,0,0,1); color: #FFF;">0</span>
|
||||||
|
@ -55,33 +58,34 @@ if (empty($obj->doNotShowGoLiveButton) && User::canStream()) {
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<div class="col-lg-12 col-sm-12 col-xs-12 bottom-border hidden extraVideosModel liveVideo">
|
<div class="col-lg-12 col-sm-12 col-xs-12 bottom-border hidden extraVideosModel liveVideo">
|
||||||
<a href="" class="h6 videoLink">
|
<a href="" class="videoLink" class="videoLink galleryLink " >
|
||||||
<div class="col-lg-5 col-sm-5 col-xs-5 nopadding thumbsImage" style="min-height: 70px; position:relative;" >
|
<div class="aspectRatio16_9" style="min-height: 70px;" >
|
||||||
<img src="<?php echo getCDN(); ?>videos/userPhoto/logo.png" class="thumbsJPG img-responsive" height="130" itemprop="thumbnailUrl" alt="Logo" />
|
<img src="<?php echo getCDN(); ?>videos/userPhoto/logo.png" class="thumbsJPG img-responsive" height="130" itemprop="thumbnailUrl" alt="Logo" />
|
||||||
<span itemprop="uploadDate" content="<?php echo date("Y-m-d h:i:s"); ?>" />
|
|
||||||
<img src="" style="position: absolute; top: 0; display: none;" class="thumbsGIF img-responsive" height="130" />
|
<img src="" style="position: absolute; top: 0; display: none;" class="thumbsGIF img-responsive" height="130" />
|
||||||
<span class="label label-danger liveNow faa-flash faa-slow animated"><?php echo __("LIVE NOW"); ?></span>
|
<span class="label label-danger liveNow faa-flash faa-slow animated"><?php echo __("LIVE NOW"); ?></span>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-lg-7 col-sm-7 col-xs-7 videosDetails">
|
</a>
|
||||||
<div class="text-uppercase row"><strong itemprop="name" class="title liveTitle"><?php echo __("Title"); ?></strong></div>
|
|
||||||
<div class="details row" itemprop="description">
|
<a class="h6 galleryLink " href="_link_" title="_title_" >
|
||||||
<div class="pull-left">
|
<strong class="title liveTitle"><?php echo __("Title"); ?></strong>
|
||||||
<img src="" class="photoImg img img-circle img-responsive" style="max-width: 20px;">
|
</a>
|
||||||
</div>
|
<div class="galeryDetails" style="overflow: hidden;">
|
||||||
<div style="margin-left: 25px;">
|
<div>
|
||||||
<div class="liveUser"><?php echo __("User"); ?></div>
|
<img src="" class="photoImg img img-circle img-responsive" style="max-width: 20px;">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<div class="liveUser"><?php echo __("User"); ?></div>
|
||||||
<div class="clearfix"></div>
|
<div class="galleryTags">
|
||||||
<?php
|
<?php
|
||||||
if (AVideoPlugin::isEnabledByName("LiveUsers") && method_exists("LiveUsers", "getLabels")) {
|
if (AVideoPlugin::isEnabledByName("LiveUsers") && method_exists("LiveUsers", "getLabels")) {
|
||||||
echo LiveUsers::getLabels('extraVideosModelOnLineLabels');
|
echo LiveUsers::getLabels('extraVideosModelOnLineLabels');
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
var loadedExtraVideos = [];
|
var loadedExtraVideos = [];
|
||||||
/* Use this funtion to display live videos dynamic on pages*/
|
/* Use this funtion to display live videos dynamic on pages*/
|
||||||
|
@ -374,8 +378,8 @@ if (!empty($obj->playLiveInFullScreenOnIframe)) {
|
||||||
}, 200);
|
}, 200);
|
||||||
|
|
||||||
}
|
}
|
||||||
if(application.users && typeof application.users.views !== 'undefined'){
|
if (application.users && typeof application.users.views !== 'undefined') {
|
||||||
$('.views_on_total_on_live_'+application.users.transmition_key+'_'+application.users.live_servers_id).text(application.users.views);
|
$('.views_on_total_on_live_' + application.users.transmition_key + '_' + application.users.live_servers_id).text(application.users.views);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -407,6 +411,7 @@ if (!empty($obj->playLiveInFullScreenOnIframe)) {
|
||||||
console.log('socketLiveOFFCallback', json);
|
console.log('socketLiveOFFCallback', json);
|
||||||
processLiveStats(json.stats);
|
processLiveStats(json.stats);
|
||||||
var selector = '.live_' + json.live_servers_id + "_" + json.key;
|
var selector = '.live_' + json.live_servers_id + "_" + json.key;
|
||||||
|
selector += ', .liveVideo_live_' + json.live_servers_id + "_" + json.key;
|
||||||
//console.log('socketLiveOFFCallback 1', selector);
|
//console.log('socketLiveOFFCallback 1', selector);
|
||||||
$(selector).slideUp();
|
$(selector).slideUp();
|
||||||
if (typeof onlineLabelOffline == 'function') {
|
if (typeof onlineLabelOffline == 'function') {
|
||||||
|
@ -420,19 +425,21 @@ if (!empty($obj->playLiveInFullScreenOnIframe)) {
|
||||||
//console.log('socketLiveOFFCallback 3', selector);
|
//console.log('socketLiveOFFCallback 3', selector);
|
||||||
onlineLabelOffline(selector);
|
onlineLabelOffline(selector);
|
||||||
}
|
}
|
||||||
setTimeout(function(){hideExtraVideosIfEmpty();},500);
|
setTimeout(function () {
|
||||||
|
hideExtraVideosIfEmpty();
|
||||||
|
}, 500);
|
||||||
}
|
}
|
||||||
|
|
||||||
function hideExtraVideosIfEmpty() {
|
function hideExtraVideosIfEmpty() {
|
||||||
$('.extraVideos').each(function (index, currentElement) {
|
$('.extraVideos').each(function (index, currentElement) {
|
||||||
var somethingIsVisible = false;
|
var somethingIsVisible = false;
|
||||||
$(this).children('div').each(function (index2, currentElement2) {
|
$(this).children('div').each(function (index2, currentElement2) {
|
||||||
if($(this).is(":visible")){
|
if ($(this).is(":visible")) {
|
||||||
somethingIsVisible = true;
|
somethingIsVisible = true;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
if(!somethingIsVisible){
|
if (!somethingIsVisible) {
|
||||||
$('#liveVideos').slideUp();
|
$('#liveVideos').slideUp();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -2,6 +2,18 @@
|
||||||
window.addEventListener('message', event => {
|
window.addEventListener('message', event => {
|
||||||
if (event.data.startLiveRestream) {
|
if (event.data.startLiveRestream) {
|
||||||
startLiveRestream(event.data.m3u8);
|
startLiveRestream(event.data.m3u8);
|
||||||
|
}else
|
||||||
|
if (event.data.webRTCModalConfig) {
|
||||||
|
console.log('event.data.webRTCModalConfig', event.data.webRTCModalConfig, typeof webRTCModalConfigShow);
|
||||||
|
if(event.data.webRTCModalConfig==1){
|
||||||
|
if(typeof webRTCModalConfigShow =='function'){
|
||||||
|
webRTCModalConfigShow();
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
if(typeof webRTCModalConfigHide =='function'){
|
||||||
|
webRTCModalConfigHide();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
$isWebRTC = 1;
|
$isWebRTC = 1;
|
||||||
require_once '../../videos/configuration.php';
|
require_once '../../videos/configuration.php';
|
||||||
|
|
||||||
if(!User::canStream()){
|
if (!User::canStream()) {
|
||||||
forbiddenPage('You cannot stream');
|
forbiddenPage('You cannot stream');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -14,10 +14,15 @@ $iframeURL = addQueryStringParameter($iframeURL, 'userHash', Live::getUserHash(U
|
||||||
|
|
||||||
$chatURL = '';
|
$chatURL = '';
|
||||||
$chat = AVideoPlugin::loadPluginIfEnabled('Chat2');
|
$chat = AVideoPlugin::loadPluginIfEnabled('Chat2');
|
||||||
if(!empty($chat)){
|
if (!empty($chat)) {
|
||||||
Chat2::getChatRoomLink(User::getId(), 1, 1, 1, true);
|
$chatURL = Chat2::getChatRoomLink(User::getId(), 1, 1, 1, true, 1);
|
||||||
|
if(!empty($_REQUEST['user'])){
|
||||||
|
$chatURL = addQueryStringParameter($chatURL, 'user', $_REQUEST['user']);
|
||||||
|
}
|
||||||
|
if(!empty($_REQUEST['pass'])){
|
||||||
|
$chatURL = addQueryStringParameter($chatURL, 'pass', $_REQUEST['pass']);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="<?php echo $_SESSION['language']; ?>">
|
<html lang="<?php echo $_SESSION['language']; ?>">
|
||||||
|
@ -43,15 +48,21 @@ if(!empty($chat)){
|
||||||
}
|
}
|
||||||
iframe{
|
iframe{
|
||||||
width: 100vw;
|
width: 100vw;
|
||||||
height: 100vh;
|
height: calc(100vh - 45px);
|
||||||
}
|
}
|
||||||
#chat2Iframe{
|
#chat2Iframe{
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0;
|
top: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
width: 100vw;
|
/* pointer-events: none; */
|
||||||
height: 100vh;
|
}
|
||||||
|
#controls{
|
||||||
|
position: absolute;
|
||||||
|
bottom: 5px;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
#controls .col{
|
||||||
|
padding: 0 5px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<script>
|
<script>
|
||||||
|
@ -64,10 +75,19 @@ if(!empty($chat)){
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<iframe frameBorder="0" src="<?php echo $iframeURL; ?>" style="width: 100%; height: 100%;" allowusermedia allow="feature_name allow_list;feature_name allow_list;camera *;microphone *"></iframe>
|
<iframe frameBorder="0"
|
||||||
<iframe frameBorder="0" id="chat2Iframe" src="http://192.168.1.4/YouPHPTube/plugin/Chat2/?room_users_id=1&live_transmitions_history_id=1724&iframe=1&noFade=1&bubblesOnly=1"
|
src="<?php echo $iframeURL; ?>"
|
||||||
style="width: 100%; height: 100%;" ></iframe>
|
allowusermedia allow="feature_name allow_list;feature_name allow_list;camera *;microphone *"></iframe>
|
||||||
|
<?php
|
||||||
|
if(!empty($chatURL)){
|
||||||
|
?>
|
||||||
|
<iframe frameBorder="0"
|
||||||
|
id="chat2Iframe"
|
||||||
|
src="<?php echo $chatURL; ?>"
|
||||||
|
></iframe>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
<div style="z-index: 999; position: absolute; top:5px; left: 5px; opacity: 0.8; filter: alpha(opacity=80);" class="liveEmbed">
|
<div style="z-index: 999; position: absolute; top:5px; left: 5px; opacity: 0.8; filter: alpha(opacity=80);" class="liveEmbed">
|
||||||
<?php
|
<?php
|
||||||
$streamName = $uuid;
|
$streamName = $uuid;
|
||||||
|
@ -79,14 +99,61 @@ if(!empty($chat)){
|
||||||
<script src="<?php echo getCDN(); ?>view/js/js-cookie/js.cookie.js" type="text/javascript"></script>
|
<script src="<?php echo getCDN(); ?>view/js/js-cookie/js.cookie.js" type="text/javascript"></script>
|
||||||
<script src="<?php echo getCDN(); ?>view/js/jquery-toast/jquery.toast.min.js" type="text/javascript"></script>
|
<script src="<?php echo getCDN(); ?>view/js/jquery-toast/jquery.toast.min.js" type="text/javascript"></script>
|
||||||
<script src="<?php echo getCDN(); ?>view/js/seetalert/sweetalert.min.js" type="text/javascript"></script>
|
<script src="<?php echo getCDN(); ?>view/js/seetalert/sweetalert.min.js" type="text/javascript"></script>
|
||||||
<?php
|
|
||||||
require_once $global['systemRootPath'] . 'plugin/AVideoPlugin.php';
|
|
||||||
?>
|
|
||||||
<!-- getFooterCode start -->
|
<!-- getFooterCode start -->
|
||||||
<?php
|
<?php
|
||||||
echo AVideoPlugin::getFooterCode();
|
echo AVideoPlugin::getFooterCode();
|
||||||
?>
|
?>
|
||||||
<!-- getFooterCode end -->
|
<!-- getFooterCode end -->
|
||||||
|
<div class="" id="controls">
|
||||||
|
<div class="col col-xs-8" id="webRTCDisconnect" style="display: none;" >
|
||||||
|
<button class="btn btn-danger btn-block" onclick="webRTCDisconnect();" data-toggle="tooltip" title="<?php echo __("Stop"); ?>">
|
||||||
|
<i class="fas fa-stop"></i> <?php echo __("Stop"); ?>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<div class="col col-xs-8" id="webRTCConnect" style="display: none;" >
|
||||||
|
<button class="btn btn-success btn-block" onclick="webRTCConnect();" data-toggle="tooltip" title="<?php echo __("Start Live Now"); ?>">
|
||||||
|
<i class="fas fa-circle"></i> <?php echo __("Go Live"); ?>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<div class="col col-xs-4">
|
||||||
|
<button class="btn btn-primary btn-block" style="" onclick="webRTCConfiguration();" data-toggle="tooltip" data-placement="bottom" title="<?php echo __("Configuration"); ?>">
|
||||||
|
<i class="fas fa-cog"></i> <span class="hidden-sm hidden-xs"><?php echo __("Configuration"); ?></span>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<script src="<?php echo getCDN(); ?>plugin/Live/webRTC.js" type="text/javascript"></script>
|
||||||
|
<script>
|
||||||
|
var updateControlStatusLastState;
|
||||||
|
|
||||||
|
function updateControlStatus() {
|
||||||
|
var hasclass = $('.liveOnlineLabel').hasClass('label-danger');
|
||||||
|
if (updateControlStatusLastState === hasclass) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
updateControlStatusLastState = hasclass;
|
||||||
|
if (hasclass) {
|
||||||
|
$('#webRTCDisconnect').hide();
|
||||||
|
$('#webRTCConnect').show();
|
||||||
|
} else {
|
||||||
|
$('#webRTCDisconnect').show();
|
||||||
|
$('#webRTCConnect').hide();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$(document).ready(function () {
|
||||||
|
updateControlStatus();
|
||||||
|
setInterval(function () {
|
||||||
|
updateControlStatus();
|
||||||
|
}, 500);
|
||||||
|
});
|
||||||
|
|
||||||
|
function webRTCModalConfigShow(){
|
||||||
|
$('#chat2Iframe').fadeOut();
|
||||||
|
}
|
||||||
|
function webRTCModalConfigHide(){
|
||||||
|
$('#chat2Iframe').fadeIn();
|
||||||
|
}
|
||||||
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
||||||
|
|
|
@ -121,10 +121,10 @@ class LiveLinks extends PluginAbstract {
|
||||||
public function getLiveApplicationArray() {
|
public function getLiveApplicationArray() {
|
||||||
global $global;
|
global $global;
|
||||||
$obj = $this->getDataObject();
|
$obj = $this->getDataObject();
|
||||||
$filename = $global['systemRootPath'] . 'plugin/LiveLinks/view/menuItem.html';
|
//$filename = $global['systemRootPath'] . 'plugin/LiveLinks/view/menuItem.html';
|
||||||
$filenameExtra = $global['systemRootPath'] . 'plugin/LiveLinks/view/extraItem.html';
|
$filenameExtra = $global['systemRootPath'] . 'plugin/LiveLinks/view/extraItem.html';
|
||||||
$filenameExtraVideoPage = $global['systemRootPath'] . 'plugin/LiveLinks/view/extraItemVideoPage.html';
|
$filenameExtraVideoPage = $global['systemRootPath'] . 'plugin/LiveLinks/view/extraItemVideoPage.html';
|
||||||
$filenameListItem = $global['systemRootPath'] . 'plugin/LiveLinks/view/videoListItem.html';
|
$filename = $filenameListItem = $global['systemRootPath'] . 'plugin/LiveLinks/view/videoListItem.html';
|
||||||
$row = LiveLinks::getAllActive(true, true);
|
$row = LiveLinks::getAllActive(true, true);
|
||||||
//var_dump($row);exit;
|
//var_dump($row);exit;
|
||||||
$array = array();
|
$array = array();
|
||||||
|
@ -166,8 +166,8 @@ class LiveLinks extends PluginAbstract {
|
||||||
$name,
|
$name,
|
||||||
str_replace('"', "", $value['description']),
|
str_replace('"', "", $value['description']),
|
||||||
self::getLink($value['id']),
|
self::getLink($value['id']),
|
||||||
'<img src="' . "{$global['webSiteRootURL']}plugin/LiveLinks/getImage.php?id={$value['id']}&format=jpg" . '" class="thumbsJPG img-responsive" height="130">',
|
'<img src="'. getCDN().'view/img/loading-gif.png" data-src="' . "{$global['webSiteRootURL']}plugin/LiveLinks/getImage.php?id={$value['id']}&format=jpg" . '" class="thumbsJPG img-responsive" height="130">',
|
||||||
empty($obj->disableGifThumbs) ? ('<img src="' . "{$global['webSiteRootURL']}plugin/LiveLinks/getImage.php?id={$value['id']}&format=webp" . '" style="position: absolute; top: 0px; height: 0px; width: 0px; display: none;" class="thumbsGIF img-responsive" height="130">') : "",
|
empty($obj->disableGifThumbs) ? ('<img src="'. getCDN().'view/img/loading-gif.png" data-src="' . "{$global['webSiteRootURL']}plugin/LiveLinks/getImage.php?id={$value['id']}&format=webp" . '" style="position: absolute; top: 0px; height: 0px; width: 0px; display: none;" class="thumbsGIF img-responsive" height="130">') : "",
|
||||||
"col-lg-2 col-md-4 col-sm-4 col-xs-6",
|
"col-lg-2 col-md-4 col-sm-4 col-xs-6",
|
||||||
($liveUsers ? getLiveUsersLabelLiveLinks($value['id']) : '')
|
($liveUsers ? getLiveUsersLabelLiveLinks($value['id']) : '')
|
||||||
);
|
);
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<li>
|
<li>
|
||||||
<a href="<?php echo $global['webSiteRootURL']; ?>plugin/LiveLinks" data-toggle="tooltip" title="<?php echo __("Add an External a Live Streaming"); ?>" data-placement="left" >
|
<a href="<?php echo $global['webSiteRootURL']; ?>plugin/LiveLinks" data-toggle="tooltip" title="<?php echo __("Add an External a Live Streaming"); ?>" data-placement="left" >
|
||||||
<i class="fas fa-link"></i> <span class="hidden-md hidden-sm hidden-mdx"><?php echo $buttonTitle; ?></span>
|
<i class="fas fa-link"></i> <?php echo $buttonTitle; ?>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
|
@ -1,24 +1,22 @@
|
||||||
<div class="liveVideo _class_ fixPadding liveLink liveLink__unique_id_" id="extraItemLiveLink__unique_id_" style="z-index: 2;">
|
<div class="liveVideo _class_ fixPadding liveLink liveLink__unique_id_" id="extraItemLiveLink__unique_id_" style="z-index: 2;">
|
||||||
<a href="_link_" title="_title_" class="h6 videoLink">
|
<a href="_link_" title="_title_" class="videoLink galleryLink " >
|
||||||
<div class="thumbsImage aspectRatio16_9" style="min-height: 70px; position:relative;">
|
<div class="aspectRatio16_9">
|
||||||
_imgJPG_
|
_imgJPG_
|
||||||
_imgGIF_
|
_imgGIF_
|
||||||
<span class="label label-danger liveNow faa-flash faa-slow animated">LIVE NOW</span>
|
<span class="label label-danger liveNow faa-flash faa-slow animated">LIVE NOW</span>
|
||||||
</div>
|
</div>
|
||||||
|
</a>
|
||||||
|
<a class="h6 galleryLink " href="_link_" title="_title_" >
|
||||||
|
<strong class="title">_title_</strong>
|
||||||
|
</a>
|
||||||
|
|
||||||
<div class="videosDetails">
|
<div class="galeryDetails" style="overflow: hidden;">
|
||||||
<div class="text-uppercase row">
|
<div>
|
||||||
<strong itemprop="name" class="title liveTitle">_title_</strong></div>
|
<img src="_user_photo_" class="photoImg img img-circle img-responsive" style="max-width: 20px;">
|
||||||
<div class="details row" itemprop="description">
|
|
||||||
<div class="pull-left">
|
|
||||||
<img src="_user_photo_" class="photoImg img img-circle img-responsive" style="max-width: 20px;">
|
|
||||||
</div>
|
|
||||||
<div style="margin-left: 25px;">
|
|
||||||
<div class="liveUser">_user_identification_</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<span class="label label-warning livelinksLabel" data-toggle="tooltip" title="" data-placement="bottom" style="border-radius: 0.25em;" ><i class="fas fa-external-link-alt"></i> Live Link</span>
|
<div class="liveUser">_user_identification_</div>
|
||||||
_total_on_live_links_id_
|
<div class="galleryTags">
|
||||||
</a>
|
_total_on_live_links_id_
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
|
@ -1,5 +1,5 @@
|
||||||
<div class="col-lg-12 col-sm-12 col-xs-12 bottom-border liveVideo liveLink liveLink__unique_id_" id="extraItemVideoPageLiveLink__unique_id_" >
|
<div class="col-lg-12 col-sm-12 col-xs-12 bottom-border liveVideo liveLink liveLink__unique_id_" id="extraItemVideoPageLiveLink__unique_id_" >
|
||||||
<a href="_link_" title="_title_" class="h6 videoLink aspectRatio16_9">
|
<a href="_link_" title="_title_" class="videoLink aspectRatio16_9">
|
||||||
<div class="col-lg-5 col-sm-5 col-xs-5 nopadding thumbsImage" style="min-height: 70px; position:relative;">
|
<div class="col-lg-5 col-sm-5 col-xs-5 nopadding thumbsImage" style="min-height: 70px; position:relative;">
|
||||||
_imgJPG_
|
_imgJPG_
|
||||||
_imgGIF_
|
_imgGIF_
|
||||||
|
|
|
@ -8,21 +8,14 @@
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-lg-7 col-sm-7 col-xs-7 videosDetails" style="font-size: 0.75em;">
|
<div class="col-lg-7 col-sm-7 col-xs-7 videosDetails" >
|
||||||
|
|
||||||
<a href="_link_" title="_title_">
|
<a href="_link_" title="_title_">
|
||||||
<div class="text-uppercase row"><strong class="title">_title_</strong></div>
|
<div class="text-uppercase row"><strong class="title">_title_</strong></div>
|
||||||
</a>
|
</a>
|
||||||
<div class="details row">
|
<div class="details row">
|
||||||
<div class="text-muted pull-right" style="display:flex;font-size: 1.2em;">
|
<div class="text-muted pull-right" style="display:flex;">
|
||||||
<div class="label label-primary alreadyTooltip" data-toggle="tooltip" title="" data-original-title="Assistindo agora">
|
_total_on_live_links_id_
|
||||||
<i class="fa fa-eye"></i>
|
|
||||||
<b class="total_on total_on_videos_id_350 liveUsersOnline">0</b>
|
|
||||||
</div>
|
|
||||||
<div class="label label-default alreadyTooltip" data-toggle="tooltip" title="" data-original-title="Visualizações totais">
|
|
||||||
<i class="fa fa-user"></i>
|
|
||||||
<b class="views_on_total_on_videos_id_350 liveUsersViews">1</b>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="clearfix"></div>
|
<div class="clearfix"></div>
|
||||||
<div class="nopadding" style="margin-top: 5px !important;">
|
<div class="nopadding" style="margin-top: 5px !important;">
|
||||||
|
@ -35,8 +28,6 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<span class="label label-warning livelinksLabel" data-toggle="tooltip" title="" data-placement="bottom" style="border-radius: 0.25em;" ><i class="fas fa-external-link-alt"></i> Live Link</span>
|
|
||||||
_total_on_live_links_id_
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
|
@ -69,6 +69,7 @@ Passcode: {password}
|
||||||
$obj->JWT_APP_ID = "my_jitsi_app_id";
|
$obj->JWT_APP_ID = "my_jitsi_app_id";
|
||||||
$obj->JWT_APP_SECRET = "my_jitsi_app_secret";
|
$obj->JWT_APP_SECRET = "my_jitsi_app_secret";
|
||||||
$obj->hideTopButton = true;
|
$obj->hideTopButton = true;
|
||||||
|
$obj->buttonTitle = 'Meet';
|
||||||
self::addDataObjectHelper('hideTopButton', 'Hide Top Button', 'This will hide the button on the top menu bar');
|
self::addDataObjectHelper('hideTopButton', 'Hide Top Button', 'This will hide the button on the top menu bar');
|
||||||
return $obj;
|
return $obj;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<li>
|
<li>
|
||||||
<a href="<?php echo $global['webSiteRootURL']; ?>plugin/Meet" data-toggle="tooltip" title="<?php echo __('Meet'); ?>" data-placement="left" >
|
<a href="<?php echo $global['webSiteRootURL']; ?>plugin/Meet" data-toggle="tooltip" title="<?php echo __($buttonTitle); ?>" data-placement="left" >
|
||||||
<i class="fas fa-comments"></i> <span class="hidden-md hidden-sm hidden-mdx"><?php echo __('Meet'); ?></span>
|
<i class="fas fa-comments"></i> <?php echo __($buttonTitle); ?>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
|
@ -76,7 +76,7 @@ class MobileManager extends PluginAbstract {
|
||||||
$obj->disableComments = false;
|
$obj->disableComments = false;
|
||||||
$obj->approvalMode = false;
|
$obj->approvalMode = false;
|
||||||
$obj->showMeet = true;
|
$obj->showMeet = true;
|
||||||
$obj->goLiveWithMeet = true;
|
$obj->goLiveWithMeet = false;
|
||||||
$obj->doNotAutoSearch = false;
|
$obj->doNotAutoSearch = false;
|
||||||
$obj->playStoreApp = 'https://play.google.com/store/apps/details?id=mobile.youphptube.com';
|
$obj->playStoreApp = 'https://play.google.com/store/apps/details?id=mobile.youphptube.com';
|
||||||
$obj->appleStoreApp = 'https://apps.apple.com/us/app/youphptube/id1337322357';
|
$obj->appleStoreApp = 'https://apps.apple.com/us/app/youphptube/id1337322357';
|
||||||
|
|
|
@ -47,7 +47,7 @@ class PayPalYPT_log extends ObjectYPT {
|
||||||
}
|
}
|
||||||
|
|
||||||
function setJson($json) {
|
function setJson($json) {
|
||||||
if(!is_string($json)){
|
if (!is_string($json)) {
|
||||||
$json = _json_encode($json);
|
$json = _json_encode($json);
|
||||||
}
|
}
|
||||||
$this->json = $json;
|
$this->json = $json;
|
||||||
|
@ -92,7 +92,7 @@ class PayPalYPT_log extends ObjectYPT {
|
||||||
function getToken() {
|
function getToken() {
|
||||||
return $this->token;
|
return $this->token;
|
||||||
}
|
}
|
||||||
|
|
||||||
static function getFromToken($token) {
|
static function getFromToken($token) {
|
||||||
global $global;
|
global $global;
|
||||||
$sql = "SELECT * FROM " . static::getTableName() . " WHERE token = ? LIMIT 1";
|
$sql = "SELECT * FROM " . static::getTableName() . " WHERE token = ? LIMIT 1";
|
||||||
|
@ -107,7 +107,7 @@ class PayPalYPT_log extends ObjectYPT {
|
||||||
}
|
}
|
||||||
return $row;
|
return $row;
|
||||||
}
|
}
|
||||||
|
|
||||||
static function getFromRecurringPaymentId($recurring_payment_id) {
|
static function getFromRecurringPaymentId($recurring_payment_id) {
|
||||||
global $global;
|
global $global;
|
||||||
$sql = "SELECT * FROM " . static::getTableName() . " WHERE recurring_payment_id = ? LIMIT 1";
|
$sql = "SELECT * FROM " . static::getTableName() . " WHERE recurring_payment_id = ? LIMIT 1";
|
||||||
|
@ -123,4 +123,33 @@ class PayPalYPT_log extends ObjectYPT {
|
||||||
return $row;
|
return $row;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static function getAllFromUser($users_id) {
|
||||||
|
global $global;
|
||||||
|
$sql = "SELECT * FROM " . static::getTableName() . " WHERE users_id = ? ";
|
||||||
|
|
||||||
|
$sql .= self::getSqlFromPost();
|
||||||
|
$res = sqlDAL::readSql($sql, "i", array($users_id));
|
||||||
|
$fullData = sqlDAL::fetchAllAssoc($res);
|
||||||
|
sqlDAL::close($res);
|
||||||
|
$rows = array();
|
||||||
|
if ($res != false) {
|
||||||
|
foreach ($fullData as $row) {
|
||||||
|
$search = array('"get":{"json":"{', '}","success"');
|
||||||
|
$replace = array('"get":{"json":{', '},"success"');
|
||||||
|
$row['json'] = str_replace($search, $replace, $row['json']);
|
||||||
|
$rows[] = $row;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
_error_log($sql . ' Error : (' . $global['mysqli']->errno . ') ' . $global['mysqli']->error);
|
||||||
|
}
|
||||||
|
return $rows;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function save() {
|
||||||
|
global $global;
|
||||||
|
$this->json = $global['mysqli']->real_escape_string($this->json);
|
||||||
|
|
||||||
|
return parent::save();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -406,7 +406,7 @@ class PayPalYPT extends PluginAbstract {
|
||||||
// Create a new billing plan
|
// Create a new billing plan
|
||||||
$plan = new Plan();
|
$plan = new Plan();
|
||||||
$plan->setName(substr(cleanString($name), 0, 126))
|
$plan->setName(substr(cleanString($name), 0, 126))
|
||||||
->setDescription(substr(cleanString($name), 0, 126))
|
->setDescription(substr(json_encode(User::getId()), 0, 126))
|
||||||
->setType('INFINITE');
|
->setType('INFINITE');
|
||||||
|
|
||||||
$paymentDefinitionArray = array();
|
$paymentDefinitionArray = array();
|
||||||
|
@ -441,7 +441,7 @@ class PayPalYPT extends PluginAbstract {
|
||||||
$merchantPreferences->setReturnUrl($success_url)
|
$merchantPreferences->setReturnUrl($success_url)
|
||||||
->setCancelUrl($cancel_url)
|
->setCancelUrl($cancel_url)
|
||||||
->setNotifyUrl($notify_url)
|
->setNotifyUrl($notify_url)
|
||||||
->setAutoBillAmount('yes')
|
->setAutoBillAmount('YES')
|
||||||
->setInitialFailAmountAction('CONTINUE')
|
->setInitialFailAmountAction('CONTINUE')
|
||||||
->setMaxFailAttempts('0')
|
->setMaxFailAttempts('0')
|
||||||
->setSetupFee(new Currency(array('value' => $total, 'currency' => $currency)));
|
->setSetupFee(new Currency(array('value' => $total, 'currency' => $currency)));
|
||||||
|
@ -449,7 +449,7 @@ class PayPalYPT extends PluginAbstract {
|
||||||
$merchantPreferences->setReturnUrl($success_url)
|
$merchantPreferences->setReturnUrl($success_url)
|
||||||
->setCancelUrl($cancel_url)
|
->setCancelUrl($cancel_url)
|
||||||
->setNotifyUrl($notify_url)
|
->setNotifyUrl($notify_url)
|
||||||
->setAutoBillAmount('yes')
|
->setAutoBillAmount('YES')
|
||||||
->setInitialFailAmountAction('CONTINUE')
|
->setInitialFailAmountAction('CONTINUE')
|
||||||
->setMaxFailAttempts('0');
|
->setMaxFailAttempts('0');
|
||||||
}
|
}
|
||||||
|
@ -871,5 +871,10 @@ class PayPalYPT extends PluginAbstract {
|
||||||
$row = PayPalYPT_log::getFromRecurringPaymentId($recurring_payment_id);
|
$row = PayPalYPT_log::getFromRecurringPaymentId($recurring_payment_id);
|
||||||
return !empty($row);
|
return !empty($row);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static function getAllLogsFromUser($users_id){
|
||||||
|
$rows = PayPalYPT_log::getAllFromUser($users_id);
|
||||||
|
return $rows;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
37
plugin/PayPalYPT/agreementCancel.json.php
Normal file
37
plugin/PayPalYPT/agreementCancel.json.php
Normal file
|
@ -0,0 +1,37 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
require_once '../../videos/configuration.php';
|
||||||
|
|
||||||
|
header('Content-Type: application/json');
|
||||||
|
$obj = new stdClass();
|
||||||
|
$obj->error = true;
|
||||||
|
$obj->msg = "";
|
||||||
|
|
||||||
|
if (!User::isLogged()) {
|
||||||
|
$obj->msg = "Only for Logged";
|
||||||
|
die(json_encode($obj));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (empty($_REQUEST['agreement'])) {
|
||||||
|
$obj->msg = "Empty Agreement ID";
|
||||||
|
die(json_encode($obj));
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!User::isLogged()){
|
||||||
|
$obj->msg = "Please login first";
|
||||||
|
die(json_encode($obj));
|
||||||
|
}
|
||||||
|
|
||||||
|
$plugin = AVideoPlugin::loadPluginIfEnabled("PayPalYPT");
|
||||||
|
|
||||||
|
$agreement = PayPalYPT::cancelAgreement($_REQUEST['agreement']);
|
||||||
|
|
||||||
|
if(empty($agreement)){
|
||||||
|
$obj->msg = "Agreement not found";
|
||||||
|
die(json_encode($obj));
|
||||||
|
}
|
||||||
|
|
||||||
|
$obj->error = false;
|
||||||
|
_error_log("agreementCancel: ".json_encode($agreement->getAgreementDetails()));
|
||||||
|
die(json_encode($obj));
|
||||||
|
?>
|
|
@ -37,7 +37,6 @@ if (empty($_REQUEST['success'])) {
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
_error_log("PayPalIPN V2: " . json_encode($obj));
|
|
||||||
_error_log("PayPalIPN V2: POST " . json_encode($_POST));
|
_error_log("PayPalIPN V2: POST " . json_encode($_POST));
|
||||||
_error_log("PayPalIPN V2: GET " . json_encode($_GET));
|
_error_log("PayPalIPN V2: GET " . json_encode($_GET));
|
||||||
|
|
||||||
|
@ -51,8 +50,25 @@ if (!empty($_GET['token'])) {
|
||||||
if (!PayPalYPT::isTokenUsed($_GET['token'])) {
|
if (!PayPalYPT::isTokenUsed($_GET['token'])) {
|
||||||
_error_log("PayPalIPN V2: token will be processed ");
|
_error_log("PayPalIPN V2: token will be processed ");
|
||||||
$agreement = $paypal->execute();
|
$agreement = $paypal->execute();
|
||||||
$payment_amount = floatval($agreement->agreement_details->last_payment_amount->value);
|
//_error_log("PayPalIPN V2: agreement ". print_r($agreement->getAgreementDetails()->getLastPaymentAmount()->getValue(), true));
|
||||||
$payment_currency = $agreement->agreement_details->last_payment_amount->currency;
|
|
||||||
|
if ($agreement->getState() !== 'Active') {
|
||||||
|
$obj->msg = 'The Agreement is not active yet ';
|
||||||
|
_error_log("PayPalIPN V2: {$obj->msg} ");
|
||||||
|
die(json_encode($obj));
|
||||||
|
}
|
||||||
|
|
||||||
|
$lastPayment = $agreement->getAgreementDetails()->getLastPaymentAmount();
|
||||||
|
if (empty($lastPayment)) {
|
||||||
|
$lastPayment = $agreement->getPlan()->getMerchantPreferences()->getSetupFee();
|
||||||
|
}
|
||||||
|
if (empty($lastPayment)) {
|
||||||
|
_error_log("PayPalIPN V2: agreement " . print_r($agreement, true));
|
||||||
|
var_dump($agreement);
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
$payment_amount = floatval($lastPayment->getValue());
|
||||||
|
$payment_currency = $lastPayment->getCurrency();
|
||||||
//$payment_time = strtotime($agreement->agreement_details->last_payment_date);
|
//$payment_time = strtotime($agreement->agreement_details->last_payment_date);
|
||||||
|
|
||||||
$pp = new PayPalYPT_log(0);
|
$pp = new PayPalYPT_log(0);
|
||||||
|
@ -60,7 +76,7 @@ if (!empty($_GET['token'])) {
|
||||||
$pp->setAgreement_id($agreement->id);
|
$pp->setAgreement_id($agreement->id);
|
||||||
$pp->setToken($_GET['token']);
|
$pp->setToken($_GET['token']);
|
||||||
$pp->setValue($payment_amount);
|
$pp->setValue($payment_amount);
|
||||||
$pp->setJson(array('agreement' => $agreement, 'post' => $_POST, 'get' => $_GET));
|
$pp->setJson(array('post' => $_POST, 'get' => $_GET));
|
||||||
} else {
|
} else {
|
||||||
_error_log("PayPalIPN V2: token was already processed ");
|
_error_log("PayPalIPN V2: token was already processed ");
|
||||||
}
|
}
|
||||||
|
@ -111,7 +127,8 @@ if (!empty($json->type)) {
|
||||||
if (!empty($json->Fsubscriptions_plan_id) && !empty($json->users_id)) {
|
if (!empty($json->Fsubscriptions_plan_id) && !empty($json->users_id)) {
|
||||||
$fsObj = AVideoPlugin::getDataObjectIfEnabled('FansSubscriptions');
|
$fsObj = AVideoPlugin::getDataObjectIfEnabled('FansSubscriptions');
|
||||||
if (!empty($fsObj) && !empty($json->users_id)) {
|
if (!empty($fsObj) && !empty($json->users_id)) {
|
||||||
if (FansSubscriptions::renew($json->users_id, $json->Fsubscriptions_plan_id)) {
|
if ($renew = FansSubscriptions::renew($json->users_id, $json->Fsubscriptions_plan_id)) {
|
||||||
|
$redirectUri = addQueryStringParameter($redirectUri, 'msg', $renew->msg);
|
||||||
header('Location: ' . $redirectUri);
|
header('Location: ' . $redirectUri);
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
118
plugin/PayPalYPT/subscriptions_list.php
Normal file
118
plugin/PayPalYPT/subscriptions_list.php
Normal file
|
@ -0,0 +1,118 @@
|
||||||
|
<?php
|
||||||
|
global $global, $config;
|
||||||
|
if (!isset($global['systemRootPath'])) {
|
||||||
|
require_once '../../videos/configuration.php';
|
||||||
|
}
|
||||||
|
if (!User::isLogged()) {
|
||||||
|
forbiddenPage();
|
||||||
|
}
|
||||||
|
$rows = PayPalYPT::getAllLogsFromUser(User::getId());
|
||||||
|
?>
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="<?php echo $_SESSION['language']; ?>">
|
||||||
|
<head>
|
||||||
|
<title>Paypal subscriptions</title>
|
||||||
|
<?php
|
||||||
|
include $global['systemRootPath'] . 'view/include/head.php';
|
||||||
|
?>
|
||||||
|
</head>
|
||||||
|
<body class="<?php echo $global['bodyClass']; ?>">
|
||||||
|
<?php
|
||||||
|
include $global['systemRootPath'] . 'view/include/navbar.php';
|
||||||
|
?>
|
||||||
|
<div class="container">
|
||||||
|
|
||||||
|
<table class="display table table-bordered table-responsive table-striped table-hover table-condensed" width="100%" cellspacing="0">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>#</th>
|
||||||
|
<th><?php echo __("Type"); ?></th>
|
||||||
|
<th><?php echo __("Agreement ID"); ?></th>
|
||||||
|
<th><?php echo __("Status"); ?></th>
|
||||||
|
<th><?php echo __("Date"); ?></th>
|
||||||
|
<th></th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<?php
|
||||||
|
foreach ($rows as $value) {
|
||||||
|
$json = json_decode($value['json']);
|
||||||
|
$value['status'] = '';
|
||||||
|
if (!empty($value['agreement_id'])) {
|
||||||
|
$agreement = PayPalYPT::getBillingAgreement($value['agreement_id']);
|
||||||
|
if (!empty($agreement)) {
|
||||||
|
$value['status'] = $agreement->getState();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<tr id="tr<?php echo $value['agreement_id']; ?>">
|
||||||
|
<td><?php echo $value['id']; ?></td>
|
||||||
|
<td>
|
||||||
|
<?php echo $json->get->json->type; ?>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<?php echo $value['agreement_id']; ?>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<?php echo $value['created']; ?>
|
||||||
|
</td>
|
||||||
|
<td><?php echo $value['expiration']; ?></td>
|
||||||
|
<td><?php echo $value['expiration']; ?></td>
|
||||||
|
<td>
|
||||||
|
<?php
|
||||||
|
if ($value['status'] == 'Active') {
|
||||||
|
?>
|
||||||
|
<button class="btn btn-danger btn-xs" onclick="cancelAgreement('<?php echo $value['agreement_id']; ?>')">
|
||||||
|
<?php
|
||||||
|
echo __('Cancel Agreement');
|
||||||
|
?>
|
||||||
|
</button>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</tbody>
|
||||||
|
<tfoot>
|
||||||
|
<tr>
|
||||||
|
<th>#</th>
|
||||||
|
<th><?php echo __("Type"); ?></th>
|
||||||
|
<th><?php echo __("Agreement ID"); ?></th>
|
||||||
|
<th><?php echo __("Status"); ?></th>
|
||||||
|
<th><?php echo __("Date"); ?></th>
|
||||||
|
<th></th>
|
||||||
|
</tr>
|
||||||
|
</tfoot>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<?php
|
||||||
|
include $global['systemRootPath'] . 'view/include/footer.php';
|
||||||
|
?>
|
||||||
|
<script>
|
||||||
|
$(document).ready(function () {
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
function cancelAgreement(agreement_id) {
|
||||||
|
modal.showPleaseWait();
|
||||||
|
$.ajax({
|
||||||
|
url: webSiteRootURL + 'plugin/PayPalYPT/agreementCancel.json.php',
|
||||||
|
data: {agreement: agreement_id},
|
||||||
|
type: 'post',
|
||||||
|
success: function (response) {
|
||||||
|
if (response.error) {
|
||||||
|
avideoAlertError(response.msg);
|
||||||
|
} else {
|
||||||
|
$('.tr' + agreement_id).fadeOut();
|
||||||
|
avideoToastSuccess(response.msg);
|
||||||
|
}
|
||||||
|
modal.hidePleaseWait();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -87,7 +87,7 @@ class PlayLists extends PluginAbstract {
|
||||||
}
|
}
|
||||||
$obj = $this->getDataObject();
|
$obj = $this->getDataObject();
|
||||||
//echo "getNetflixActionButton: ".$videos_id;
|
//echo "getNetflixActionButton: ".$videos_id;
|
||||||
$btnClass = "text-primary";
|
$btnClass = "";
|
||||||
echo '<div class="">';
|
echo '<div class="">';
|
||||||
include $global['systemRootPath'] . 'plugin/PlayLists/actionButton.php';
|
include $global['systemRootPath'] . 'plugin/PlayLists/actionButton.php';
|
||||||
echo '</div>';
|
echo '</div>';
|
||||||
|
|
|
@ -71,13 +71,13 @@ class PlayerSkins extends PluginAbstract {
|
||||||
$video = Video::getVideoFromFileName($filename, true);
|
$video = Video::getVideoFromFileName($filename, true);
|
||||||
$vType = Video::getIncludeType($video);
|
$vType = Video::getIncludeType($video);
|
||||||
$_GET['isMediaPlaySite'] = $video['id'];
|
$_GET['isMediaPlaySite'] = $video['id'];
|
||||||
if(is_object($video['externalOptions'])){
|
if (is_object($video['externalOptions'])) {
|
||||||
if (!empty($video['externalOptions']->videoStartSeconds)) {
|
if (!empty($video['externalOptions']->videoStartSeconds)) {
|
||||||
$video['externalOptions']->videoStartSeconds = parseDurationToSeconds($video['externalOptions']->videoStartSeconds);
|
$video['externalOptions']->videoStartSeconds = parseDurationToSeconds($video['externalOptions']->videoStartSeconds);
|
||||||
} else {
|
} else {
|
||||||
$video['externalOptions']->videoStartSeconds = 0;
|
$video['externalOptions']->videoStartSeconds = 0;
|
||||||
}
|
}
|
||||||
}else{
|
} else {
|
||||||
//_error_log('externalOptions Error '.$video['externalOptions'], AVideoLog::$WARNING);
|
//_error_log('externalOptions Error '.$video['externalOptions'], AVideoLog::$WARNING);
|
||||||
$video['externalOptions'] = new stdClass();
|
$video['externalOptions'] = new stdClass();
|
||||||
$video['externalOptions']->videoStartSeconds = 0;
|
$video['externalOptions']->videoStartSeconds = 0;
|
||||||
|
@ -94,17 +94,17 @@ class PlayerSkins extends PluginAbstract {
|
||||||
$html .= "<script>$(document).ready(function () {\$('time.duration').hide();});</script>";
|
$html .= "<script>$(document).ready(function () {\$('time.duration').hide();});</script>";
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
if (AVideoPlugin::isEnabledByName('SubtitleSwitcher') && function_exists('getVTTTracks')) {
|
if (AVideoPlugin::isEnabledByName('SubtitleSwitcher') && function_exists('getVTTTracks')) {
|
||||||
$htmlMediaTag .= "<!-- getVTTTracks 1 -->";
|
$htmlMediaTag .= "<!-- getVTTTracks 1 -->";
|
||||||
$htmlMediaTag .= getVTTTracks($video['filename']);
|
$htmlMediaTag .= getVTTTracks($video['filename']);
|
||||||
}else{
|
}else{
|
||||||
if(!AVideoPlugin::isEnabledByName('SubtitleSwitcher')){
|
if(!AVideoPlugin::isEnabledByName('SubtitleSwitcher')){
|
||||||
$htmlMediaTag .= "<!-- SubtitleSwitcher disabled -->";
|
$htmlMediaTag .= "<!-- SubtitleSwitcher disabled -->";
|
||||||
}
|
}
|
||||||
if(!function_exists('getVTTTracks')){
|
if(!function_exists('getVTTTracks')){
|
||||||
$htmlMediaTag .= "<!-- getVTTTracks not found -->";
|
$htmlMediaTag .= "<!-- getVTTTracks not found -->";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
$htmlMediaTag .= '<p>' . __("If you can't view this video, your browser does not support HTML5 videos") . '</p><p class="vjs-no-js">' . __("To view this video please enable JavaScript, and consider upgrading to a web browser that") . '<a href="http://videojs.com/html5-video-support/" target="_blank" rel="noopener noreferrer">supports HTML5 video</a></p></video>';
|
$htmlMediaTag .= '<p>' . __("If you can't view this video, your browser does not support HTML5 videos") . '</p><p class="vjs-no-js">' . __("To view this video please enable JavaScript, and consider upgrading to a web browser that") . '<a href="http://videojs.com/html5-video-support/" target="_blank" rel="noopener noreferrer">supports HTML5 video</a></p></video>';
|
||||||
|
@ -168,21 +168,21 @@ class PlayerSkins extends PluginAbstract {
|
||||||
$htmlMediaTag .= '<iframe class="embed-responsive-item" scrolling="no" allowfullscreen="true" src="' . $link . '"></iframe>';
|
$htmlMediaTag .= '<iframe class="embed-responsive-item" scrolling="no" allowfullscreen="true" src="' . $link . '"></iframe>';
|
||||||
$htmlMediaTag .= '<script>$(document).ready(function () {addView(' . $video['id'] . ', 0);});</script>';
|
$htmlMediaTag .= '<script>$(document).ready(function () {addView(' . $video['id'] . ', 0);});</script>';
|
||||||
}
|
}
|
||||||
|
|
||||||
$html .= "<script>var mediaId = '{$video['id']}';var player;" . self::playerJSCodeOnLoad($video['id'], @$autoPlayURL) . '</script>';
|
$html .= "<script>var mediaId = '{$video['id']}';var player;" . self::playerJSCodeOnLoad($video['id'], @$autoPlayURL) . '</script>';
|
||||||
}
|
}
|
||||||
|
|
||||||
$col1Classes = 'col-md-2 firstC';
|
$col1Classes = 'col-md-2 firstC';
|
||||||
$col2Classes = 'col-md-8 secC';
|
$col2Classes = 'col-md-8 secC';
|
||||||
$col3Classes = 'col-md-2 thirdC';
|
$col3Classes = 'col-md-2 thirdC';
|
||||||
if($obj->playerFullHeight){
|
if ($obj->playerFullHeight) {
|
||||||
$col2Classes .= ' text-center playerFullHeight';
|
$col2Classes .= ' text-center playerFullHeight';
|
||||||
}
|
}
|
||||||
|
|
||||||
$html .= '
|
$html .= '
|
||||||
<div class="row main-video" id="mvideo">
|
<div class="row main-video" id="mvideo">
|
||||||
<div class="'.$col1Classes.'"></div>
|
<div class="' . $col1Classes . '"></div>
|
||||||
<div class="'.$col2Classes.'">
|
<div class="' . $col2Classes . '">
|
||||||
<div id="videoContainer">
|
<div id="videoContainer">
|
||||||
<div id="floatButtons" style="display: none;">
|
<div id="floatButtons" style="display: none;">
|
||||||
<p class="btn btn-outline btn-xs move">
|
<p class="btn btn-outline btn-xs move">
|
||||||
|
@ -195,13 +195,13 @@ class PlayerSkins extends PluginAbstract {
|
||||||
</div>
|
</div>
|
||||||
<div id="main-video" class="embed-responsive embed-responsive-16by9">' . $htmlMediaTag . '</div>';
|
<div id="main-video" class="embed-responsive embed-responsive-16by9">' . $htmlMediaTag . '</div>';
|
||||||
|
|
||||||
$html .= showCloseButton() . '</div></div><div class="'.$col3Classes.'"></div></div>';
|
$html .= showCloseButton() . '</div></div><div class="' . $col3Classes . '"></div></div>';
|
||||||
|
|
||||||
return $html;
|
return $html;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getHeadCode() {
|
public function getHeadCode() {
|
||||||
if(isWebRTC()){
|
if (isWebRTC()) {
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
global $global, $config, $video;
|
global $global, $config, $video;
|
||||||
|
@ -219,13 +219,13 @@ class PlayerSkins extends PluginAbstract {
|
||||||
}
|
}
|
||||||
$js .= "<script>var playNextURL = '';</script>";
|
$js .= "<script>var playNextURL = '';</script>";
|
||||||
if (!empty($obj->skin)) {
|
if (!empty($obj->skin)) {
|
||||||
$css .= "<link href=\"".getCDN()."plugin/PlayerSkins/skins/{$obj->skin}.css\" rel=\"stylesheet\" type=\"text/css\"/>";
|
$css .= "<link href=\"" . getCDN() . "plugin/PlayerSkins/skins/{$obj->skin}.css\" rel=\"stylesheet\" type=\"text/css\"/>";
|
||||||
}
|
}
|
||||||
if ($obj->showLoopButton && isVideoPlayerHasProgressBar()) {
|
if ($obj->showLoopButton && isVideoPlayerHasProgressBar()) {
|
||||||
$css .= "<link href=\"".getCDN()."plugin/PlayerSkins/loopbutton.css\" rel=\"stylesheet\" type=\"text/css\"/>";
|
$css .= "<link href=\"" . getCDN() . "plugin/PlayerSkins/loopbutton.css\" rel=\"stylesheet\" type=\"text/css\"/>";
|
||||||
}
|
}
|
||||||
$css .= "<link href=\"".getCDN()."plugin/PlayerSkins/player.css?" . filectime("{$global['systemRootPath']}plugin/PlayerSkins/player.css") . "\" rel=\"stylesheet\" type=\"text/css\"/>";
|
$css .= "<link href=\"" . getCDN() . "plugin/PlayerSkins/player.css?" . filectime("{$global['systemRootPath']}plugin/PlayerSkins/player.css") . "\" rel=\"stylesheet\" type=\"text/css\"/>";
|
||||||
$css .= "<script src=\"".getCDN()."plugin/PlayerSkins/player.js?" . filectime("{$global['systemRootPath']}plugin/PlayerSkins/player.js") . "\"></script>";
|
$css .= "<script src=\"" . getCDN() . "plugin/PlayerSkins/player.js?" . filectime("{$global['systemRootPath']}plugin/PlayerSkins/player.js") . "\"></script>";
|
||||||
if ($obj->showLogoOnEmbed && isEmbed() || $obj->showLogo) {
|
if ($obj->showLogoOnEmbed && isEmbed() || $obj->showLogo) {
|
||||||
$logo = "{$global['webSiteRootURL']}" . $config->getLogo(true);
|
$logo = "{$global['webSiteRootURL']}" . $config->getLogo(true);
|
||||||
$css .= "<style>"
|
$css .= "<style>"
|
||||||
|
@ -252,23 +252,23 @@ class PlayerSkins extends PluginAbstract {
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($obj->showShareSocial && CustomizeUser::canShareVideosFromVideo(@$video['id'])) {
|
if ($obj->showShareSocial && CustomizeUser::canShareVideosFromVideo(@$video['id'])) {
|
||||||
$css .= "<link href=\"".getCDN()."plugin/PlayerSkins/shareButton.css\" rel=\"stylesheet\" type=\"text/css\"/>";
|
$css .= "<link href=\"" . getCDN() . "plugin/PlayerSkins/shareButton.css\" rel=\"stylesheet\" type=\"text/css\"/>";
|
||||||
}
|
}
|
||||||
if ($obj->showShareAutoplay && isVideoPlayerHasProgressBar()) {
|
if ($obj->showShareAutoplay && isVideoPlayerHasProgressBar()) {
|
||||||
$css .= "<link href=\"".getCDN()."plugin/PlayerSkins/autoplayButton.css\" rel=\"stylesheet\" type=\"text/css\"/>";
|
$css .= "<link href=\"" . getCDN() . "plugin/PlayerSkins/autoplayButton.css\" rel=\"stylesheet\" type=\"text/css\"/>";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$url = urlencode(getSelfURI());
|
$url = urlencode(getSelfURI());
|
||||||
$oembed = '<link href="' .getCDN() . 'oembed/?format=json&url=' . $url . '" rel="alternate" type="application/json+oembed" />';
|
$oembed = '<link href="' . getCDN() . 'oembed/?format=json&url=' . $url . '" rel="alternate" type="application/json+oembed" />';
|
||||||
$oembed .= '<link href="' .getCDN() . 'oembed/?format=xml&url=' . $url . '" rel="alternate" type="application/xml+oembed" />';
|
$oembed .= '<link href="' . getCDN() . 'oembed/?format=xml&url=' . $url . '" rel="alternate" type="application/xml+oembed" />';
|
||||||
|
|
||||||
|
|
||||||
return $js . $css . $oembed;
|
return $js . $css . $oembed;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getFooterCode() {
|
public function getFooterCode() {
|
||||||
if(isWebRTC()){
|
if (isWebRTC()) {
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
global $global, $config, $getStartPlayerJSWasRequested, $video, $url, $title;
|
global $global, $config, $getStartPlayerJSWasRequested, $video, $url, $title;
|
||||||
|
@ -308,7 +308,7 @@ class PlayerSkins extends PluginAbstract {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!empty($getStartPlayerJSWasRequested) || isVideo()) {
|
if (!empty($getStartPlayerJSWasRequested) || isVideo()) {
|
||||||
$js .= "<script src=\"".getCDN()."view/js/videojs-persistvolume/videojs.persistvolume.js\"></script>";
|
$js .= "<script src=\"" . getCDN() . "view/js/videojs-persistvolume/videojs.persistvolume.js\"></script>";
|
||||||
$js .= "<script>" . self::getStartPlayerJSCode() . "</script>";
|
$js .= "<script>" . self::getStartPlayerJSCode() . "</script>";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -358,13 +358,13 @@ class PlayerSkins extends PluginAbstract {
|
||||||
//return '/* getStartPlayerJS $prepareStartPlayerJS_onPlayerReady = "' . count($prepareStartPlayerJS_onPlayerReady) . '", $prepareStartPlayerJS_getDataSetup = "' . count($prepareStartPlayerJS_getDataSetup) . '", $onPlayerReady = "' . $onPlayerReady . '", $getDataSetup = "' . $getDataSetup . '" */';
|
//return '/* getStartPlayerJS $prepareStartPlayerJS_onPlayerReady = "' . count($prepareStartPlayerJS_onPlayerReady) . '", $prepareStartPlayerJS_getDataSetup = "' . count($prepareStartPlayerJS_getDataSetup) . '", $onPlayerReady = "' . $onPlayerReady . '", $getDataSetup = "' . $getDataSetup . '" */';
|
||||||
return '/* getStartPlayerJS $prepareStartPlayerJS_onPlayerReady = "' . count($prepareStartPlayerJS_onPlayerReady) . '", $prepareStartPlayerJS_getDataSetup = "' . count($prepareStartPlayerJS_getDataSetup) . '" */';
|
return '/* getStartPlayerJS $prepareStartPlayerJS_onPlayerReady = "' . count($prepareStartPlayerJS_onPlayerReady) . '", $prepareStartPlayerJS_getDataSetup = "' . count($prepareStartPlayerJS_getDataSetup) . '" */';
|
||||||
}
|
}
|
||||||
|
|
||||||
static function addOnPlayerReady($onPlayerReady){
|
static function addOnPlayerReady($onPlayerReady) {
|
||||||
return self::getStartPlayerJS($onPlayerReady);
|
return self::getStartPlayerJS($onPlayerReady);
|
||||||
}
|
}
|
||||||
|
|
||||||
static function getStartPlayerJSCode($noReadyFunction = false, $currentTime = 0) {
|
static function getStartPlayerJSCode($noReadyFunction = false, $currentTime = 0) {
|
||||||
if(isWebRTC()){
|
if (isWebRTC()) {
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
global $config, $global, $prepareStartPlayerJS_onPlayerReady, $prepareStartPlayerJS_getDataSetup, $IMAADTag;
|
global $config, $global, $prepareStartPlayerJS_onPlayerReady, $prepareStartPlayerJS_getDataSetup, $IMAADTag;
|
||||||
|
@ -373,18 +373,18 @@ class PlayerSkins extends PluginAbstract {
|
||||||
if (empty($currentTime) && isVideoPlayerHasProgressBar()) {
|
if (empty($currentTime) && isVideoPlayerHasProgressBar()) {
|
||||||
$currentTime = self::getCurrentTime();
|
$currentTime = self::getCurrentTime();
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!empty($global['doNotLoadPlayer'])){
|
if (!empty($global['doNotLoadPlayer'])) {
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
|
|
||||||
if(empty($prepareStartPlayerJS_onPlayerReady)){
|
if (empty($prepareStartPlayerJS_onPlayerReady)) {
|
||||||
$prepareStartPlayerJS_onPlayerReady = array();
|
$prepareStartPlayerJS_onPlayerReady = array();
|
||||||
}
|
}
|
||||||
if(empty($prepareStartPlayerJS_getDataSetup)){
|
if (empty($prepareStartPlayerJS_getDataSetup)) {
|
||||||
$prepareStartPlayerJS_getDataSetup = array();
|
$prepareStartPlayerJS_getDataSetup = array();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (empty($noReadyFunction)) {
|
if (empty($noReadyFunction)) {
|
||||||
$js .= "var originalVideo;
|
$js .= "var originalVideo;
|
||||||
var adTagOptions;
|
var adTagOptions;
|
||||||
|
@ -464,22 +464,29 @@ class PlayerSkins extends PluginAbstract {
|
||||||
}
|
}
|
||||||
|
|
||||||
static private function getCurrentTime() {
|
static private function getCurrentTime() {
|
||||||
global $video;
|
|
||||||
$currentTime = 0;
|
$currentTime = 0;
|
||||||
if (isset($_GET['t'])) {
|
if (isset($_GET['t'])) {
|
||||||
$currentTime = intval($_GET['t']);
|
$currentTime = intval($_GET['t']);
|
||||||
} else if (!empty($video['progress']) && !empty($video['progress']['lastVideoTime'])) {
|
} else {
|
||||||
$currentTime = intval($video['progress']['lastVideoTime']);
|
$videos_id = getVideos_id();
|
||||||
$maxCurrentTime = parseDurationToSeconds($video['duration']);
|
if (!empty($videos_id)) {
|
||||||
if ($maxCurrentTime <= $currentTime + 5) {
|
$video = Video::getVideoLight($videos_id);
|
||||||
if (!empty($video['externalOptions']) && !empty($video['externalOptions']->videoStartSeconds)) {
|
$progress = Video::getVideoPogressPercent($videos_id);
|
||||||
$currentTime = intval($video['externalOptions']->videoStartSeconds);
|
if (!empty($progress) && !empty($progress['lastVideoTime'])) {
|
||||||
} else {
|
$currentTime = intval($video['progress']['lastVideoTime']);
|
||||||
|
} else if (!empty($video['externalOptions'])) {
|
||||||
|
$json = _json_decode($video['externalOptions']);
|
||||||
|
if (!empty($json->videoStartSeconds)) {
|
||||||
|
$currentTime = intval(parseDurationToSeconds($json->videoStartSeconds));
|
||||||
|
} else {
|
||||||
|
$currentTime = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$maxCurrentTime = parseDurationToSeconds($video['duration']);
|
||||||
|
if ($maxCurrentTime <= $currentTime + 5) {
|
||||||
$currentTime = 0;
|
$currentTime = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (!empty($video['externalOptions']) && !empty($video['externalOptions']->videoStartSeconds)) {
|
|
||||||
$currentTime = intval($video['externalOptions']->videoStartSeconds);
|
|
||||||
}
|
}
|
||||||
return $currentTime;
|
return $currentTime;
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,7 +15,7 @@ foreach ($menu as $key => $value) {
|
||||||
foreach ($menuItems as $key2 => $value2) {
|
foreach ($menuItems as $key2 => $value2) {
|
||||||
?>
|
?>
|
||||||
<div>
|
<div>
|
||||||
<a href="<?php echo $value2['finalURL']; ?>" <?php echo $value2['target']; ?> class="text-primary">
|
<a href="<?php echo $value2['finalURL']; ?>" <?php echo $value2['target']; ?>>
|
||||||
<?php
|
<?php
|
||||||
if (!empty($value2['icon'])) {
|
if (!empty($value2['icon'])) {
|
||||||
?>
|
?>
|
||||||
|
@ -41,7 +41,7 @@ foreach ($menu as $key => $value) {
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<div>
|
<div>
|
||||||
<a href="<?php echo $url; ?>" <?php echo $value2['target']; ?> class="text-primary">
|
<a href="<?php echo $url; ?>" <?php echo $value2['target']; ?>>
|
||||||
<?php
|
<?php
|
||||||
if (!empty($value2['icon'])) {
|
if (!empty($value2['icon'])) {
|
||||||
?>
|
?>
|
||||||
|
@ -68,7 +68,7 @@ if (User::isLogged()) {
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<div>
|
<div>
|
||||||
<a href="<?php echo $url; ?>" <?php echo $value2['target']; ?> class="text-primary">
|
<a href="<?php echo $url; ?>" <?php echo $value2['target']; ?>>
|
||||||
<?php
|
<?php
|
||||||
if (!empty($value2['icon'])) {
|
if (!empty($value2['icon'])) {
|
||||||
?>
|
?>
|
||||||
|
@ -95,7 +95,7 @@ if (User::isLogged()) {
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<div>
|
<div>
|
||||||
<a href="<?php echo $url; ?>" <?php echo $value2['target']; ?> class="text-primary">
|
<a href="<?php echo $url; ?>" <?php echo $value2['target']; ?>>
|
||||||
<?php
|
<?php
|
||||||
if (!empty($value2['icon'])) {
|
if (!empty($value2['icon'])) {
|
||||||
?>
|
?>
|
||||||
|
@ -125,7 +125,7 @@ if (!User::canWatchVideo($videos_id)) {
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<div>
|
<div>
|
||||||
<a href="<?php echo $url; ?>" <?php echo $value2['target']; ?> class="text-primary">
|
<a href="<?php echo $url; ?>" <?php echo $value2['target']; ?>>
|
||||||
<?php
|
<?php
|
||||||
if (!empty($value2['icon'])) {
|
if (!empty($value2['icon'])) {
|
||||||
?>
|
?>
|
||||||
|
|
|
@ -30,7 +30,7 @@ $balance = $plugin->getBalance(User::getId());
|
||||||
<li class="dropdown-submenu">
|
<li class="dropdown-submenu">
|
||||||
<a tabindex="-1" href="<?php echo $global['webSiteRootURL']; ?>plugin/YPTWallet/view/manualAddFunds.php">
|
<a tabindex="-1" href="<?php echo $global['webSiteRootURL']; ?>plugin/YPTWallet/view/manualAddFunds.php">
|
||||||
<i class="fa fa-plus" aria-hidden="true"></i>
|
<i class="fa fa-plus" aria-hidden="true"></i>
|
||||||
<?php echo $obj->manualAddFundsMenuTitle; ?>
|
<?php echo __($obj->manualAddFundsMenuTitle); ?>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<?php
|
<?php
|
||||||
|
@ -40,7 +40,7 @@ $balance = $plugin->getBalance(User::getId());
|
||||||
<li class="dropdown-submenu">
|
<li class="dropdown-submenu">
|
||||||
<a tabindex="-1" href="<?php echo $global['webSiteRootURL']; ?>plugin/YPTWallet/view/manualWithdrawFunds.php">
|
<a tabindex="-1" href="<?php echo $global['webSiteRootURL']; ?>plugin/YPTWallet/view/manualWithdrawFunds.php">
|
||||||
<i class="far fa-money-bill-alt" aria-hidden="true"></i>
|
<i class="far fa-money-bill-alt" aria-hidden="true"></i>
|
||||||
<?php echo $obj->manualWithdrawFundsMenuTitle; ?>
|
<?php echo __($obj->manualWithdrawFundsMenuTitle); ?>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
if ($obj->enableAutoWithdrawFundsPagePaypal) {
|
if ($obj->enableAutoWithdrawFundsPagePaypal) {
|
||||||
|
@ -80,7 +80,7 @@ $balance = $plugin->getBalance(User::getId());
|
||||||
if (User::isAdmin()) {
|
if (User::isAdmin()) {
|
||||||
$total = WalletLog::getTotalFromWallet(0,true,'pending');
|
$total = WalletLog::getTotalFromWallet(0,true,'pending');
|
||||||
?>
|
?>
|
||||||
<li class="dropdown-header">Admin Menu</li>
|
<li class="dropdown-header"><?php echo __("Admin Menu"); ?></li>
|
||||||
<li class="dropdown-submenu">
|
<li class="dropdown-submenu">
|
||||||
<a tabindex="-1" href="<?php echo $global['webSiteRootURL']; ?>plugin/YPTWallet/view/adminManageWallets.php">
|
<a tabindex="-1" href="<?php echo $global['webSiteRootURL']; ?>plugin/YPTWallet/view/adminManageWallets.php">
|
||||||
<i class="fa fa-users" aria-hidden="true"></i>
|
<i class="fa fa-users" aria-hidden="true"></i>
|
||||||
|
|
|
@ -45,7 +45,7 @@ TimeLogStart($timeLog3);
|
||||||
$cssClass = "posterPortrait";
|
$cssClass = "posterPortrait";
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<div class="carousel-cell " itemscope itemtype="http://schema.org/VideoObject">
|
<div class="carousel-cell" >
|
||||||
<div class="tile">
|
<div class="tile">
|
||||||
<div class="slide thumbsImage" crc="<?php echo $uid; ?>"
|
<div class="slide thumbsImage" crc="<?php echo $uid; ?>"
|
||||||
videos_id="<?php echo $value['id']; ?>"
|
videos_id="<?php echo $value['id']; ?>"
|
||||||
|
|
|
@ -50,7 +50,7 @@ if (showThis($sectionName)) {
|
||||||
$youtubeTitle = $video->title;
|
$youtubeTitle = $video->title;
|
||||||
$youtubeThumbs = $video->thumbnails;
|
$youtubeThumbs = $video->thumbnails;
|
||||||
?>
|
?>
|
||||||
<div class="col-lg-<?php echo 12 / $objGallery->screenColsLarge; ?> col-md-<?php echo 12 / $objGallery->screenColsMedium; ?> col-sm-<?php echo 12 / $objGallery->screenColsSmall; ?> col-xs-<?php echo 12 / $objGallery->screenColsXSmall; ?> galleryVideo thumbsImage fixPadding" style="z-index: <?php echo $zindex--; ?>; min-height: 175px;" itemscope itemtype="http://schema.org/VideoObject">
|
<div class="col-lg-<?php echo 12 / $objGallery->screenColsLarge; ?> col-md-<?php echo 12 / $objGallery->screenColsMedium; ?> col-sm-<?php echo 12 / $objGallery->screenColsSmall; ?> col-xs-<?php echo 12 / $objGallery->screenColsXSmall; ?> galleryVideo thumbsImage fixPadding" style="z-index: <?php echo $zindex--; ?>; min-height: 175px;">
|
||||||
<a class="evideo" href="<?php echo $youtubeEmbedLink; ?>" title="<?php echo $youtubeTitle; ?>">
|
<a class="evideo" href="<?php echo $youtubeEmbedLink; ?>" title="<?php echo $youtubeTitle; ?>">
|
||||||
<div class="aspectRatio16_9">
|
<div class="aspectRatio16_9">
|
||||||
<img src="<?php echo $youtubeThumbs; ?>" alt="<?php echo $youtubeTitle; ?>" class="thumbsJPG img img-responsive" />
|
<img src="<?php echo $youtubeThumbs; ?>" alt="<?php echo $youtubeTitle; ?>" class="thumbsJPG img img-responsive" />
|
||||||
|
|
|
@ -36,6 +36,7 @@ unset($_POST['current']);
|
||||||
$get = array('channelName' => $_GET['channelName']);
|
$get = array('channelName' => $_GET['channelName']);
|
||||||
$palyListsObj = AVideoPlugin::getObjectDataIfEnabled('PlayLists');
|
$palyListsObj = AVideoPlugin::getObjectDataIfEnabled('PlayLists');
|
||||||
TimeLogEnd($timeLog, __LINE__);
|
TimeLogEnd($timeLog, __LINE__);
|
||||||
|
$obj = AVideoPlugin::getObjectData("YouPHPFlix2");
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
|
@ -69,6 +70,11 @@ TimeLogEnd($timeLog, __LINE__);
|
||||||
#aboutArea.expanded .showLess{
|
#aboutArea.expanded .showLess{
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
|
#channelHome{
|
||||||
|
background-color: rgb(<?php echo $obj->backgroundRGB; ?>);
|
||||||
|
position: relative;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
<!-- <?php var_dump($uploadedTotalVideos, $user_id, !isToHidePrivateVideos()); ?> -->
|
<!-- <?php var_dump($uploadedTotalVideos, $user_id, !isToHidePrivateVideos()); ?> -->
|
||||||
<div class="clearfix"></div>
|
<div class="clearfix"></div>
|
||||||
|
@ -166,7 +172,7 @@ TimeLogEnd($timeLog, __LINE__);
|
||||||
}
|
}
|
||||||
if ($advancedCustomUser->showChannelProgramsTab && !empty($palyListsObj)) {
|
if ($advancedCustomUser->showChannelProgramsTab && !empty($palyListsObj)) {
|
||||||
$totalPrograms = PlayList::getAllFromUserLight($user_id, true, false, 0, true);
|
$totalPrograms = PlayList::getAllFromUserLight($user_id, true, false, 0, true);
|
||||||
if($totalPrograms){
|
if ($totalPrograms) {
|
||||||
?>
|
?>
|
||||||
<li class="nav-item <?php echo $active; ?>" id="channelPlayListsLi">
|
<li class="nav-item <?php echo $active; ?>" id="channelPlayListsLi">
|
||||||
<a class="nav-link " href="#channelPlayLists" data-toggle="tab" aria-expanded="true">
|
<a class="nav-link " href="#channelPlayLists" data-toggle="tab" aria-expanded="true">
|
||||||
|
@ -189,7 +195,7 @@ TimeLogEnd($timeLog, __LINE__);
|
||||||
$obj = AVideoPlugin::getObjectData("YouPHPFlix2");
|
$obj = AVideoPlugin::getObjectData("YouPHPFlix2");
|
||||||
?>
|
?>
|
||||||
<style>#bigVideo{top: 0 !important;}</style>
|
<style>#bigVideo{top: 0 !important;}</style>
|
||||||
<div class="tab-pane <?php echo $active; ?>" id="channelHome" style="min-height: 800px; background-color: rgb(<?php echo $obj->backgroundRGB; ?>);position: relative; overflow: hidden;">
|
<div class="tab-pane <?php echo $active; ?>" id="channelHome" >
|
||||||
<?php
|
<?php
|
||||||
$obj->BigVideo = true;
|
$obj->BigVideo = true;
|
||||||
$obj->PlayList = false;
|
$obj->PlayList = false;
|
||||||
|
@ -276,12 +282,12 @@ TimeLogEnd($timeLog, __LINE__);
|
||||||
<div class="panel panel-default">
|
<div class="panel panel-default">
|
||||||
<div class="panel-heading text-right">
|
<div class="panel-heading text-right">
|
||||||
<?php
|
<?php
|
||||||
if($isMyChannel){
|
if ($isMyChannel) {
|
||||||
?>
|
?>
|
||||||
<a class="btn btn-default btn-xs " href="<?php echo $global['webSiteRootURL']; ?>plugin/PlayLists/managerPlaylists.php">
|
<a class="btn btn-default btn-xs " href="<?php echo $global['webSiteRootURL']; ?>plugin/PlayLists/managerPlaylists.php">
|
||||||
<i class="fas fa-edit"></i> <?php echo __('Organize') . ' ' .$palyListsObj->name; ?>
|
<i class="fas fa-edit"></i> <?php echo __('Organize') . ' ' . $palyListsObj->name; ?>
|
||||||
</a>
|
</a>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -46,11 +46,11 @@ unset($_POST['current']);
|
||||||
<div class="programsContainerItem">
|
<div class="programsContainerItem">
|
||||||
<?php
|
<?php
|
||||||
if (empty($playlists)) {
|
if (empty($playlists)) {
|
||||||
|
|
||||||
if($current==1){
|
if ($current == 1) {
|
||||||
echo "<div class='alert alert-warning'><i class=\"fas fa-exclamation-triangle\"></i> ".__('Sorry you do not have anything available')."</div>";
|
echo "<div class='alert alert-warning'><i class=\"fas fa-exclamation-triangle\"></i> " . __('Sorry you do not have anything available') . "</div>";
|
||||||
}
|
}
|
||||||
|
|
||||||
die("</div>");
|
die("</div>");
|
||||||
}
|
}
|
||||||
$playListsObj = AVideoPlugin::getObjectData("PlayLists");
|
$playListsObj = AVideoPlugin::getObjectData("PlayLists");
|
||||||
|
@ -213,30 +213,32 @@ unset($_POST['current']);
|
||||||
<img src="<?php echo $poster; ?>" alt="<?php echo $serie['title']; ?>" class="img img-responsive" style="max-height: 200px;" />
|
<img src="<?php echo $poster; ?>" alt="<?php echo $serie['title']; ?>" class="img img-responsive" style="max-height: 200px;" />
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<a class="hrefLink" href="<?php echo Video::getLink($serie['id'], $serie['clean_title']); ?>" title="<?php echo $serie['title']; ?>">
|
<a class="h6 galleryLink hrefLink" href="<?php echo Video::getLink($serie['id'], $serie['clean_title']); ?>" title="<?php echo $serie['title']; ?>">
|
||||||
<h2><?php echo $serie['title']; ?></h2>
|
<strong class="title"><?php echo $serie['title']; ?></strong>
|
||||||
</a>
|
</a>
|
||||||
<small class="text-muted galeryDetails">
|
<small class="galeryDetails">
|
||||||
<a class="label label-default" href="<?php echo Video::getLink($serie['id'], $category->getClean_name(), false, $get); ?>">
|
<div class="galleryTags">
|
||||||
<?php
|
<a class="label label-default" href="<?php echo Video::getLink($serie['id'], $category->getClean_name(), false, $get); ?>">
|
||||||
if (!empty($category->getIconClass())) {
|
|
||||||
?>
|
|
||||||
<i class="<?php echo $category->getIconClass(); ?>"></i>
|
|
||||||
<?php
|
<?php
|
||||||
|
if (!empty($category->getIconClass())) {
|
||||||
|
?>
|
||||||
|
<i class="<?php echo $category->getIconClass(); ?>"></i>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<?php echo $category->getName(); ?>
|
||||||
|
</a>
|
||||||
|
<?php
|
||||||
|
$serie['tags'] = Video::getTags($serie['id']);
|
||||||
|
foreach ($serie['tags'] as $value2) {
|
||||||
|
if ($value2->label === __("Group")) {
|
||||||
|
?>
|
||||||
|
<span class="label label-<?php echo $value2->type; ?>"><?php echo $value2->text; ?></span>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<?php echo $category->getName(); ?>
|
</div>
|
||||||
</a>
|
|
||||||
<?php
|
|
||||||
$serie['tags'] = Video::getTags($serie['id']);
|
|
||||||
foreach ($serie['tags'] as $value2) {
|
|
||||||
if ($value2->label === __("Group")) {
|
|
||||||
?>
|
|
||||||
<span class="label label-<?php echo $value2->type; ?>"><?php echo $value2->text; ?></span>
|
|
||||||
<?php
|
|
||||||
}
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
<i class="far fa-clock"></i>
|
<i class="far fa-clock"></i>
|
||||||
<?php
|
<?php
|
||||||
echo humanTiming(strtotime($serie['created'])), " ", __('ago');
|
echo humanTiming(strtotime($serie['created'])), " ", __('ago');
|
||||||
|
@ -341,10 +343,10 @@ unset($_POST['current']);
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</a>
|
</a>
|
||||||
<a class="hrefLink" href="<?php echo $episodeLink; ?>" title="<?php echo $value['title']; ?>">
|
<a class="h6 galleryLink hrefLink" href="<?php echo $episodeLink; ?>" title="<?php echo $value['title']; ?>">
|
||||||
<h2><?php echo $value['title']; ?></h2>
|
<strong class="title"><?php echo $value['title']; ?></strong>
|
||||||
</a>
|
</a>
|
||||||
<div class="text-muted galeryDetails" style="min-height: 60px;">
|
<div class="galeryDetails" style="min-height: 60px;">
|
||||||
<div>
|
<div>
|
||||||
<?php
|
<?php
|
||||||
$value['tags'] = Video::getTags($value['id']);
|
$value['tags'] = Video::getTags($value['id']);
|
||||||
|
@ -386,7 +388,7 @@ unset($_POST['current']);
|
||||||
if (Video::canEdit($value['id'])) {
|
if (Video::canEdit($value['id'])) {
|
||||||
?>
|
?>
|
||||||
<div>
|
<div>
|
||||||
<a href="<?php echo $global['webSiteRootURL']; ?>mvideos?video_id=<?php echo $value['id']; ?>" class="text-primary"><i class="fa fa-edit"></i> <?php echo __("Edit Video"); ?></a>
|
<a href="<?php echo $global['webSiteRootURL']; ?>mvideos?video_id=<?php echo $value['id']; ?>"><i class="fa fa-edit"></i> <?php echo __("Edit Video"); ?></a>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
@ -413,28 +415,28 @@ unset($_POST['current']);
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
if(PlayLists::showTVFeatures()){
|
if (PlayLists::showTVFeatures()) {
|
||||||
?>
|
|
||||||
<div class="panel-footer">
|
|
||||||
<?php
|
|
||||||
$_REQUEST['user_id'] = $user_id;
|
|
||||||
$_REQUEST['playlists_id'] = $playlist['id'];
|
|
||||||
include $global['systemRootPath'] . 'plugin/PlayLists/epg.html.php';
|
|
||||||
?>
|
?>
|
||||||
</div>
|
<div class="panel-footer">
|
||||||
<?php
|
<?php
|
||||||
|
$_REQUEST['user_id'] = $user_id;
|
||||||
|
$_REQUEST['playlists_id'] = $playlist['id'];
|
||||||
|
include $global['systemRootPath'] . 'plugin/PlayLists/epg.html.php';
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
<?php
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
if (!empty($videosP) && empty($countSuccess)) {
|
if (!empty($videosP) && empty($countSuccess)) {
|
||||||
header("Location: {$global['webSiteRootURL']}view/channelPlaylistItems.php?current=" . (count($playlists) ? $_POST['current'] + 1 : $_POST['current']) . "&channelName={$_GET['channelName']}");
|
header("Location: {$global['webSiteRootURL']}view/channelPlaylistItems.php?current=" . (count($playlists) ? $_POST['current'] + 1 : $_POST['current']) . "&channelName={$_GET['channelName']}");
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
TimeLogEnd($timeLog2, __LINE__);
|
TimeLogEnd($timeLog2, __LINE__);
|
||||||
$_GET['channelName'] = $channelName;
|
$_GET['channelName'] = $channelName;
|
||||||
?>
|
?>
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
$(function () {
|
$(function () {
|
||||||
|
@ -581,14 +583,14 @@ $_GET['channelName'] = $channelName;
|
||||||
</script>
|
</script>
|
||||||
<!--
|
<!--
|
||||||
channelPlaylist
|
channelPlaylist
|
||||||
<?php
|
<?php
|
||||||
$timesC[__LINE__] = microtime(true) - $startC;
|
$timesC[__LINE__] = microtime(true) - $startC;
|
||||||
$startC = microtime(true);
|
$startC = microtime(true);
|
||||||
foreach ($timesC as $key => $value) {
|
foreach ($timesC as $key => $value) {
|
||||||
echo "Line: {$key} -> {$value}\n";
|
echo "Line: {$key} -> {$value}\n";
|
||||||
}
|
}
|
||||||
$_POST['current'] = $current;
|
$_POST['current'] = $current;
|
||||||
?>
|
?>
|
||||||
-->
|
-->
|
||||||
</div>
|
</div>
|
||||||
<p class="pagination">
|
<p class="pagination">
|
||||||
|
|
|
@ -106,7 +106,7 @@ $playListsObj = AVideoPlugin::getObjectData("PlayLists");
|
||||||
<div class="panel panel-default program" playListId="<?php echo $program['id']; ?>">
|
<div class="panel panel-default program" playListId="<?php echo $program['id']; ?>">
|
||||||
<div class="panel-heading">
|
<div class="panel-heading">
|
||||||
|
|
||||||
<strong style="font-size: 1.1em;" class="playlistName"><?php echo $program['name']; ?> </strong>
|
<strong class="playlistName"><?php echo $program['name']; ?> </strong>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
if (!empty($videosArrayId)) {
|
if (!empty($videosArrayId)) {
|
||||||
|
@ -259,11 +259,11 @@ $playListsObj = AVideoPlugin::getObjectData("PlayLists");
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</a>
|
</a>
|
||||||
<a class="hrefLink" href="<?php echo $episodeLink; ?>" title="<?php echo $value['title']; ?>">
|
<a class="h6 galleryLink hrefLink" href="<?php echo $episodeLink; ?>" title="<?php echo $value['title']; ?>">
|
||||||
<h2><?php echo $value['title']; ?></h2>
|
<strong class="title"><?php echo $value['title']; ?></strong>
|
||||||
</a>
|
</a>
|
||||||
<div class="text-muted galeryDetails" style="min-height: 60px;">
|
<div class="galeryDetails" style="min-height: 60px;">
|
||||||
<div>
|
<div class="galleryTags">
|
||||||
<?php
|
<?php
|
||||||
$value['tags'] = Video::getTags($value['id']);
|
$value['tags'] = Video::getTags($value['id']);
|
||||||
foreach ($value['tags'] as $value2) {
|
foreach ($value['tags'] as $value2) {
|
||||||
|
@ -307,7 +307,7 @@ $playListsObj = AVideoPlugin::getObjectData("PlayLists");
|
||||||
if (Video::canEdit($value['id'])) {
|
if (Video::canEdit($value['id'])) {
|
||||||
?>
|
?>
|
||||||
<div>
|
<div>
|
||||||
<a href="<?php echo $global['webSiteRootURL']; ?>mvideos?video_id=<?php echo $value['id']; ?>" class="text-primary"><i class="fa fa-edit"></i> <?php echo __("Edit Video"); ?></a>
|
<a href="<?php echo $global['webSiteRootURL']; ?>mvideos?video_id=<?php echo $value['id']; ?>"><i class="fa fa-edit"></i> <?php echo __("Edit Video"); ?></a>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
@ -323,7 +323,7 @@ $playListsObj = AVideoPlugin::getObjectData("PlayLists");
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<span class="text-primary" playlist_id="<?php echo $program['id']; ?>" video_id="<?php echo $value['id']; ?>">
|
<span playlist_id="<?php echo $program['id']; ?>" video_id="<?php echo $value['id']; ?>">
|
||||||
<i class="fas fa-sort-numeric-down"></i> <?php echo __("Sort"); ?>
|
<i class="fas fa-sort-numeric-down"></i> <?php echo __("Sort"); ?>
|
||||||
<input type="number" step="1" class="video_order" value="<?php echo intval($program['videos'][$count - 1]['video_order']); ?>" style="max-width: 50px;">
|
<input type="number" step="1" class="video_order" value="<?php echo intval($program['videos'][$count - 1]['video_order']); ?>" style="max-width: 50px;">
|
||||||
<button class="btn btn-sm btn-xs sortNow"><i class="fas fa-check-square"></i></button>
|
<button class="btn btn-sm btn-xs sortNow"><i class="fas fa-check-square"></i></button>
|
||||||
|
|
|
@ -37,10 +37,6 @@ time.duration{
|
||||||
color: rgba(255, 255, 255, 0.3)!important;
|
color: rgba(255, 255, 255, 0.3)!important;
|
||||||
font-size: 50px;
|
font-size: 50px;
|
||||||
}
|
}
|
||||||
.videoLink div.details,
|
|
||||||
.videoLink div.details div {
|
|
||||||
font-size: 0.9em;
|
|
||||||
}
|
|
||||||
.gallery:hover .glyphicon-play-circle,
|
.gallery:hover .glyphicon-play-circle,
|
||||||
.videoLink:hover .glyphicon-play-circle {
|
.videoLink:hover .glyphicon-play-circle {
|
||||||
color: rgba(255, 255, 255, 0.6)!important;
|
color: rgba(255, 255, 255, 0.6)!important;
|
||||||
|
@ -153,7 +149,7 @@ footer ul.list-inline li {
|
||||||
}
|
}
|
||||||
@media (max-width: 767px) {
|
@media (max-width: 767px) {
|
||||||
.navbar-form, #modeYoutubeBottomContent, .principalContainer,
|
.navbar-form, #modeYoutubeBottomContent, .principalContainer,
|
||||||
.nopaddingOnSmall,.container-fluid, #yptRightBar{
|
.nopaddingOnSmall,.container-fluid,.container, #yptRightBar{
|
||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
.panel-body, .tabbable-panel {
|
.panel-body, .tabbable-panel {
|
||||||
|
@ -889,6 +885,7 @@ img.blur{
|
||||||
|
|
||||||
.videoListItem{
|
.videoListItem{
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
font-size: smaller;
|
||||||
}
|
}
|
||||||
.extraVideos:empty{
|
.extraVideos:empty{
|
||||||
display: none;
|
display: none;
|
||||||
|
@ -1172,4 +1169,38 @@ li.dropdown-submenu > ul > li > a{
|
||||||
}
|
}
|
||||||
a:hover{
|
a:hover{
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.descriptionArea .descriptionAreaPreContent{
|
||||||
|
max-height: 200px;
|
||||||
|
overflow: hidden;
|
||||||
|
transition: max-height 0.25s ease-out;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
.descriptionAreaPreContent{
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
.descriptionArea.expanded .descriptionAreaPreContent{
|
||||||
|
max-height: 1500px;
|
||||||
|
overflow: auto;
|
||||||
|
transition: max-height 0.25s ease-in;
|
||||||
|
}
|
||||||
|
.descriptionAreaShowMoreBtn{
|
||||||
|
margin-top: -10px;
|
||||||
|
}
|
||||||
|
.descriptionArea .showMore{
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
.descriptionArea .showLess{
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
.descriptionArea.expanded .showMore{
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
.descriptionArea.expanded .showLess{
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
.infoDetails{
|
||||||
|
display: flex;
|
||||||
|
margin: 4px 0;
|
||||||
}
|
}
|
|
@ -351,7 +351,7 @@ function subscribe(email, user_id) {
|
||||||
'user_id': user_id
|
'user_id': user_id
|
||||||
},
|
},
|
||||||
success: function (response) {
|
success: function (response) {
|
||||||
var totalElement = $('.notificationButton' + user_id+' .badge');
|
var totalElement = $('.notificationButton' + user_id + ' .badge');
|
||||||
if (response.subscribe == "i") {
|
if (response.subscribe == "i") {
|
||||||
$('.notificationButton' + user_id).removeClass("subscribed");
|
$('.notificationButton' + user_id).removeClass("subscribed");
|
||||||
totalElement.text(parseInt(totalElement.first().text()) - 1);
|
totalElement.text(parseInt(totalElement.first().text()) - 1);
|
||||||
|
@ -367,7 +367,7 @@ function subscribe(email, user_id) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function toogleNotify(user_id) {
|
function toogleNotify(user_id) {
|
||||||
email = $('#subscribeEmail'+user_id).val();
|
email = $('#subscribeEmail' + user_id).val();
|
||||||
subscribeNotify(email, user_id);
|
subscribeNotify(email, user_id);
|
||||||
}
|
}
|
||||||
function subscribeNotify(email, user_id) {
|
function subscribeNotify(email, user_id) {
|
||||||
|
@ -443,7 +443,7 @@ function _addView(videos_id, currentTime) {
|
||||||
'currentTime': currentTime
|
'currentTime': currentTime
|
||||||
},
|
},
|
||||||
success: function (response) {
|
success: function (response) {
|
||||||
$('.view-count' + videos_id).text(response.count);
|
$('.view-count' + videos_id).text(response.countHTML);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -699,7 +699,7 @@ function showMuteTooltip() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function playerPlayIfAutoPlay(currentTime) {
|
function playerPlayIfAutoPlay(currentTime) {
|
||||||
if(isWebRTC()){
|
if (isWebRTC()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (isAutoplayEnabled()) {
|
if (isAutoplayEnabled()) {
|
||||||
|
@ -1114,13 +1114,13 @@ function avideoModalIframeRemove() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function avideoResponse(response) {
|
function avideoResponse(response) {
|
||||||
if(response.error){
|
if (response.error) {
|
||||||
if(!response.msg){
|
if (!response.msg) {
|
||||||
response.msg = 'Error';
|
response.msg = 'Error';
|
||||||
}
|
}
|
||||||
avideoAlertError(response.msg);
|
avideoAlertError(response.msg);
|
||||||
}else{
|
} else {
|
||||||
if(!response.msg){
|
if (!response.msg) {
|
||||||
response.msg = 'Success';
|
response.msg = 'Success';
|
||||||
}
|
}
|
||||||
avideoToastSuccess(response.msg);
|
avideoToastSuccess(response.msg);
|
||||||
|
@ -1212,7 +1212,21 @@ function tabsCategoryDocumentHeightChanged() {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function checkDescriptionArea(){
|
||||||
|
$(".descriptionArea").each(function (index) {
|
||||||
|
if ($(this).height() < $(this).find('.descriptionAreaContent').height()) {
|
||||||
|
$(this).find('.descriptionAreaShowMoreBtn').show();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
|
checkDescriptionArea();
|
||||||
|
setInterval(function(){// check for the carousel
|
||||||
|
checkDescriptionArea();
|
||||||
|
},3000);
|
||||||
|
|
||||||
|
|
||||||
Cookies.set('timezone', Intl.DateTimeFormat().resolvedOptions().timeZone, {
|
Cookies.set('timezone', Intl.DateTimeFormat().resolvedOptions().timeZone, {
|
||||||
path: '/',
|
path: '/',
|
||||||
expires: 365
|
expires: 365
|
||||||
|
|
|
@ -128,7 +128,12 @@ if (!empty($evideo)) {
|
||||||
if (empty($_GET['clean_title']) && (isset($advancedCustom->forceCategory) && $advancedCustom->forceCategory === false)) {
|
if (empty($_GET['clean_title']) && (isset($advancedCustom->forceCategory) && $advancedCustom->forceCategory === false)) {
|
||||||
$_GET['catName'] = "";
|
$_GET['catName'] = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (empty($video) && !empty($_REQUEST['v'])) {
|
||||||
|
$video = Video::getVideo($_REQUEST['v'], "viewable", false, false, false, true);
|
||||||
|
//var_dump('Line: '.__LINE__, $_REQUEST['v'], $video);exit;
|
||||||
|
}
|
||||||
|
|
||||||
if (empty($video)) {
|
if (empty($video)) {
|
||||||
$video = Video::getVideo("", "viewable", false, false, true, true);
|
$video = Video::getVideo("", "viewable", false, false, true, true);
|
||||||
}
|
}
|
||||||
|
@ -333,38 +338,6 @@ if (!empty($video['users_id']) && User::hasBlockedUser($video['users_id'])) {
|
||||||
$modeYouTubeTimeLog['After head'] = microtime(true) - $modeYouTubeTime;
|
$modeYouTubeTimeLog['After head'] = microtime(true) - $modeYouTubeTime;
|
||||||
$modeYouTubeTime = microtime(true);
|
$modeYouTubeTime = microtime(true);
|
||||||
?>
|
?>
|
||||||
<style>
|
|
||||||
#descriptionArea #descriptionAreaPreContent{
|
|
||||||
max-height: 200px;
|
|
||||||
overflow: hidden;
|
|
||||||
transition: max-height 0.25s ease-out;
|
|
||||||
overflow: hidden;
|
|
||||||
}
|
|
||||||
#descriptionAreaPreContent{
|
|
||||||
margin-bottom: 30px;
|
|
||||||
}
|
|
||||||
#descriptionArea.expanded #descriptionAreaPreContent{
|
|
||||||
max-height: 1500px;
|
|
||||||
overflow: auto;
|
|
||||||
transition: max-height 0.25s ease-in;
|
|
||||||
}
|
|
||||||
#descriptionAreaShowMoreBtn{
|
|
||||||
position: absolute;
|
|
||||||
bottom: 0;
|
|
||||||
}
|
|
||||||
#descriptionArea .showMore{
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
#descriptionArea .showLess{
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
#descriptionArea.expanded .showMore{
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
#descriptionArea.expanded .showLess{
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body class="<?php echo $global['bodyClass']; ?>">
|
<body class="<?php echo $global['bodyClass']; ?>">
|
||||||
|
|
|
@ -94,7 +94,7 @@ if (User::hasBlockedUser($video['users_id'])) {
|
||||||
<?php
|
<?php
|
||||||
if (Video::showYoutubeModeOptions() && empty($advancedCustom->doNotDisplayViews)) {
|
if (Video::showYoutubeModeOptions() && empty($advancedCustom->doNotDisplayViews)) {
|
||||||
?>
|
?>
|
||||||
<span class="watch-view-count pull-right text-muted" itemprop="interactionCount"><span class="view-count<?php echo $video['id']; ?>"><?php echo number_format($video['views_count'], 0); ?></span> <?php echo __("Views"); ?></span>
|
<span class="watch-view-count pull-right text-muted" itemprop="interactionCount"><span class="view-count<?php echo $video['id']; ?>"><?php echo number_format_short($video['views_count']); ?></span> <?php echo __("Views"); ?></span>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
@ -280,15 +280,15 @@ if ($video['type'] !== 'notfound' && CustomizeUser::canShareVideosFromVideo($vid
|
||||||
if ($video['type'] !== 'notfound' && $video['type'] !== 'article') {
|
if ($video['type'] !== 'notfound' && $video['type'] !== 'article') {
|
||||||
?>
|
?>
|
||||||
<div class="col-xs-4 col-sm-2 col-lg-2 text-right"><strong><?php echo __("Description"); ?>:</strong></div>
|
<div class="col-xs-4 col-sm-2 col-lg-2 text-right"><strong><?php echo __("Description"); ?>:</strong></div>
|
||||||
<div class="col-xs-8 col-sm-10 col-lg-10" itemprop="description" id="descriptionArea">
|
<div class="col-xs-8 col-sm-10 col-lg-10 descriptionArea" itemprop="description">
|
||||||
<div id="descriptionAreaPreContent">
|
<div class="descriptionAreaPreContent">
|
||||||
<div id="descriptionAreaContent">
|
<div class="descriptionAreaContent">
|
||||||
<?php
|
<?php
|
||||||
echo Video::htmlDescription($video['description']);
|
echo Video::htmlDescription($video['description']);
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<button onclick="$('#descriptionArea').toggleClass('expanded');" class="btn btn-xs btn-default" id="descriptionAreaShowMoreBtn" style="display: none; ">
|
<button onclick="$(this).closest('.descriptionArea').toggleClass('expanded');" class="btn btn-xs btn-default descriptionAreaShowMoreBtn" style="display: none; ">
|
||||||
<span class="showMore"><i class="fas fa-caret-down"></i> <?php echo __("Show More"); ?></span>
|
<span class="showMore"><i class="fas fa-caret-down"></i> <?php echo __("Show More"); ?></span>
|
||||||
<span class="showLess"><i class="fas fa-caret-up"></i> <?php echo __("Show Less"); ?></span>
|
<span class="showLess"><i class="fas fa-caret-up"></i> <?php echo __("Show Less"); ?></span>
|
||||||
</button>
|
</button>
|
||||||
|
@ -302,9 +302,6 @@ if ($video['type'] !== 'notfound' && CustomizeUser::canShareVideosFromVideo($vid
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
if ($('#descriptionArea').height() < $('#descriptionAreaContent').height()) {
|
|
||||||
$('#descriptionAreaShowMoreBtn').show();
|
|
||||||
}
|
|
||||||
<?php
|
<?php
|
||||||
if (empty($advancedCustom->showShareMenuOpenByDefault)) {
|
if (empty($advancedCustom->showShareMenuOpenByDefault)) {
|
||||||
?>
|
?>
|
||||||
|
|
|
@ -46,162 +46,165 @@ $metaDescription = __("Trending");
|
||||||
<?php include $global['systemRootPath'] . 'view/include/navbar.php'; ?>
|
<?php include $global['systemRootPath'] . 'view/include/navbar.php'; ?>
|
||||||
|
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="row results gallery">
|
<div class="panel panel-default">
|
||||||
<?php
|
<div class="panel-body">
|
||||||
//var_dump($rows);
|
|
||||||
foreach ($videos as $key => $value) {
|
|
||||||
?>
|
|
||||||
<div class="col-lg-12 searchResult thumbsImage mb-2" style="overflow: hidden;">
|
|
||||||
|
|
||||||
|
<div class="row results gallery">
|
||||||
<a class="galleryLink col-sm-4 col-md-4 col-lg-4" videos_id="<?php echo $value['id']; ?>" href="<?php echo Video::getLink($value['id'], $value['clean_title']); ?>" title="<?php echo $value['title']; ?>">
|
<?php
|
||||||
<?php
|
//var_dump($rows);
|
||||||
$images = Video::getImageFromFilename($value['filename'], $value['type']);
|
foreach ($videos as $key => $value) {
|
||||||
$imgGif = $images->thumbsGif;
|
|
||||||
$poster = $images->thumbsJpg;
|
|
||||||
?>
|
?>
|
||||||
<div class="aspectRatio16_9">
|
<div class="col-lg-12 searchResult thumbsImage mb-2" style="overflow: hidden;">
|
||||||
<img src="<?php echo $images->thumbsJpgSmall; ?>" data-src="<?php echo $poster; ?>" alt="<?php echo $value['title']; ?>" class="thumbsJPG img img-responsive <?php echo @$img_portrait; ?> rotate<?php echo $value['rotation']; ?> <?php echo ($poster != $images->thumbsJpgSmall) ? "blur" : ""; ?>" id="thumbsJPG<?php echo $value['id']; ?>" />
|
<a class="galleryLink col-sm-4 col-md-4 col-lg-4" videos_id="<?php echo $value['id']; ?>" href="<?php echo Video::getLink($value['id'], $value['clean_title']); ?>" title="<?php echo $value['title']; ?>">
|
||||||
<?php
|
<?php
|
||||||
if (!empty($imgGif)) {
|
$images = Video::getImageFromFilename($value['filename'], $value['type']);
|
||||||
|
$imgGif = $images->thumbsGif;
|
||||||
|
$poster = $images->thumbsJpg;
|
||||||
?>
|
?>
|
||||||
<img src="<?php echo getCDN(); ?>view/img/loading-gif.png" data-src="<?php echo $imgGif; ?>" style="position: absolute; top: 0; display: none;" alt="<?php echo $value['title']; ?>" id="thumbsGIF<?php echo $value['id']; ?>" class="thumbsGIF img-responsive" height="196" />
|
<div class="aspectRatio16_9">
|
||||||
<?php } ?>
|
<img src="<?php echo $images->thumbsJpgSmall; ?>" data-src="<?php echo $poster; ?>" alt="<?php echo $value['title']; ?>" class="thumbsJPG img img-responsive <?php echo @$img_portrait; ?> rotate<?php echo $value['rotation']; ?> <?php echo ($poster != $images->thumbsJpgSmall) ? "blur" : ""; ?>" id="thumbsJPG<?php echo $value['id']; ?>" />
|
||||||
<span class="duration"><?php echo Video::getCleanDuration($value['duration']); ?></span>
|
<?php
|
||||||
</div>
|
if (!empty($imgGif)) {
|
||||||
<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>
|
<img src="<?php echo getCDN(); ?>view/img/loading-gif.png" data-src="<?php echo $imgGif; ?>" style="position: absolute; top: 0; display: none;" alt="<?php echo $value['title']; ?>" id="thumbsGIF<?php echo $value['id']; ?>" class="thumbsGIF img-responsive" height="196" />
|
||||||
</div>
|
<?php } ?>
|
||||||
</a>
|
<span class="duration"><?php echo Video::getCleanDuration($value['duration']); ?></span>
|
||||||
<div class=" col-sm-8 col-md-8 col-lg-8">
|
</div>
|
||||||
<a class="h6 galleryLink col-lg-12" style="font-size: 1.5em;" videos_id="<?php echo $value['id']; ?>" href="<?php echo Video::getLink($value['id'], $value['clean_title']); ?>" title="<?php echo $value['title']; ?>">
|
<div class="progress" style="height: 3px; margin-bottom: 2px;">
|
||||||
<h2><?php echo $value['title']; ?></h2>
|
<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>
|
||||||
</a>
|
</div>
|
||||||
|
</a>
|
||||||
|
<div class=" col-sm-8 col-md-8 col-lg-8">
|
||||||
|
<a class="h6 galleryLink col-lg-12" style="font-size: 1.5em;" videos_id="<?php echo $value['id']; ?>" href="<?php echo Video::getLink($value['id'], $value['clean_title']); ?>" title="<?php echo $value['title']; ?>">
|
||||||
|
<strong><?php echo $value['title']; ?></strong>
|
||||||
|
</a>
|
||||||
|
|
||||||
<div class="text-muted galeryDetails col-lg-12" style="overflow: hidden;">
|
<div class="galeryDetails col-lg-12" style="overflow: hidden;">
|
||||||
<div>
|
<div>
|
||||||
<?php if (empty($_GET['catName'])) { ?>
|
<?php if (empty($_GET['catName'])) { ?>
|
||||||
<a class="label label-default" href="<?php echo $global['webSiteRootURL']; ?>cat/<?php echo $value['clean_category']; ?>/">
|
<a class="label label-default" href="<?php echo $global['webSiteRootURL']; ?>cat/<?php echo $value['clean_category']; ?>/">
|
||||||
|
<?php
|
||||||
|
if (!empty($value['iconClass'])) {
|
||||||
|
?>
|
||||||
|
<i class="<?php echo $value['iconClass']; ?>"></i>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<?php echo $value['category']; ?>
|
||||||
|
</a>
|
||||||
|
<?php } ?>
|
||||||
<?php
|
<?php
|
||||||
if (!empty($value['iconClass'])) {
|
if (!empty($obj->showTags)) {
|
||||||
?>
|
$value['tags'] = Video::getTags($value['id']);
|
||||||
<i class="<?php echo $value['iconClass']; ?>"></i>
|
foreach ($value['tags'] as $value2) {
|
||||||
<?php
|
if (!empty($value2->label) && $value2->label === __("Group")) {
|
||||||
|
?><span class="label label-<?php echo $value2->type; ?>"><?php echo $value2->text; ?></span><?php
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<?php echo $value['category']; ?>
|
</div>
|
||||||
</a>
|
|
||||||
<?php } ?>
|
|
||||||
<?php
|
|
||||||
if (!empty($obj->showTags)) {
|
|
||||||
$value['tags'] = Video::getTags($value['id']);
|
|
||||||
foreach ($value['tags'] as $value2) {
|
|
||||||
if (!empty($value2->label) && $value2->label === __("Group")) {
|
|
||||||
?><span class="label label-<?php echo $value2->type; ?>"><?php echo $value2->text; ?></span><?php
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
if (empty($advancedCustom->doNotDisplayViews)) {
|
if (empty($advancedCustom->doNotDisplayViews)) {
|
||||||
?>
|
?>
|
||||||
<div>
|
<div>
|
||||||
<i class="fa fa-eye"></i>
|
<i class="fa fa-eye"></i>
|
||||||
<span itemprop="interactionCount">
|
<span itemprop="interactionCount">
|
||||||
<?php echo number_format($value['views_count'], 0); ?> <?php echo __("Views"); ?>
|
<?php echo number_format_short($value['views_count']); ?> <?php echo __("Views"); ?>
|
||||||
</span>
|
</span>
|
||||||
|
</div>
|
||||||
|
<?php } ?>
|
||||||
|
<div>
|
||||||
|
<i class="far fa-clock"></i>
|
||||||
|
<?php echo humanTiming(strtotime($value['videoCreation'])), " ", __('ago'); ?>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<a href="<?php echo User::getChannelLink($value['users_id']); ?>">
|
||||||
|
<i class="fa fa-user"></i>
|
||||||
|
<?php echo User::getNameIdentificationById($value['users_id']); ?>
|
||||||
|
</a>
|
||||||
|
<?php if ((!empty($value['description'])) && !empty($obj->Description)) { ?>
|
||||||
|
<button type="button" data-trigger="focus" class="label label-danger" data-toggle="popover" data-placement="top" data-html="true" title="<?php echo $value['title']; ?>" data-content="<div> <?php echo str_replace('"', '"', $value['description']); ?> </div>" ><?php echo __("Description"); ?></button>
|
||||||
|
<?php } ?>
|
||||||
|
</div>
|
||||||
|
<?php if (Video::canEdit($value['id'])) { ?>
|
||||||
|
<div>
|
||||||
|
<a href="<?php echo $global['webSiteRootURL']; ?>mvideos?video_id=<?php echo $value['id']; ?>">
|
||||||
|
<i class="fa fa-edit"></i> <?php echo __("Edit Video"); ?>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
AVideoPlugin::getgalleryActionButton($value['id']);
|
||||||
|
?>
|
||||||
</div>
|
</div>
|
||||||
<?php } ?>
|
<div class="mainAreaDescriptionContainer col-lg-12">
|
||||||
<div>
|
<h4 class="mainAreaDescription" itemprop="description" style="max-height: 7vw; padding: 0; margin: 5px 0;"><?php echo $value['description']; ?></h4>
|
||||||
<i class="far fa-clock"></i>
|
|
||||||
<?php echo humanTiming(strtotime($value['videoCreation'])), " ", __('ago'); ?>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<i class="fa fa-user"></i>
|
|
||||||
<a class="text-muted" href="<?php echo User::getChannelLink($value['users_id']); ?>">
|
|
||||||
<?php echo User::getNameIdentificationById($value['users_id']); ?>
|
|
||||||
</a>
|
|
||||||
<?php if ((!empty($value['description'])) && !empty($obj->Description)) { ?>
|
|
||||||
<button type="button" data-trigger="focus" class="label label-danger" data-toggle="popover" data-placement="top" data-html="true" title="<?php echo $value['title']; ?>" data-content="<div> <?php echo str_replace('"', '"', $value['description']); ?> </div>" ><?php echo __("Description"); ?></button>
|
|
||||||
<?php } ?>
|
|
||||||
</div>
|
|
||||||
<?php if (Video::canEdit($value['id'])) { ?>
|
|
||||||
<div>
|
|
||||||
<a href="<?php echo $global['webSiteRootURL']; ?>mvideos?video_id=<?php echo $value['id']; ?>" class="text-primary">
|
|
||||||
<i class="fa fa-edit"></i> <?php echo __("Edit Video"); ?>
|
|
||||||
</a>
|
|
||||||
</div>
|
</div>
|
||||||
<?php
|
</div>
|
||||||
}
|
|
||||||
AVideoPlugin::getgalleryActionButton($value['id']);
|
|
||||||
?>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="mainAreaDescriptionContainer col-lg-12">
|
<?php
|
||||||
<h4 class="mainAreaDescription" itemprop="description" style="max-height: 7vw; padding: 0; margin: 5px 0;"><?php echo $value['description']; ?></h4>
|
}
|
||||||
</div>
|
?>
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
}
|
if (!empty($pages)) {
|
||||||
?>
|
?>
|
||||||
</div>
|
<nav aria-label="Page navigation">
|
||||||
<?php
|
<ul class="pagination justify-content-center">
|
||||||
if (!empty($pages)) {
|
<li class="page-item <?php
|
||||||
?>
|
if ($_REQUEST['current'] == 1) {
|
||||||
<nav aria-label="Page navigation">
|
echo "disabled";
|
||||||
<ul class="pagination justify-content-center">
|
}
|
||||||
<li class="page-item <?php
|
?>">
|
||||||
if ($_REQUEST['current'] == 1) {
|
<a class="page-link" href="<?php echo "{$global['webSiteRootURL']}trending?current=" . ($_REQUEST['current'] - 1); ?>" tabindex="-1"><?php echo __('Previous') ?></a>
|
||||||
echo "disabled";
|
</li>
|
||||||
}
|
|
||||||
?>">
|
|
||||||
<a class="page-link" href="<?php echo "{$global['webSiteRootURL']}trending?current=" . ($_REQUEST['current'] - 1); ?>" tabindex="-1"><?php echo __('Previous') ?></a>
|
|
||||||
</li>
|
|
||||||
<?php
|
|
||||||
$size = 5;
|
|
||||||
$i = 1;
|
|
||||||
$end = $pages;
|
|
||||||
|
|
||||||
if ($_REQUEST['current'] - $size > $i) {
|
|
||||||
$i = $_REQUEST['current'] - $size;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($_REQUEST['current'] + $size < $end) {
|
|
||||||
$end = $_REQUEST['current'] + $size;
|
|
||||||
}
|
|
||||||
|
|
||||||
for (; $i <= $end; $i++) {
|
|
||||||
?>
|
|
||||||
<li class="page-item <?php
|
|
||||||
if ($_REQUEST['current'] == $i) {
|
|
||||||
echo "active";
|
|
||||||
}
|
|
||||||
?>"><a class="page-link" href="<?php echo "{$global['webSiteRootURL']}trending?current={$i}"; ?>"><?php echo $i; ?></a></li>
|
|
||||||
<?php
|
<?php
|
||||||
}
|
$size = 5;
|
||||||
?>
|
$i = 1;
|
||||||
<li class="page-item <?php
|
$end = $pages;
|
||||||
if ($_REQUEST['current'] == $pages) {
|
|
||||||
echo "disabled";
|
if ($_REQUEST['current'] - $size > $i) {
|
||||||
}
|
$i = $_REQUEST['current'] - $size;
|
||||||
?>">
|
}
|
||||||
<a class="page-link" href="<?php echo "{$global['webSiteRootURL']}trending?current=" . ($_REQUEST['current'] + 1); ?>"><?php echo __('Next') ?></a>
|
|
||||||
</li>
|
if ($_REQUEST['current'] + $size < $end) {
|
||||||
</ul>
|
$end = $_REQUEST['current'] + $size;
|
||||||
</nav>
|
}
|
||||||
<?php
|
|
||||||
}
|
for (; $i <= $end; $i++) {
|
||||||
?>
|
?>
|
||||||
|
<li class="page-item <?php
|
||||||
|
if ($_REQUEST['current'] == $i) {
|
||||||
|
echo "active";
|
||||||
|
}
|
||||||
|
?>"><a class="page-link" href="<?php echo "{$global['webSiteRootURL']}trending?current={$i}"; ?>"><?php echo $i; ?></a></li>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<li class="page-item <?php
|
||||||
|
if ($_REQUEST['current'] == $pages) {
|
||||||
|
echo "disabled";
|
||||||
|
}
|
||||||
|
?>">
|
||||||
|
<a class="page-link" href="<?php echo "{$global['webSiteRootURL']}trending?current=" . ($_REQUEST['current'] + 1); ?>"><?php echo __('Next') ?></a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</nav>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- status elements -->
|
<!-- status elements -->
|
||||||
<div class="scroller-status">
|
<div class="scroller-status">
|
||||||
<div class="infinite-scroll-request loader-ellips text-center">
|
<div class="infinite-scroll-request loader-ellips text-center">
|
||||||
<img src="img/loading.gif" alt=""/>
|
<img src="img/loading.gif" alt=""/>
|
||||||
</div>
|
</div>
|
||||||
<p class="infinite-scroll-last text-center text-muted"><?php echo __('End of content')?></p>
|
<p class="infinite-scroll-last text-center text-muted"><?php echo __('End of content') ?></p>
|
||||||
<p class="infinite-scroll-error text-center text-muted"><?php echo __('No more pages to load')?></p>
|
<p class="infinite-scroll-error text-center text-muted"><?php echo __('No more pages to load') ?></p>
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
if ($_REQUEST['current'] + 1 <= $pages) {
|
if ($_REQUEST['current'] + 1 <= $pages) {
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
style="width: {progress}%;" aria-valuenow="{progress}" aria-valuemin="0" aria-valuemax="100"></div>
|
style="width: {progress}%;" aria-valuenow="{progress}" aria-valuemin="0" aria-valuemax="100"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-lg-7 col-sm-7 col-xs-7 videosDetails" style="font-size: 0.75em;">
|
<div class="col-lg-7 col-sm-7 col-xs-7 videosDetails">
|
||||||
<a href="{link}" title="{title}" >
|
<a href="{link}" title="{title}" >
|
||||||
<div class="text-uppercase row"><strong class="title">{title}</strong></div>
|
<div class="text-uppercase row"><strong class="title">{title}</strong></div>
|
||||||
</a>
|
</a>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue