mirror of
https://github.com/DanielnetoDotCom/YouPHPTube
synced 2025-10-03 09:49:28 +02:00
Sending the updates to support PayPerView plugin
This commit is contained in:
parent
6a74b3ca23
commit
3e64c17c2b
34 changed files with 300 additions and 1506 deletions
4
.gitignore
vendored
4
.gitignore
vendored
|
@ -46,4 +46,6 @@
|
||||||
/plugin/YouPHPTV/
|
/plugin/YouPHPTV/
|
||||||
/plugin/CreateUserManager/
|
/plugin/CreateUserManager/
|
||||||
/plugin/PlayListEmbed/
|
/plugin/PlayListEmbed/
|
||||||
/plugin/VideoTags/
|
/plugin/VideoTags/
|
||||||
|
/plugin/ImportFromOtherVideoPlatform/
|
||||||
|
/plugin/PayPerView/
|
|
@ -100,6 +100,7 @@ Options All -Indexes
|
||||||
RewriteRule ^cat/([A-Za-z0-9-]+)/video/([A-Za-z0-9-_.]+)/page/([0-9]+)/?$ view/?catName=$1&videoName=$2&page=$3 [QSA]
|
RewriteRule ^cat/([A-Za-z0-9-]+)/video/([A-Za-z0-9-_.]+)/page/([0-9]+)/?$ view/?catName=$1&videoName=$2&page=$3 [QSA]
|
||||||
#for the embeded video name
|
#for the embeded video name
|
||||||
RewriteRule ^videoEmbeded/([A-Za-z0-9-_.]+)/?$ view/videoEmbeded.php?videoName=$1 [QSA]
|
RewriteRule ^videoEmbeded/([A-Za-z0-9-_.]+)/?$ view/videoEmbeded.php?videoName=$1 [QSA]
|
||||||
|
RewriteRule ^cat/([A-Za-z0-9-_.]+)/videoEmbeded/([A-Za-z0-9-_.]+)/?$ view/videoEmbeded.php?catName=$1&videoName=$2 [QSA]
|
||||||
RewriteRule ^videoEmbed/([A-Za-z0-9-_.]+)/?$ view/videoEmbeded.php?videoName=$1 [QSA]
|
RewriteRule ^videoEmbed/([A-Za-z0-9-_.]+)/?$ view/videoEmbeded.php?videoName=$1 [QSA]
|
||||||
RewriteRule ^vEmbed/([0-9]+)/?$ view/videoEmbeded.php?v=$1 [QSA]
|
RewriteRule ^vEmbed/([0-9]+)/?$ view/videoEmbeded.php?v=$1 [QSA]
|
||||||
|
|
||||||
|
|
|
@ -15,6 +15,7 @@ require_once '../objects/functions.php';
|
||||||
<link href="../view/bootstrap/bootstrapSelectPicker/css/bootstrap-select.min.css" rel="stylesheet" type="text/css"/>
|
<link href="../view/bootstrap/bootstrapSelectPicker/css/bootstrap-select.min.css" rel="stylesheet" type="text/css"/>
|
||||||
<link href="../view/js/seetalert/sweetalert.css" rel="stylesheet" type="text/css"/>
|
<link href="../view/js/seetalert/sweetalert.css" rel="stylesheet" type="text/css"/>
|
||||||
<script src="../view/js/jquery-3.3.1.min.js" type="text/javascript"></script>
|
<script src="../view/js/jquery-3.3.1.min.js" type="text/javascript"></script>
|
||||||
|
<link href="../view/css/fontawesome-free-5.5.0-web/css/all.min.css" rel="stylesheet" type="text/css"/>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body class="<?php echo $global['bodyClass']; ?>">
|
<body class="<?php echo $global['bodyClass']; ?>">
|
||||||
|
@ -231,7 +232,7 @@ require_once '../objects/functions.php';
|
||||||
<input type="password" class="form-control" id="confirmSystemAdminPass" placeholder="Confirm System Admin password" required="required">
|
<input type="password" class="form-control" id="confirmSystemAdminPass" placeholder="Confirm System Admin password" required="required">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<button type="submit" class="btn btn-primary">Submit</button>
|
<button type="submit" class="btn btn-primary btn-block"><i class="fas fa-cogs"></i> Install now</button>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,11 +0,0 @@
|
||||||
auxiliary.org-netbeans-modules-css-prep.sass_2e_compiler_2e_options=
|
|
||||||
auxiliary.org-netbeans-modules-css-prep.sass_2e_configured=true
|
|
||||||
auxiliary.org-netbeans-modules-css-prep.sass_2e_enabled=true
|
|
||||||
auxiliary.org-netbeans-modules-css-prep.sass_2e_mappings=/scss:/css
|
|
||||||
include.path=
|
|
||||||
php.version=PHP_54
|
|
||||||
source.encoding=UTF-8
|
|
||||||
src.dir=.
|
|
||||||
tags.asp=false
|
|
||||||
tags.short=false
|
|
||||||
web.root=.
|
|
|
@ -1,9 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project xmlns="http://www.netbeans.org/ns/project/1">
|
|
||||||
<type>org.netbeans.modules.php.project</type>
|
|
||||||
<configuration>
|
|
||||||
<data xmlns="http://www.netbeans.org/ns/php-project/1">
|
|
||||||
<name>YouPHPTube</name>
|
|
||||||
</data>
|
|
||||||
</configuration>
|
|
||||||
</project>
|
|
|
@ -11,6 +11,14 @@ abstract class ObjectYPT implements ObjectInterface {
|
||||||
|
|
||||||
protected $fieldsName = array();
|
protected $fieldsName = array();
|
||||||
|
|
||||||
|
|
||||||
|
function __construct($id="") {
|
||||||
|
if (!empty($id)) {
|
||||||
|
// get data from id
|
||||||
|
$this->load($id);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
protected function load($id) {
|
protected function load($id) {
|
||||||
$row = self::getFromDb($id);
|
$row = self::getFromDb($id);
|
||||||
if (empty($row))
|
if (empty($row))
|
||||||
|
@ -21,13 +29,6 @@ abstract class ObjectYPT implements ObjectInterface {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
function __construct($id="") {
|
|
||||||
if (!empty($id)) {
|
|
||||||
// get data from id
|
|
||||||
$this->load($id);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static protected function getFromDb($id) {
|
static protected function getFromDb($id) {
|
||||||
global $global;
|
global $global;
|
||||||
$id = intval($id);
|
$id = intval($id);
|
||||||
|
|
|
@ -82,11 +82,16 @@ function get_max_file_size() {
|
||||||
return humanFileSize(file_upload_max_size());
|
return humanFileSize(file_upload_max_size());
|
||||||
}
|
}
|
||||||
|
|
||||||
function humanTiming($time) {
|
function humanTiming($time, $precision = 0) {
|
||||||
if (!is_int($time)) {
|
if (!is_int($time)) {
|
||||||
$time = strtotime($time);
|
$time = strtotime($time);
|
||||||
}
|
}
|
||||||
$time = time() - $time; // to get the time since that moment
|
$time = time() - $time; // to get the time since that moment
|
||||||
|
return secondsToHumanTiming($time, $precision);
|
||||||
|
}
|
||||||
|
|
||||||
|
function secondsToHumanTiming($time, $precision = 0){
|
||||||
|
$time = ($time < 0) ? $time*-1 : $time;
|
||||||
$time = ($time < 1) ? 1 : $time;
|
$time = ($time < 1) ? 1 : $time;
|
||||||
$tokens = array(
|
$tokens = array(
|
||||||
31536000 => 'year',
|
31536000 => 'year',
|
||||||
|
@ -127,7 +132,14 @@ function humanTiming($time) {
|
||||||
} else {
|
} else {
|
||||||
$text = __($text);
|
$text = __($text);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if($precision){
|
||||||
|
$rest = $time % $unit;
|
||||||
|
if($rest){
|
||||||
|
$text .= ' '.secondsToHumanTiming($rest, $precision-1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return $numberOfUnits . ' ' . $text;
|
return $numberOfUnits . ' ' . $text;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -499,11 +499,21 @@ if (typeof gtag !== \"function\") {
|
||||||
if (User::isAdmin()) {
|
if (User::isAdmin()) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(YouPHPTubePlugin::userCanWatchVideo(User::getId(), $videos_id)){
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
// check if the video is not public
|
// check if the video is not public
|
||||||
$rows = UserGroups::getVideoGroups($videos_id);
|
$rows = UserGroups::getVideoGroups($videos_id);
|
||||||
|
|
||||||
if (empty($rows)) {
|
if (empty($rows)) {
|
||||||
return true; // the video is public
|
// check if any plugin restrict access to this video
|
||||||
|
if(!YouPHPTubePlugin::userCanWatchVideo(User::getId(), $videos_id)){
|
||||||
|
return false;
|
||||||
|
}else{
|
||||||
|
return true; // the video is public
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!User::isLogged()) {
|
if (!User::isLogged()) {
|
||||||
|
|
|
@ -294,7 +294,7 @@ class UserGroups {
|
||||||
return array();
|
return array();
|
||||||
}
|
}
|
||||||
|
|
||||||
$sql = "SELECT * FROM videos_group_view as v "
|
$sql = "SELECT v.*, ug.*FROM videos_group_view as v "
|
||||||
. " LEFT JOIN users_groups as ug ON users_groups_id = ug.id WHERE videos_id = ? ";
|
. " LEFT JOIN users_groups as ug ON users_groups_id = ug.id WHERE videos_id = ? ";
|
||||||
$res = sqlDAL::readSql($sql,"i",array($videos_id));
|
$res = sqlDAL::readSql($sql,"i",array($videos_id));
|
||||||
$fullData = sqlDAL::fetchAllAssoc($res);
|
$fullData = sqlDAL::fetchAllAssoc($res);
|
||||||
|
|
|
@ -585,7 +585,10 @@ if (!class_exists('Video')) {
|
||||||
}
|
}
|
||||||
|
|
||||||
$sql .= BootGrid::getSqlSearchFromPost(array('v.title', 'v.description', 'c.name', 'c.description'));
|
$sql .= BootGrid::getSqlSearchFromPost(array('v.title', 'v.description', 'c.name', 'c.description'));
|
||||||
|
$arrayNotIN = YouPHPTubePlugin::getAllVideosExcludeVideosIDArray();
|
||||||
|
if(!empty($arrayNotIN) && is_array($arrayNotIN)){
|
||||||
|
$sql .= " AND v.id NOT IN ( '" . implode("', '", $arrayNotIN) . "') ";
|
||||||
|
}
|
||||||
if (!empty($id)) {
|
if (!empty($id)) {
|
||||||
$sql .= " AND v.id = '$id' ";
|
$sql .= " AND v.id = '$id' ";
|
||||||
} elseif (empty($random) && !empty($_GET['videoName'])) {
|
} elseif (empty($random) && !empty($_GET['videoName'])) {
|
||||||
|
@ -694,7 +697,12 @@ if (!class_exists('Video')) {
|
||||||
if (!empty($videosArrayId) && is_array($videosArrayId)) {
|
if (!empty($videosArrayId) && is_array($videosArrayId)) {
|
||||||
$sql .= " AND v.id IN ( '" . implode("', '", $videosArrayId) . "') ";
|
$sql .= " AND v.id IN ( '" . implode("', '", $videosArrayId) . "') ";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$arrayNotIN = YouPHPTubePlugin::getAllVideosExcludeVideosIDArray();
|
||||||
|
if(!empty($arrayNotIN) && is_array($arrayNotIN)){
|
||||||
|
$sql .= " AND v.id NOT IN ( '" . implode("', '", $arrayNotIN) . "') ";
|
||||||
|
}
|
||||||
|
|
||||||
if (!$ignoreGroup) {
|
if (!$ignoreGroup) {
|
||||||
$sql .= self::getUserGroupsCanSeeSQL();
|
$sql .= self::getUserGroupsCanSeeSQL();
|
||||||
}
|
}
|
||||||
|
@ -749,7 +757,7 @@ if (!class_exists('Video')) {
|
||||||
$sql .= " LIMIT 1";
|
$sql .= " LIMIT 1";
|
||||||
unset($_GET['limitOnceToOne']);
|
unset($_GET['limitOnceToOne']);
|
||||||
}
|
}
|
||||||
|
//echo $sql;
|
||||||
//error_log("getAllVideos($status, $showOnlyLoggedUserVideos , $ignoreGroup , ". json_encode($videosArrayId).")" . $sql);
|
//error_log("getAllVideos($status, $showOnlyLoggedUserVideos , $ignoreGroup , ". json_encode($videosArrayId).")" . $sql);
|
||||||
$res = sqlDAL::readSql($sql);
|
$res = sqlDAL::readSql($sql);
|
||||||
$fullData = sqlDAL::fetchAllAssoc($res);
|
$fullData = sqlDAL::fetchAllAssoc($res);
|
||||||
|
@ -884,6 +892,10 @@ if (!class_exists('Video')) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$arrayNotIN = YouPHPTubePlugin::getAllVideosExcludeVideosIDArray();
|
||||||
|
if(!empty($arrayNotIN) && is_array($arrayNotIN)){
|
||||||
|
$sql .= " AND v.id NOT IN ( '" . implode("', '", $arrayNotIN) . "') ";
|
||||||
|
}
|
||||||
if (!empty($_GET['channelName'])) {
|
if (!empty($_GET['channelName'])) {
|
||||||
$user = User::getChannelOwner($_GET['channelName']);
|
$user = User::getChannelOwner($_GET['channelName']);
|
||||||
$sql .= " AND v.users_id = {$user['id']} ";
|
$sql .= " AND v.users_id = {$user['id']} ";
|
||||||
|
@ -1393,18 +1405,18 @@ if (!class_exists('Video')) {
|
||||||
if ($status == 'u') {
|
if ($status == 'u') {
|
||||||
$obj->type = "info";
|
$obj->type = "info";
|
||||||
$obj->text = __("Unlisted");
|
$obj->text = __("Unlisted");
|
||||||
|
$tags[] = $obj;
|
||||||
|
$obj = new stdClass();
|
||||||
} else {
|
} else {
|
||||||
$obj->type = "success";
|
//$obj->type = "success";
|
||||||
$obj->text = __("Public");
|
//$obj->text = __("Public");
|
||||||
}
|
}
|
||||||
$tags[] = $obj;
|
|
||||||
$obj = new stdClass();
|
|
||||||
} else {
|
} else {
|
||||||
foreach ($groups as $value) {
|
foreach ($groups as $value) {
|
||||||
$obj = new stdClass();
|
$obj = new stdClass();
|
||||||
$obj->label = __("Group");
|
$obj->label = __("Group");
|
||||||
$obj->type = "warning";
|
$obj->type = "warning";
|
||||||
$obj->text = "{$value['id']} {$value['group_name']}";
|
$obj->text = "{$value['group_name']}";
|
||||||
$tags[] = $obj;
|
$tags[] = $obj;
|
||||||
$obj = new stdClass();
|
$obj = new stdClass();
|
||||||
}
|
}
|
||||||
|
|
|
@ -96,6 +96,7 @@ class CustomizeAdvanced extends PluginAbstract {
|
||||||
$obj->videosCDN = "";
|
$obj->videosCDN = "";
|
||||||
$obj->useFFMPEGToGenerateThumbs = false;
|
$obj->useFFMPEGToGenerateThumbs = false;
|
||||||
$obj->showImageDownloadOption = false;
|
$obj->showImageDownloadOption = false;
|
||||||
|
$obj->doNotDisplayViews = false;
|
||||||
|
|
||||||
return $obj;
|
return $obj;
|
||||||
}
|
}
|
||||||
|
|
|
@ -105,9 +105,13 @@ if (!empty($videos)) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
<?php
|
||||||
<span class="watch-view-count pull-right text-muted" itemprop="interactionCount"><?php echo number_format($video['views_count'], 0); ?> <?php echo __("Views"); ?></span>
|
if (empty($advancedCustom->doNotDisplayViews)) {
|
||||||
|
?>
|
||||||
|
<span class="watch-view-count pull-right text-muted" itemprop="interactionCount"><?php echo number_format($video['views_count'], 0); ?> <?php echo __("Views"); ?></span>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12 col-lg-12 watch8-action-buttons text-muted">
|
<div class="col-md-12 col-lg-12 watch8-action-buttons text-muted">
|
||||||
<button class="btn btn-default no-outline" id="addBtn<?php echo $video['id']; ?>" data-placement="bottom">
|
<button class="btn btn-default no-outline" id="addBtn<?php echo $video['id']; ?>" data-placement="bottom">
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
function showThis($who) {
|
function showThis($who) {
|
||||||
if (empty($_GET['showOnly'])) {
|
if (empty($_GET['showOnly'])) {
|
||||||
return true;
|
return true;
|
||||||
|
@ -123,13 +124,13 @@ function createGallerySection($videos, $crc = "", $get = array()) {
|
||||||
$img_portrait = ($value['rotation'] === "90" || $value['rotation'] === "270") ? "img-portrait" : "";
|
$img_portrait = ($value['rotation'] === "90" || $value['rotation'] === "270") ? "img-portrait" : "";
|
||||||
$name = User::getNameIdentificationById($value['users_id']);
|
$name = User::getNameIdentificationById($value['users_id']);
|
||||||
// make a row each 6 cols
|
// make a row each 6 cols
|
||||||
if ($countCols % $obj->screenColsLarge === 0 ) {
|
if ($countCols % $obj->screenColsLarge === 0) {
|
||||||
echo '</div><div class="row aligned-row ">';
|
echo '</div><div class="row aligned-row ">';
|
||||||
}
|
}
|
||||||
|
|
||||||
$countCols ++;
|
$countCols ++;
|
||||||
?>
|
?>
|
||||||
<div class="col-lg-<?php echo 12/$obj->screenColsLarge; ?> col-md-<?php echo 12/$obj->screenColsMedium; ?> col-sm-<?php echo 12/$obj->screenColsSmall; ?> col-xs-<?php echo 12/$obj->screenColsXSmall; ?> galleryVideo thumbsImage fixPadding" style="z-index: <?php echo $zindex--; ?>; min-height: 175px;">
|
<div class="col-lg-<?php echo 12 / $obj->screenColsLarge; ?> col-md-<?php echo 12 / $obj->screenColsMedium; ?> col-sm-<?php echo 12 / $obj->screenColsSmall; ?> col-xs-<?php echo 12 / $obj->screenColsXSmall; ?> galleryVideo thumbsImage fixPadding" style="z-index: <?php echo $zindex--; ?>; min-height: 175px;">
|
||||||
<a class="galleryLink" videos_id="<?php echo $value['id']; ?>" href="<?php echo Video::getLink($value['id'], $value['clean_title'], false, $getCN); ?>" title="<?php echo $value['title']; ?>">
|
<a class="galleryLink" videos_id="<?php echo $value['id']; ?>" href="<?php echo Video::getLink($value['id'], $value['clean_title'], false, $getCN); ?>" title="<?php echo $value['title']; ?>">
|
||||||
<?php
|
<?php
|
||||||
$images = Video::getImageFromFilename($value['filename'], $value['type']);
|
$images = Video::getImageFromFilename($value['filename'], $value['type']);
|
||||||
|
@ -176,12 +177,17 @@ function createGallerySection($videos, $crc = "", $get = array()) {
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
|
||||||
<i class="fa fa-eye"></i>
|
<?php
|
||||||
<span itemprop="interactionCount">
|
if (empty($advancedCustom->doNotDisplayViews)) {
|
||||||
<?php echo number_format($value['views_count'], 0); ?> <?php echo __("Views"); ?>
|
?>
|
||||||
</span>
|
<div>
|
||||||
</div>
|
<i class="fa fa-eye"></i>
|
||||||
|
<span itemprop="interactionCount">
|
||||||
|
<?php echo number_format($value['views_count'], 0); ?> <?php echo __("Views"); ?>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<?php } ?>
|
||||||
<div>
|
<div>
|
||||||
<i class="fa fa-clock-o"></i>
|
<i class="fa fa-clock-o"></i>
|
||||||
<?php echo humanTiming(strtotime($value['videoCreation'])), " ", __('ago'); ?>
|
<?php echo humanTiming(strtotime($value['videoCreation'])), " ", __('ago'); ?>
|
||||||
|
@ -274,6 +280,10 @@ function createGallerySection($videos, $crc = "", $get = array()) {
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
echo YouPHPTubePlugin::getGalleryActionButton($value['id']);
|
||||||
|
?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
<?php
|
<?php
|
||||||
if(empty($crc)){
|
if (empty($crc)) {
|
||||||
$crc = uniqid();
|
$crc = uniqid();
|
||||||
}
|
}
|
||||||
if ($obj->BigVideo && empty($_GET['showOnly'])) {
|
if ($obj->BigVideo && empty($_GET['showOnly'])) {
|
||||||
$name = User::getNameIdentificationById($video['users_id']);
|
$name = User::getNameIdentificationById($video['users_id']);
|
||||||
if(empty($get)){
|
if (empty($get)) {
|
||||||
$get = array();
|
$get = array();
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
@ -38,7 +38,7 @@ if ($obj->BigVideo && empty($_GET['showOnly'])) {
|
||||||
</div>
|
</div>
|
||||||
<div class="text-muted galeryDetails">
|
<div class="text-muted galeryDetails">
|
||||||
<div>
|
<div>
|
||||||
<?php if (empty($_GET['catName'])) { ?>
|
<?php if (empty($_GET['catName'])) { ?>
|
||||||
<a class="label label-default" href="<?php echo Video::getLink($video['id'], $video['clean_title'], false, $get); ?>/">
|
<a class="label label-default" href="<?php echo Video::getLink($video['id'], $video['clean_title'], false, $get); ?>/">
|
||||||
<?php
|
<?php
|
||||||
if (!empty($video['iconClass'])) {
|
if (!empty($video['iconClass'])) {
|
||||||
|
@ -63,10 +63,15 @@ if ($obj->BigVideo && empty($_GET['showOnly'])) {
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
|
||||||
<i class="fa fa-eye"></i>
|
<?php
|
||||||
<span itemprop="interactionCount"><?php echo number_format($video['views_count'], 0); ?> <?php echo __("Views"); ?></span>
|
if (empty($advancedCustom->doNotDisplayViews)) {
|
||||||
</div>
|
?>
|
||||||
|
<div>
|
||||||
|
<i class="fa fa-eye"></i>
|
||||||
|
<span itemprop="interactionCount"><?php echo number_format($video['views_count'], 0); ?> <?php echo __("Views"); ?></span>
|
||||||
|
</div>
|
||||||
|
<?php } ?>
|
||||||
<div>
|
<div>
|
||||||
<i class="fa fa-clock-o"></i>
|
<i class="fa fa-clock-o"></i>
|
||||||
<?php echo humanTiming(strtotime($video['videoCreation'])), " ", __('ago'); ?>
|
<?php echo humanTiming(strtotime($video['videoCreation'])), " ", __('ago'); ?>
|
||||||
|
@ -219,6 +224,10 @@ if ($obj->BigVideo && empty($_GET['showOnly'])) {
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
echo YouPHPTubePlugin::getGalleryActionButton($video['id']);
|
||||||
|
?>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
|
|
@ -181,11 +181,11 @@ abstract class PluginAbstract {
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getNetflixActionButton() {
|
public function getNetflixActionButton($videos_id) {
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getGalleryActionButton() {
|
public function getGalleryActionButton($videos_id) {
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -310,5 +310,13 @@ abstract class PluginAbstract {
|
||||||
|
|
||||||
return $desc;
|
return $desc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getAllVideosExcludeVideosIDArray(){
|
||||||
|
return array();
|
||||||
|
}
|
||||||
|
|
||||||
|
public function userCanWatchVideo($users_id, $videos_id){
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -42,6 +42,7 @@ class YouPHPFlix2 extends PluginAbstract {
|
||||||
$obj->backgroundRGB = "20,20,20";
|
$obj->backgroundRGB = "20,20,20";
|
||||||
$obj->landscapePosters = true;
|
$obj->landscapePosters = true;
|
||||||
$obj->playVideoOnFullscreen = true;
|
$obj->playVideoOnFullscreen = true;
|
||||||
|
$obj->youtubeModeOnFullscreen = false;
|
||||||
return $obj;
|
return $obj;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -65,13 +66,13 @@ class YouPHPFlix2 extends PluginAbstract {
|
||||||
$css = "";
|
$css = "";
|
||||||
//$css .= "<link href=\"{$global['webSiteRootURL']}view/css/custom/".$obj->theme.".css\" rel=\"stylesheet\" type=\"text/css\"/>";
|
//$css .= "<link href=\"{$global['webSiteRootURL']}view/css/custom/".$obj->theme.".css\" rel=\"stylesheet\" type=\"text/css\"/>";
|
||||||
$css .= "<link href=\"{$global['webSiteRootURL']}plugin/YouPHPFlix2/view/css/style.css\" rel=\"stylesheet\" type=\"text/css\"/>";
|
$css .= "<link href=\"{$global['webSiteRootURL']}plugin/YouPHPFlix2/view/css/style.css\" rel=\"stylesheet\" type=\"text/css\"/>";
|
||||||
if(!empty($obj->playVideoOnFullscreen) && !empty($_GET['videoName'])){
|
if(!empty($obj->youtubeModeOnFullscreen) && !empty($_GET['videoName'])){
|
||||||
$css .= '<link href="' . $global['webSiteRootURL'] . 'plugin/YouPHPFlix2/view/css/fullscreen.css" rel="stylesheet" type="text/css"/>';
|
$css .= '<link href="' . $global['webSiteRootURL'] . 'plugin/YouPHPFlix2/view/css/fullscreen.css" rel="stylesheet" type="text/css"/>';
|
||||||
|
|
||||||
$css .= '<style>.container-fluid {overflow: visible;padding: 0;}#mvideo{padding: 0 !important;}</style>';
|
$css .= '<style>.container-fluid {overflow: visible;padding: 0;}#mvideo{padding: 0 !important;}</style>';
|
||||||
|
|
||||||
}
|
}
|
||||||
if(!empty($obj->playVideoOnFullscreen)){
|
if(!empty($obj->youtubeModeOnFullscreen)){
|
||||||
$css .= '<style>body.fullScreen{overflow: hidden;}</style>';
|
$css .= '<style>body.fullScreen{overflow: hidden;}</style>';
|
||||||
}
|
}
|
||||||
return $css;
|
return $css;
|
||||||
|
|
|
@ -99,37 +99,37 @@ if ($obj->BigVideo && empty($_GET['showOnly'])) {
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<a href="#" class="btn btn-primary" id="addBtn<?php echo $value['id'] . $uid; ?>" data-placement="right" onclick="loadPlayLists('<?php echo $value['id'] . $uid; ?>', '<?php echo $value['id']; ?>');">
|
<a href="#" class="btn btn-primary" id="addBtn<?php echo $video['id'] . $uid; ?>" data-placement="right" onclick="loadPlayLists('<?php echo $video['id'] . $uid; ?>', '<?php echo $video['id']; ?>');">
|
||||||
<span class="fa fa-plus"></span> <?php echo __("Add to"); ?>
|
<span class="fa fa-plus"></span> <?php echo __("Add to"); ?>
|
||||||
</a>
|
</a>
|
||||||
<?php
|
<?php
|
||||||
echo YouPHPTubePlugin::getNetflixActionButton();
|
echo YouPHPTubePlugin::getNetflixActionButton($video['id']);
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="webui-popover-content<?php echo $value['id'] . $uid; ?>" style="display: none;" >
|
<div id="webui-popover-content<?php echo $video['id'] . $uid; ?>" style="display: none;" >
|
||||||
<?php if (User::isLogged()) { ?>
|
<?php if (User::isLogged()) { ?>
|
||||||
<form role="form">
|
<form role="form">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<input class="form-control" id="searchinput<?php echo $value['id'] . $uid; ?>" type="search" placeholder="<?php echo __("Search"); ?>..." />
|
<input class="form-control" id="searchinput<?php echo $video['id'] . $uid; ?>" type="search" placeholder="<?php echo __("Search"); ?>..." />
|
||||||
</div>
|
</div>
|
||||||
<div id="searchlist<?php echo $value['id'] . $uid; ?>" class="list-group">
|
<div id="searchlist<?php echo $video['id'] . $uid; ?>" class="list-group">
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
<div>
|
<div>
|
||||||
<hr>
|
<hr>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<input id="playListName<?php echo $value['id'] . $uid; ?>" class="form-control" placeholder="<?php echo __("Create a New Play List"); ?>" >
|
<input id="playListName<?php echo $video['id'] . $uid; ?>" class="form-control" placeholder="<?php echo __("Create a New Play List"); ?>" >
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<?php echo __("Make it public"); ?>
|
<?php echo __("Make it public"); ?>
|
||||||
<div class="material-switch pull-right">
|
<div class="material-switch pull-right">
|
||||||
<input id="publicPlayList<?php echo $value['id'] . $uid; ?>" name="publicPlayList" type="checkbox" checked="checked"/>
|
<input id="publicPlayList<?php echo $video['id'] . $uid; ?>" name="publicPlayList" type="checkbox" checked="checked"/>
|
||||||
<label for="publicPlayList" class="label-success"></label>
|
<label for="publicPlayList" class="label-success"></label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<button class="btn btn-success btn-block" id="addPlayList<?php echo $value['id'] . $uid; ?>" ><?php echo __("Create a New Play List"); ?></button>
|
<button class="btn btn-success btn-block" id="addPlayList<?php echo $video['id'] . $uid; ?>" ><?php echo __("Create a New Play List"); ?></button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<?php } else { ?>
|
<?php } else { ?>
|
||||||
|
@ -143,26 +143,26 @@ if ($obj->BigVideo && empty($_GET['showOnly'])) {
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
loadPlayLists('<?php echo $value['id'] . $uid; ?>', '<?php echo $value['id']; ?>');
|
loadPlayLists('<?php echo $video['id'] . $uid; ?>', '<?php echo $video['id']; ?>');
|
||||||
$('#addBtn<?php echo $value['id'] . $uid; ?>').webuiPopover({url: '#webui-popover-content<?php echo $value['id'] . $uid; ?>'});
|
$('#addBtn<?php echo $video['id'] . $uid; ?>').webuiPopover({url: '#webui-popover-content<?php echo $video['id'] . $uid; ?>'});
|
||||||
$('#addPlayList<?php echo $value['id'] . $uid; ?>').click(function () {
|
$('#addPlayList<?php echo $video['id'] . $uid; ?>').click(function () {
|
||||||
modal.showPleaseWait();
|
modal.showPleaseWait();
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: '<?php echo $global['webSiteRootURL']; ?>objects/playlistAddNew.json.php',
|
url: '<?php echo $global['webSiteRootURL']; ?>objects/playlistAddNew.json.php',
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
data: {
|
data: {
|
||||||
'videos_id': <?php echo $value['id']; ?>,
|
'videos_id': <?php echo $video['id']; ?>,
|
||||||
'status': $('#publicPlayList<?php echo $value['id'] . $uid; ?>').is(":checked") ? "public" : "private",
|
'status': $('#publicPlayList<?php echo $video['id'] . $uid; ?>').is(":checked") ? "public" : "private",
|
||||||
'name': $('#playListName<?php echo $value['id'] . $uid; ?>').val()
|
'name': $('#playListName<?php echo $video['id'] . $uid; ?>').val()
|
||||||
},
|
},
|
||||||
success: function (response) {
|
success: function (response) {
|
||||||
if (response.status === "1") {
|
if (response.status === "1") {
|
||||||
playList = [];
|
playList = [];
|
||||||
console.log(1);
|
console.log(1);
|
||||||
reloadPlayLists();
|
reloadPlayLists();
|
||||||
loadPlayLists('<?php echo $value['id'] . $uid; ?>', '<?php echo $value['id']; ?>');
|
loadPlayLists('<?php echo $video['id'] . $uid; ?>', '<?php echo $video['id']; ?>');
|
||||||
$('#playListName<?php echo $value['id'] . $uid; ?>').val("");
|
$('#playListName<?php echo $video['id'] . $uid; ?>').val("");
|
||||||
$('#publicPlayList<?php echo $value['id'] . $uid; ?>').prop('checked', true);
|
$('#publicPlayList<?php echo $video['id'] . $uid; ?>').prop('checked', true);
|
||||||
}
|
}
|
||||||
modal.hidePleaseWait();
|
modal.hidePleaseWait();
|
||||||
}
|
}
|
||||||
|
|
|
@ -299,4 +299,10 @@ footer .btn-outline {
|
||||||
}
|
}
|
||||||
#carouselRows h2{
|
#carouselRows h2{
|
||||||
position: relative;
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
body.fullscreen{
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
overflow: hidden;
|
||||||
}
|
}
|
|
@ -19,6 +19,7 @@ function flixFullScreen(link){
|
||||||
$('body').addClass('fullScreen');
|
$('body').addClass('fullScreen');
|
||||||
var div = $('<div id="divIframeFull" style="background-color:black;height: 100vh; width: 100vw; text-align: center; position: fixed; top: 0;left: 0; z-index: 9999;"><div id="divTopBar" style="position: fixed; top: 0; left: 0; height: 50px; width: 100vw; z-index: 99999; padding:10px; "><span id="closeBtnFull" class="btn pull-right" onclick="closeFlixFullScreen();" style="opacity: 0.5; filter: alpha(opacity=50);"><i class="fa fa-times"></i></span></div></div>').append('<iframe src="' + link + '" style="background-color:black; position: fixed; top: 0; left: 0; height: 100vh; width: 100vw; z-index: 9999; overflow: hidden;" id="iframeFull" allow="autoplay" allowfullscreen webkitallowfullscreen mozallowfullscreen oallowfullscreen msallowfullscreen>');
|
var div = $('<div id="divIframeFull" style="background-color:black;height: 100vh; width: 100vw; text-align: center; position: fixed; top: 0;left: 0; z-index: 9999;"><div id="divTopBar" style="position: fixed; top: 0; left: 0; height: 50px; width: 100vw; z-index: 99999; padding:10px; "><span id="closeBtnFull" class="btn pull-right" onclick="closeFlixFullScreen();" style="opacity: 0.5; filter: alpha(opacity=50);"><i class="fa fa-times"></i></span></div></div>').append('<iframe src="' + link + '" style="background-color:black; position: fixed; top: 0; left: 0; height: 100vh; width: 100vw; z-index: 9999; overflow: hidden;" id="iframeFull" allow="autoplay" allowfullscreen webkitallowfullscreen mozallowfullscreen oallowfullscreen msallowfullscreen>');
|
||||||
$('body').append(div);
|
$('body').append(div);
|
||||||
|
$('body').addClass('fullscreen');
|
||||||
$("#divIframeFull").fadeIn();
|
$("#divIframeFull").fadeIn();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -26,11 +27,11 @@ function flixFullScreen(link){
|
||||||
function closeFlixFullScreen() {
|
function closeFlixFullScreen() {
|
||||||
if($('#divIframeFull').length){
|
if($('#divIframeFull').length){
|
||||||
$("#divIframeFull").fadeOut("slow", function () {
|
$("#divIframeFull").fadeOut("slow", function () {
|
||||||
$('body').removeClass('fullScreen');
|
$('body').removeClass('fullscreen');
|
||||||
$('#divIframeFull').remove();
|
$('#divIframeFull').remove();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
$('body').removeClass('fullscreen');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -121,7 +121,7 @@ if (YouPHPTubePlugin::isEnabledByName("VideoTags")) {
|
||||||
<span class="fa fa-plus"></span> <?php echo __("Add to"); ?>
|
<span class="fa fa-plus"></span> <?php echo __("Add to"); ?>
|
||||||
</a>
|
</a>
|
||||||
<?php
|
<?php
|
||||||
echo YouPHPTubePlugin::getNetflixActionButton();
|
echo YouPHPTubePlugin::getNetflixActionButton($value['id']);
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -330,27 +330,27 @@ class YouPHPTubePlugin {
|
||||||
return $str;
|
return $str;
|
||||||
}
|
}
|
||||||
|
|
||||||
static function getNetflixActionButton() {
|
static function getNetflixActionButton($videos_id) {
|
||||||
$plugins = Plugin::getAllEnabled();
|
$plugins = Plugin::getAllEnabled();
|
||||||
$str = "";
|
$str = "";
|
||||||
foreach ($plugins as $value) {
|
foreach ($plugins as $value) {
|
||||||
$p = static::loadPlugin($value['dirName']);
|
$p = static::loadPlugin($value['dirName']);
|
||||||
|
|
||||||
if (is_object($p)) {
|
if (is_object($p)) {
|
||||||
$str .= $p->getNetflixActionButton();
|
$str .= $p->getNetflixActionButton($videos_id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return $str;
|
return $str;
|
||||||
}
|
}
|
||||||
|
|
||||||
static function getGalleryActionButton() {
|
static function getGalleryActionButton($videos_id) {
|
||||||
$plugins = Plugin::getAllEnabled();
|
$plugins = Plugin::getAllEnabled();
|
||||||
$str = "";
|
$str = "";
|
||||||
foreach ($plugins as $value) {
|
foreach ($plugins as $value) {
|
||||||
$p = static::loadPlugin($value['dirName']);
|
$p = static::loadPlugin($value['dirName']);
|
||||||
|
|
||||||
if (is_object($p)) {
|
if (is_object($p)) {
|
||||||
$str .= $p->getGalleryActionButton();
|
$str .= $p->getGalleryActionButton($videos_id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return $str;
|
return $str;
|
||||||
|
@ -675,5 +675,29 @@ class YouPHPTubePlugin {
|
||||||
}
|
}
|
||||||
return $btn;
|
return $btn;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getAllVideosExcludeVideosIDArray(){
|
||||||
|
$plugins = Plugin::getAllEnabled();
|
||||||
|
$array = array();
|
||||||
|
foreach ($plugins as $value) {
|
||||||
|
$p = static::loadPlugin($value['dirName']);
|
||||||
|
if (is_object($p)) {
|
||||||
|
$array = array_merge($array, $p->getAllVideosExcludeVideosIDArray());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return $array;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function userCanWatchVideo($users_id, $videos_id){
|
||||||
|
$plugins = Plugin::getAllEnabled();
|
||||||
|
$resp = true;
|
||||||
|
foreach ($plugins as $value) {
|
||||||
|
$p = static::loadPlugin($value['dirName']);
|
||||||
|
if (is_object($p)) {
|
||||||
|
$resp = $resp && $p->userCanWatchVideo($users_id, $videos_id);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return $resp;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
<?php
|
<?php
|
||||||
if(empty($crc)){
|
if (empty($crc)) {
|
||||||
$crc = uniqid();
|
$crc = uniqid();
|
||||||
}
|
}
|
||||||
if ($obj->BigVideo && empty($_GET['showOnly'])) {
|
if ($obj->BigVideo && empty($_GET['showOnly'])) {
|
||||||
$name = User::getNameIdentificationById($video['users_id']);
|
$name = User::getNameIdentificationById($video['users_id']);
|
||||||
if(empty($get)){
|
if (empty($get)) {
|
||||||
$get = array();
|
$get = array();
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
@ -38,7 +38,7 @@ if ($obj->BigVideo && empty($_GET['showOnly'])) {
|
||||||
</div>
|
</div>
|
||||||
<div class="text-muted galeryDetails">
|
<div class="text-muted galeryDetails">
|
||||||
<div>
|
<div>
|
||||||
<?php if (empty($_GET['catName'])) { ?>
|
<?php if (empty($_GET['catName'])) { ?>
|
||||||
<a class="label label-default" href="<?php echo Video::getLink($video['id'], $video['clean_title'], false, $get); ?>/">
|
<a class="label label-default" href="<?php echo Video::getLink($video['id'], $video['clean_title'], false, $get); ?>/">
|
||||||
<?php
|
<?php
|
||||||
if (!empty($video['iconClass'])) {
|
if (!empty($video['iconClass'])) {
|
||||||
|
@ -63,10 +63,17 @@ if ($obj->BigVideo && empty($_GET['showOnly'])) {
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
|
||||||
<i class="fa fa-eye"></i>
|
<?php
|
||||||
<span itemprop="interactionCount"><?php echo number_format($video['views_count'], 0); ?> <?php echo __("Views"); ?></span>
|
if (empty($advancedCustom->doNotDisplayViews)) {
|
||||||
</div>
|
?>
|
||||||
|
<div>
|
||||||
|
<i class="fa fa-eye"></i>
|
||||||
|
<span itemprop="interactionCount"><?php echo number_format($video['views_count'], 0); ?> <?php echo __("Views"); ?></span>
|
||||||
|
</div>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
<div>
|
<div>
|
||||||
<i class="fa fa-clock-o"></i>
|
<i class="fa fa-clock-o"></i>
|
||||||
<?php echo humanTiming(strtotime($video['videoCreation'])), " ", __('ago'); ?>
|
<?php echo humanTiming(strtotime($video['videoCreation'])), " ", __('ago'); ?>
|
||||||
|
@ -219,6 +226,10 @@ if ($obj->BigVideo && empty($_GET['showOnly'])) {
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
echo YouPHPTubePlugin::getGalleryActionButton();
|
||||||
|
?>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
|
|
@ -137,12 +137,19 @@ foreach ($playlists as $playlist) {
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<?php
|
||||||
<i class="fa fa-eye"></i>
|
if (empty($advancedCustom->doNotDisplayViews)) {
|
||||||
<span itemprop="interactionCount">
|
?>
|
||||||
<?php echo number_format($value['views_count'], 0); ?> <?php echo __("Views"); ?>
|
<div>
|
||||||
</span>
|
<i class="fa fa-eye"></i>
|
||||||
</div>
|
<span itemprop="interactionCount">
|
||||||
|
<?php echo number_format($value['views_count'], 0); ?> <?php echo __("Views"); ?>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<i class="fa fa-clock-o"></i>
|
<i class="fa fa-clock-o"></i>
|
||||||
<?php
|
<?php
|
||||||
|
@ -203,19 +210,18 @@ foreach ($playlists as $playlist) {
|
||||||
}
|
}
|
||||||
|
|
||||||
$_GET['channelName'] = $channelName;
|
$_GET['channelName'] = $channelName;
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
var timoutembed;
|
var timoutembed;
|
||||||
function setTextEmbedCopied(){
|
function setTextEmbedCopied() {
|
||||||
clearTimeout(timoutembed);
|
clearTimeout(timoutembed);
|
||||||
$("#btnEmbedText").html("<?php echo __("Copied!"); ?>");
|
$("#btnEmbedText").html("<?php echo __("Copied!"); ?>");
|
||||||
setTimeout(function(){
|
setTimeout(function () {
|
||||||
$("#btnEmbedText").html("<?php echo __("Copy embed code"); ?>");
|
$("#btnEmbedText").html("<?php echo __("Copy embed code"); ?>");
|
||||||
},3000);
|
}, 3000);
|
||||||
}
|
}
|
||||||
|
|
||||||
function saveSortable($sortableObject, playlist_id) {
|
function saveSortable($sortableObject, playlist_id) {
|
||||||
var list = $($sortableObject).sortable("toArray");
|
var list = $($sortableObject).sortable("toArray");
|
||||||
$.ajax({
|
$.ajax({
|
||||||
|
|
|
@ -15,7 +15,7 @@ $playlistVideos = PlayList::getVideosFromPlaylist($playlist_id);
|
||||||
</h3>
|
</h3>
|
||||||
<small>
|
<small>
|
||||||
<?php
|
<?php
|
||||||
echo ($playlist_index+1), "/", count($playlistVideos), " ", __("Videos");
|
echo ($playlist_index + 1), "/", count($playlistVideos), " ", __("Videos");
|
||||||
?>
|
?>
|
||||||
</small>
|
</small>
|
||||||
</a>
|
</a>
|
||||||
|
@ -28,20 +28,20 @@ $playlistVideos = PlayList::getVideosFromPlaylist($playlist_id);
|
||||||
$count = 0;
|
$count = 0;
|
||||||
foreach ($playlistVideos as $value) {
|
foreach ($playlistVideos as $value) {
|
||||||
$class = "";
|
$class = "";
|
||||||
$indicator = $count+1;
|
$indicator = $count + 1;
|
||||||
if ($count==$playlist_index) {
|
if ($count == $playlist_index) {
|
||||||
$class .= " active";
|
$class .= " active";
|
||||||
$indicator = '<span class="fa fa-play text-danger"></span>';
|
$indicator = '<span class="fa fa-play text-danger"></span>';
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<li class="<?php echo $class; ?>">
|
<li class="<?php echo $class; ?>">
|
||||||
<a href="<?php echo $global['webSiteRootURL']; ?>playlist/<?php echo $playlist_id; ?>/<?php echo $count; ?>" title="<?php echo $value['title']; ?>" class="videoLink row">
|
<a href="<?php echo $global['webSiteRootURL']; ?>playlist/<?php echo $playlist_id; ?>/<?php echo $count; ?>" title="<?php echo $value['title']; ?>" class="videoLink row">
|
||||||
<div class="col-md-1 col-sm-1 col-xs-1">
|
<div class="col-md-1 col-sm-1 col-xs-1">
|
||||||
<?php echo $indicator; ?>
|
<?php echo $indicator; ?>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-3 col-sm-3 col-xs-3 nopadding">
|
<div class="col-md-3 col-sm-3 col-xs-3 nopadding">
|
||||||
<?php
|
<?php
|
||||||
if (($value['type'] !== "audio")&&($value['type'] !== "linkAudio")) {
|
if (($value['type'] !== "audio") && ($value['type'] !== "linkAudio")) {
|
||||||
$img = "{$global['webSiteRootURL']}videos/{$value['filename']}.jpg";
|
$img = "{$global['webSiteRootURL']}videos/{$value['filename']}.jpg";
|
||||||
$img_portrait = ($value['rotation'] === "90" || $value['rotation'] === "270") ? "img-portrait" : "";
|
$img_portrait = ($value['rotation'] === "90" || $value['rotation'] === "270") ? "img-portrait" : "";
|
||||||
} else {
|
} else {
|
||||||
|
@ -64,9 +64,16 @@ $playlistVideos = PlayList::getVideosFromPlaylist($playlist_id);
|
||||||
<div>
|
<div>
|
||||||
<span class="<?php echo @$value['iconClass']; ?>"></span>
|
<span class="<?php echo @$value['iconClass']; ?>"></span>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
|
||||||
<strong class=""><?php echo number_format($value['views_count'], 0); ?></strong> <?php echo __("Views"); ?>
|
<?php
|
||||||
</div>
|
if (empty($advancedCustom->doNotDisplayViews)) {
|
||||||
|
?>
|
||||||
|
<div>
|
||||||
|
<strong class=""><?php echo number_format($value['views_count'], 0); ?></strong> <?php echo __("Views"); ?>
|
||||||
|
</div>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,47 +0,0 @@
|
||||||
/*!
|
|
||||||
Default styles for videojs-wavesurfer 2.5.0
|
|
||||||
*/
|
|
||||||
/* Position fullscreen control on right side of the player.
|
|
||||||
--------------------------------------------------------------------------------
|
|
||||||
*/
|
|
||||||
.video-js.vjs-wavesurfer .vjs-control.vjs-fullscreen-control {
|
|
||||||
position: absolute;
|
|
||||||
right: 0; }
|
|
||||||
|
|
||||||
/* Ensure custom controls are always visible because
|
|
||||||
the plugin hides and replace the video.js native mobile
|
|
||||||
controls.
|
|
||||||
--------------------------------------------------------------------------------
|
|
||||||
*/
|
|
||||||
.vjs-wavesurfer .vjs-using-native-controls .vjs-control-bar {
|
|
||||||
display: flex !important; }
|
|
||||||
|
|
||||||
/* Ensure playToggle has pointer cursor.
|
|
||||||
--------------------------------------------------------------------------------
|
|
||||||
*/
|
|
||||||
.vjs-wavesurfer button.vjs-play-control.vjs-control.vjs-button {
|
|
||||||
cursor: pointer; }
|
|
||||||
|
|
||||||
/* Ensure that vjs menus and interfaces can be interacted with (such as the
|
|
||||||
closed captions button).
|
|
||||||
--------------------------------------------------------------------------------
|
|
||||||
*/
|
|
||||||
.vjs-wavesurfer .vjs-menu-content {
|
|
||||||
z-index: 4; }
|
|
||||||
|
|
||||||
.vjs-wavesurfer .vjs-modal-dialog, .vjs-text-track-display {
|
|
||||||
z-index: 4; }
|
|
||||||
|
|
||||||
/* Handle responsive / fluid view.
|
|
||||||
--------------------------------------------------------------------------------
|
|
||||||
*/
|
|
||||||
.vjs-wavesurfer.vjs-fluid wave.vjs-wavedisplay {
|
|
||||||
top: 0;
|
|
||||||
position: absolute !important;
|
|
||||||
width: 100%;
|
|
||||||
min-width: 100%;
|
|
||||||
max-width: 100%;
|
|
||||||
height: 100%; }
|
|
||||||
|
|
||||||
|
|
||||||
/*# sourceMappingURL=videojs.wavesurfer.css.map*/
|
|
|
@ -1 +0,0 @@
|
||||||
{"version":3,"sources":["webpack://VideojsWavesurfer/./src/css/videojs.wavesurfer.scss"],"names":[],"mappings":";;;AAAA;AACA;AACA;AACA;AACA;AACA,WAAW;;AAEX;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B;;AAE3B;AACA;AACA;AACA;AACA,kBAAkB;;AAElB;AACA;AACA;AACA;AACA;AACA,aAAa;;AAEb;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe","file":"css/videojs.wavesurfer.css","sourcesContent":["/* Position fullscreen control on right side of the player.\n--------------------------------------------------------------------------------\n*/\n.video-js.vjs-wavesurfer .vjs-control.vjs-fullscreen-control {\n position: absolute;\n right: 0; }\n\n/* Ensure custom controls are always visible because\n the plugin hides and replace the video.js native mobile\n controls.\n--------------------------------------------------------------------------------\n*/\n.vjs-wavesurfer .vjs-using-native-controls .vjs-control-bar {\n display: flex !important; }\n\n/* Ensure playToggle has pointer cursor.\n--------------------------------------------------------------------------------\n*/\n.vjs-wavesurfer button.vjs-play-control.vjs-control.vjs-button {\n cursor: pointer; }\n\n/* Ensure that vjs menus and interfaces can be interacted with (such as the\n closed captions button).\n--------------------------------------------------------------------------------\n*/\n.vjs-wavesurfer .vjs-menu-content {\n z-index: 4; }\n\n.vjs-wavesurfer .vjs-modal-dialog, .vjs-text-track-display {\n z-index: 4; }\n\n/* Handle responsive / fluid view.\n--------------------------------------------------------------------------------\n*/\n.vjs-wavesurfer.vjs-fluid wave.vjs-wavedisplay {\n top: 0;\n position: absolute !important;\n width: 100%;\n min-width: 100%;\n max-width: 100%;\n height: 100%; }\n"],"sourceRoot":""}
|
|
|
@ -1,3 +0,0 @@
|
||||||
/*!
|
|
||||||
Default styles for videojs-wavesurfer 2.5.0
|
|
||||||
*/.video-js.vjs-wavesurfer .vjs-control.vjs-fullscreen-control{position:absolute;right:0}.vjs-wavesurfer .vjs-using-native-controls .vjs-control-bar{display:flex!important}.vjs-wavesurfer button.vjs-play-control.vjs-control.vjs-button{cursor:pointer}.vjs-text-track-display,.vjs-wavesurfer .vjs-menu-content,.vjs-wavesurfer .vjs-modal-dialog{z-index:1}.vjs-wavesurfer.vjs-fluid wave.vjs-wavedisplay{top:0;position:absolute!important;width:100%;min-width:100%;max-width:100%;height:100%}
|
|
1278
view/js/videojs-wavesurfer/dist/videojs.wavesurfer.js
vendored
1278
view/js/videojs-wavesurfer/dist/videojs.wavesurfer.js
vendored
File diff suppressed because it is too large
Load diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -294,12 +294,19 @@ YouPHPTubePlugin::getModeYouTube($v['id']);
|
||||||
<div class="col-xs-12 col-sm-12 col-md-12">
|
<div class="col-xs-12 col-sm-12 col-md-12">
|
||||||
<?php echo $video['creator']; ?>
|
<?php echo $video['creator']; ?>
|
||||||
</div>
|
</div>
|
||||||
<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>
|
|
||||||
<?php
|
<?php
|
||||||
if (YouPHPTubePlugin::isEnabledByName("VideoTags")) {
|
if (empty($advancedCustom->doNotDisplayViews)) {
|
||||||
echo VideoTags::getLabels($video['id']);
|
?>
|
||||||
}
|
<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>
|
||||||
?>
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<?php
|
||||||
|
if (YouPHPTubePlugin::isEnabledByName("VideoTags")) {
|
||||||
|
echo VideoTags::getLabels($video['id']);
|
||||||
|
}
|
||||||
|
?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -786,10 +793,17 @@ if (YouPHPTubePlugin::isEnabledByName("VideoTags")) {
|
||||||
<span class="<?php echo $autoPlayVideo['iconClass']; ?>"></span>
|
<span class="<?php echo $autoPlayVideo['iconClass']; ?>"></span>
|
||||||
<?php echo $autoPlayVideo['category']; ?>
|
<?php echo $autoPlayVideo['category']; ?>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
|
||||||
<strong class=""><?php echo number_format($autoPlayVideo['views_count'], 0); ?></strong>
|
<?php
|
||||||
<?php echo __("Views"); ?>
|
if (empty($advancedCustom->doNotDisplayViews)) {
|
||||||
</div>
|
?>
|
||||||
|
<div>
|
||||||
|
<strong class=""><?php echo number_format($autoPlayVideo['views_count'], 0); ?></strong>
|
||||||
|
<?php echo __("Views"); ?>
|
||||||
|
</div>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
<div><?php echo $autoPlayVideo['creator']; ?></div>
|
<div><?php echo $autoPlayVideo['creator']; ?></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
|
|
@ -107,12 +107,17 @@ unset($_POST['sort']);
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
|
||||||
<i class="fa fa-eye"></i>
|
<?php
|
||||||
<span itemprop="interactionCount">
|
if (empty($advancedCustom->doNotDisplayViews)) {
|
||||||
<?php echo number_format($value['views_count'], 0); ?> <?php echo __("Views"); ?>
|
?>
|
||||||
</span>
|
<div>
|
||||||
</div>
|
<i class="fa fa-eye"></i>
|
||||||
|
<span itemprop="interactionCount">
|
||||||
|
<?php echo number_format($value['views_count'], 0); ?> <?php echo __("Views"); ?>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<?php } ?>
|
||||||
<div>
|
<div>
|
||||||
<i class="fa fa-clock-o"></i>
|
<i class="fa fa-clock-o"></i>
|
||||||
<?php echo humanTiming(strtotime($value['videoCreation'])), " ", __('ago'); ?>
|
<?php echo humanTiming(strtotime($value['videoCreation'])), " ", __('ago'); ?>
|
||||||
|
@ -287,29 +292,29 @@ unset($_POST['sort']);
|
||||||
<script src="<?php echo $global['webSiteRootURL']; ?>plugin/Gallery/script.js" type="text/javascript"></script>
|
<script src="<?php echo $global['webSiteRootURL']; ?>plugin/Gallery/script.js" type="text/javascript"></script>
|
||||||
<script src="<?php echo $global['webSiteRootURL']; ?>view/js/infinite-scroll.pkgd.min.js" type="text/javascript"></script>
|
<script src="<?php echo $global['webSiteRootURL']; ?>view/js/infinite-scroll.pkgd.min.js" type="text/javascript"></script>
|
||||||
<script>
|
<script>
|
||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
$container = $('.results').infiniteScroll({
|
$container = $('.results').infiniteScroll({
|
||||||
path: '.pagination__next',
|
path: '.pagination__next',
|
||||||
append: '.searchResult',
|
append: '.searchResult',
|
||||||
status: '.scroller-status',
|
status: '.scroller-status',
|
||||||
hideNav: '.pagination',
|
hideNav: '.pagination',
|
||||||
});
|
});
|
||||||
$container.on('append.infiniteScroll', function (event, response, path, items) {
|
$container.on('append.infiniteScroll', function (event, response, path, items) {
|
||||||
lazyImage();
|
lazyImage();
|
||||||
});
|
});
|
||||||
lazyImage();
|
lazyImage();
|
||||||
});
|
});
|
||||||
function lazyImage() {
|
function lazyImage() {
|
||||||
$('.thumbsJPG').lazy({
|
$('.thumbsJPG').lazy({
|
||||||
effect: 'fadeIn',
|
effect: 'fadeIn',
|
||||||
visibleOnly: true,
|
visibleOnly: true,
|
||||||
// called after an element was successfully handled
|
// called after an element was successfully handled
|
||||||
afterLoad: function (element) {
|
afterLoad: function (element) {
|
||||||
element.removeClass('blur');
|
element.removeClass('blur');
|
||||||
}
|
|
||||||
});
|
|
||||||
mouseEffect();
|
|
||||||
}
|
}
|
||||||
|
});
|
||||||
|
mouseEffect();
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -75,7 +75,11 @@ if (!empty($_GET['channelName']) && empty($advancedCustomUser->hideRemoveChannel
|
||||||
<option value="newest" data-icon="glyphicon-sort-by-attributes" value="desc" <?php echo (!empty($_POST['sort']['created']) && $_POST['sort']['created'] == 'desc') ? "selected='selected'" : "" ?>> <?php echo __("Date added (newest)"); ?></option>
|
<option value="newest" data-icon="glyphicon-sort-by-attributes" value="desc" <?php echo (!empty($_POST['sort']['created']) && $_POST['sort']['created'] == 'desc') ? "selected='selected'" : "" ?>> <?php echo __("Date added (newest)"); ?></option>
|
||||||
<option value="oldest" data-icon="glyphicon-sort-by-attributes-alt" value="asc" <?php echo (!empty($_POST['sort']['created']) && $_POST['sort']['created'] == 'asc') ? "selected='selected'" : "" ?>> <?php echo __("Date added (oldest)"); ?></option>
|
<option value="oldest" data-icon="glyphicon-sort-by-attributes-alt" value="asc" <?php echo (!empty($_POST['sort']['created']) && $_POST['sort']['created'] == 'asc') ? "selected='selected'" : "" ?>> <?php echo __("Date added (oldest)"); ?></option>
|
||||||
<option value="popular" data-icon="glyphicon-thumbs-up" <?php echo (!empty($_POST['sort']['likes'])) ? "selected='selected'" : "" ?>> <?php echo __("Most popular"); ?></option>
|
<option value="popular" data-icon="glyphicon-thumbs-up" <?php echo (!empty($_POST['sort']['likes'])) ? "selected='selected'" : "" ?>> <?php echo __("Most popular"); ?></option>
|
||||||
<option value="views_count" data-icon="glyphicon-eye-open" <?php echo (!empty($_POST['sort']['views_count'])) ? "selected='selected'" : "" ?>> <?php echo __("Most watched"); ?></option>
|
<?php
|
||||||
|
if (empty($advancedCustom->doNotDisplayViews)) {
|
||||||
|
?>
|
||||||
|
<option value="views_count" data-icon="glyphicon-eye-open" <?php echo (!empty($_POST['sort']['views_count'])) ? "selected='selected'" : "" ?>> <?php echo __("Most watched"); ?></option>
|
||||||
|
<?php } ?>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-4 col-sm-12" style="position: relative; z-index: 2;">
|
<div class="col-md-4 col-sm-12" style="position: relative; z-index: 2;">
|
||||||
|
@ -120,15 +124,15 @@ foreach ($videos as $key => $value) {
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<div style="position: relative;">
|
<div style="position: relative;">
|
||||||
<img src="<?php echo $images->thumbsJpgSmall; ?>" data-src="<?php echo $img; ?>" alt="<?php echo $value['title']; ?>" class="thumbsJPG img-responsive text-center <?php echo $img_portrait; ?> rotate<?php echo $value['rotation']; ?> <?php echo ($img != $images->thumbsJpgSmall) ? "blur" : ""; ?>" height="130" />
|
<img src="<?php echo $images->thumbsJpgSmall; ?>" data-src="<?php echo $img; ?>" alt="<?php echo $value['title']; ?>" class="thumbsJPG img-responsive text-center <?php echo $img_portrait; ?> rotate<?php echo $value['rotation']; ?> <?php echo ($img != $images->thumbsJpgSmall) ? "blur" : ""; ?>" height="130" />
|
||||||
<?php
|
<?php
|
||||||
if (!empty($imgGif)) {
|
if (!empty($imgGif)) {
|
||||||
?>
|
?>
|
||||||
<img src="<?php echo $global['webSiteRootURL']; ?>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 <?php echo $img_portrait; ?> rotate<?php echo $value['rotation']; ?>" height="130" />
|
<img src="<?php echo $global['webSiteRootURL']; ?>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 <?php echo $img_portrait; ?> rotate<?php echo $value['rotation']; ?>" height="130" />
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<meta itemprop="thumbnailUrl" content="<?php echo $img; ?>" />
|
<meta itemprop="thumbnailUrl" content="<?php echo $img; ?>" />
|
||||||
<meta itemprop="uploadDate" content="<?php echo $value['created']; ?>" />
|
<meta itemprop="uploadDate" content="<?php echo $value['created']; ?>" />
|
||||||
<time class="duration" itemprop="duration" datetime="<?php echo Video::getItemPropDuration($value['duration']); ?>"><?php echo Video::getCleanDuration($value['duration']); ?></time>
|
<time class="duration" itemprop="duration" datetime="<?php echo Video::getItemPropDuration($value['duration']); ?>"><?php echo Video::getCleanDuration($value['duration']); ?></time>
|
||||||
</div>
|
</div>
|
||||||
<div class="progress" style="height: 3px;">
|
<div class="progress" style="height: 3px;">
|
||||||
<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>
|
<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>
|
||||||
|
@ -142,9 +146,13 @@ foreach ($videos as $key => $value) {
|
||||||
<span class="<?php echo $value['iconClass']; ?>"></span>
|
<span class="<?php echo $value['iconClass']; ?>"></span>
|
||||||
<?php echo $value['category']; ?>
|
<?php echo $value['category']; ?>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<?php
|
||||||
<strong class="view-count<?php echo $value['id']; ?>"><?php echo number_format($value['views_count'], 0); ?></strong> <?php echo __("Views"); ?>
|
if (empty($advancedCustom->doNotDisplayViews)) {
|
||||||
</div>
|
?>
|
||||||
|
<div>
|
||||||
|
<strong class="view-count<?php echo $value['id']; ?>"><?php echo number_format($value['views_count'], 0); ?></strong> <?php echo __("Views"); ?>
|
||||||
|
</div>
|
||||||
|
<?php } ?>
|
||||||
<div><?php echo $value['creator']; ?></div>
|
<div><?php echo $value['creator']; ?></div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue