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
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -47,3 +47,5 @@
|
|||
/plugin/CreateUserManager/
|
||||
/plugin/PlayListEmbed/
|
||||
/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]
|
||||
#for the embeded video name
|
||||
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 ^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/js/seetalert/sweetalert.css" rel="stylesheet" type="text/css"/>
|
||||
<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>
|
||||
|
||||
<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">
|
||||
</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>
|
||||
</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();
|
||||
|
||||
|
||||
function __construct($id="") {
|
||||
if (!empty($id)) {
|
||||
// get data from id
|
||||
$this->load($id);
|
||||
}
|
||||
}
|
||||
|
||||
protected function load($id) {
|
||||
$row = self::getFromDb($id);
|
||||
if (empty($row))
|
||||
|
@ -21,13 +29,6 @@ abstract class ObjectYPT implements ObjectInterface {
|
|||
return true;
|
||||
}
|
||||
|
||||
function __construct($id="") {
|
||||
if (!empty($id)) {
|
||||
// get data from id
|
||||
$this->load($id);
|
||||
}
|
||||
}
|
||||
|
||||
static protected function getFromDb($id) {
|
||||
global $global;
|
||||
$id = intval($id);
|
||||
|
|
|
@ -82,11 +82,16 @@ function get_max_file_size() {
|
|||
return humanFileSize(file_upload_max_size());
|
||||
}
|
||||
|
||||
function humanTiming($time) {
|
||||
function humanTiming($time, $precision = 0) {
|
||||
if (!is_int($time)) {
|
||||
$time = strtotime($time);
|
||||
}
|
||||
$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;
|
||||
$tokens = array(
|
||||
31536000 => 'year',
|
||||
|
@ -128,6 +133,13 @@ function humanTiming($time) {
|
|||
$text = __($text);
|
||||
}
|
||||
|
||||
if($precision){
|
||||
$rest = $time % $unit;
|
||||
if($rest){
|
||||
$text .= ' '.secondsToHumanTiming($rest, $precision-1);
|
||||
}
|
||||
}
|
||||
|
||||
return $numberOfUnits . ' ' . $text;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -499,12 +499,22 @@ if (typeof gtag !== \"function\") {
|
|||
if (User::isAdmin()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if(YouPHPTubePlugin::userCanWatchVideo(User::getId(), $videos_id)){
|
||||
return true;
|
||||
}
|
||||
|
||||
// check if the video is not public
|
||||
$rows = UserGroups::getVideoGroups($videos_id);
|
||||
|
||||
if (empty($rows)) {
|
||||
// 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()) {
|
||||
return false;
|
||||
|
|
|
@ -294,7 +294,7 @@ class UserGroups {
|
|||
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 = ? ";
|
||||
$res = sqlDAL::readSql($sql,"i",array($videos_id));
|
||||
$fullData = sqlDAL::fetchAllAssoc($res);
|
||||
|
|
|
@ -585,7 +585,10 @@ if (!class_exists('Video')) {
|
|||
}
|
||||
|
||||
$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)) {
|
||||
$sql .= " AND v.id = '$id' ";
|
||||
} elseif (empty($random) && !empty($_GET['videoName'])) {
|
||||
|
@ -695,6 +698,11 @@ if (!class_exists('Video')) {
|
|||
$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) {
|
||||
$sql .= self::getUserGroupsCanSeeSQL();
|
||||
}
|
||||
|
@ -749,7 +757,7 @@ if (!class_exists('Video')) {
|
|||
$sql .= " LIMIT 1";
|
||||
unset($_GET['limitOnceToOne']);
|
||||
}
|
||||
|
||||
//echo $sql;
|
||||
//error_log("getAllVideos($status, $showOnlyLoggedUserVideos , $ignoreGroup , ". json_encode($videosArrayId).")" . $sql);
|
||||
$res = sqlDAL::readSql($sql);
|
||||
$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'])) {
|
||||
$user = User::getChannelOwner($_GET['channelName']);
|
||||
$sql .= " AND v.users_id = {$user['id']} ";
|
||||
|
@ -1393,18 +1405,18 @@ if (!class_exists('Video')) {
|
|||
if ($status == 'u') {
|
||||
$obj->type = "info";
|
||||
$obj->text = __("Unlisted");
|
||||
} else {
|
||||
$obj->type = "success";
|
||||
$obj->text = __("Public");
|
||||
}
|
||||
$tags[] = $obj;
|
||||
$obj = new stdClass();
|
||||
} else {
|
||||
//$obj->type = "success";
|
||||
//$obj->text = __("Public");
|
||||
}
|
||||
} else {
|
||||
foreach ($groups as $value) {
|
||||
$obj = new stdClass();
|
||||
$obj->label = __("Group");
|
||||
$obj->type = "warning";
|
||||
$obj->text = "{$value['id']} {$value['group_name']}";
|
||||
$obj->text = "{$value['group_name']}";
|
||||
$tags[] = $obj;
|
||||
$obj = new stdClass();
|
||||
}
|
||||
|
|
|
@ -96,6 +96,7 @@ class CustomizeAdvanced extends PluginAbstract {
|
|||
$obj->videosCDN = "";
|
||||
$obj->useFFMPEGToGenerateThumbs = false;
|
||||
$obj->showImageDownloadOption = false;
|
||||
$obj->doNotDisplayViews = false;
|
||||
|
||||
return $obj;
|
||||
}
|
||||
|
|
|
@ -105,9 +105,13 @@ if (!empty($videos)) {
|
|||
}
|
||||
}
|
||||
?>
|
||||
|
||||
<?php
|
||||
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="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">
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
<?php
|
||||
|
||||
function showThis($who) {
|
||||
if (empty($_GET['showOnly'])) {
|
||||
return true;
|
||||
|
@ -176,12 +177,17 @@ function createGallerySection($videos, $crc = "", $get = array()) {
|
|||
}
|
||||
?>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
if (empty($advancedCustom->doNotDisplayViews)) {
|
||||
?>
|
||||
<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>
|
||||
<i class="fa fa-clock-o"></i>
|
||||
<?php echo humanTiming(strtotime($value['videoCreation'])), " ", __('ago'); ?>
|
||||
|
@ -274,6 +280,10 @@ function createGallerySection($videos, $crc = "", $get = array()) {
|
|||
});
|
||||
</script>
|
||||
<?php } ?>
|
||||
|
||||
<?php
|
||||
echo YouPHPTubePlugin::getGalleryActionButton($value['id']);
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
|
|
|
@ -63,10 +63,15 @@ if ($obj->BigVideo && empty($_GET['showOnly'])) {
|
|||
}
|
||||
?>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
if (empty($advancedCustom->doNotDisplayViews)) {
|
||||
?>
|
||||
<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>
|
||||
<i class="fa fa-clock-o"></i>
|
||||
<?php echo humanTiming(strtotime($video['videoCreation'])), " ", __('ago'); ?>
|
||||
|
@ -219,6 +224,10 @@ if ($obj->BigVideo && empty($_GET['showOnly'])) {
|
|||
});
|
||||
</script>
|
||||
<?php } ?>
|
||||
|
||||
<?php
|
||||
echo YouPHPTubePlugin::getGalleryActionButton($video['id']);
|
||||
?>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
|
|
|
@ -181,11 +181,11 @@ abstract class PluginAbstract {
|
|||
return "";
|
||||
}
|
||||
|
||||
public function getNetflixActionButton() {
|
||||
public function getNetflixActionButton($videos_id) {
|
||||
return "";
|
||||
}
|
||||
|
||||
public function getGalleryActionButton() {
|
||||
public function getGalleryActionButton($videos_id) {
|
||||
return "";
|
||||
}
|
||||
|
||||
|
@ -311,4 +311,12 @@ abstract class PluginAbstract {
|
|||
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->landscapePosters = true;
|
||||
$obj->playVideoOnFullscreen = true;
|
||||
$obj->youtubeModeOnFullscreen = false;
|
||||
return $obj;
|
||||
}
|
||||
|
||||
|
@ -65,13 +66,13 @@ class YouPHPFlix2 extends PluginAbstract {
|
|||
$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\"/>";
|
||||
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 .= '<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>';
|
||||
}
|
||||
return $css;
|
||||
|
|
|
@ -99,37 +99,37 @@ if ($obj->BigVideo && empty($_GET['showOnly'])) {
|
|||
<?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"); ?>
|
||||
</a>
|
||||
<?php
|
||||
echo YouPHPTubePlugin::getNetflixActionButton();
|
||||
echo YouPHPTubePlugin::getNetflixActionButton($video['id']);
|
||||
?>
|
||||
</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()) { ?>
|
||||
<form role="form">
|
||||
<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 id="searchlist<?php echo $value['id'] . $uid; ?>" class="list-group">
|
||||
<div id="searchlist<?php echo $video['id'] . $uid; ?>" class="list-group">
|
||||
</div>
|
||||
</form>
|
||||
<div>
|
||||
<hr>
|
||||
<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 class="form-group">
|
||||
<?php echo __("Make it public"); ?>
|
||||
<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>
|
||||
</div>
|
||||
</div>
|
||||
<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>
|
||||
<?php } else { ?>
|
||||
|
@ -143,26 +143,26 @@ if ($obj->BigVideo && empty($_GET['showOnly'])) {
|
|||
</div>
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
loadPlayLists('<?php echo $value['id'] . $uid; ?>', '<?php echo $value['id']; ?>');
|
||||
$('#addBtn<?php echo $value['id'] . $uid; ?>').webuiPopover({url: '#webui-popover-content<?php echo $value['id'] . $uid; ?>'});
|
||||
$('#addPlayList<?php echo $value['id'] . $uid; ?>').click(function () {
|
||||
loadPlayLists('<?php echo $video['id'] . $uid; ?>', '<?php echo $video['id']; ?>');
|
||||
$('#addBtn<?php echo $video['id'] . $uid; ?>').webuiPopover({url: '#webui-popover-content<?php echo $video['id'] . $uid; ?>'});
|
||||
$('#addPlayList<?php echo $video['id'] . $uid; ?>').click(function () {
|
||||
modal.showPleaseWait();
|
||||
$.ajax({
|
||||
url: '<?php echo $global['webSiteRootURL']; ?>objects/playlistAddNew.json.php',
|
||||
method: 'POST',
|
||||
data: {
|
||||
'videos_id': <?php echo $value['id']; ?>,
|
||||
'status': $('#publicPlayList<?php echo $value['id'] . $uid; ?>').is(":checked") ? "public" : "private",
|
||||
'name': $('#playListName<?php echo $value['id'] . $uid; ?>').val()
|
||||
'videos_id': <?php echo $video['id']; ?>,
|
||||
'status': $('#publicPlayList<?php echo $video['id'] . $uid; ?>').is(":checked") ? "public" : "private",
|
||||
'name': $('#playListName<?php echo $video['id'] . $uid; ?>').val()
|
||||
},
|
||||
success: function (response) {
|
||||
if (response.status === "1") {
|
||||
playList = [];
|
||||
console.log(1);
|
||||
reloadPlayLists();
|
||||
loadPlayLists('<?php echo $value['id'] . $uid; ?>', '<?php echo $value['id']; ?>');
|
||||
$('#playListName<?php echo $value['id'] . $uid; ?>').val("");
|
||||
$('#publicPlayList<?php echo $value['id'] . $uid; ?>').prop('checked', true);
|
||||
loadPlayLists('<?php echo $video['id'] . $uid; ?>', '<?php echo $video['id']; ?>');
|
||||
$('#playListName<?php echo $video['id'] . $uid; ?>').val("");
|
||||
$('#publicPlayList<?php echo $video['id'] . $uid; ?>').prop('checked', true);
|
||||
}
|
||||
modal.hidePleaseWait();
|
||||
}
|
||||
|
|
|
@ -300,3 +300,9 @@ footer .btn-outline {
|
|||
#carouselRows h2{
|
||||
position: relative;
|
||||
}
|
||||
|
||||
body.fullscreen{
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
overflow: hidden;
|
||||
}
|
|
@ -19,6 +19,7 @@ function flixFullScreen(link){
|
|||
$('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>');
|
||||
$('body').append(div);
|
||||
$('body').addClass('fullscreen');
|
||||
$("#divIframeFull").fadeIn();
|
||||
|
||||
}
|
||||
|
@ -26,11 +27,11 @@ function flixFullScreen(link){
|
|||
function closeFlixFullScreen() {
|
||||
if($('#divIframeFull').length){
|
||||
$("#divIframeFull").fadeOut("slow", function () {
|
||||
$('body').removeClass('fullScreen');
|
||||
$('body').removeClass('fullscreen');
|
||||
$('#divIframeFull').remove();
|
||||
});
|
||||
}
|
||||
|
||||
$('body').removeClass('fullscreen');
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -121,7 +121,7 @@ if (YouPHPTubePlugin::isEnabledByName("VideoTags")) {
|
|||
<span class="fa fa-plus"></span> <?php echo __("Add to"); ?>
|
||||
</a>
|
||||
<?php
|
||||
echo YouPHPTubePlugin::getNetflixActionButton();
|
||||
echo YouPHPTubePlugin::getNetflixActionButton($value['id']);
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -330,27 +330,27 @@ class YouPHPTubePlugin {
|
|||
return $str;
|
||||
}
|
||||
|
||||
static function getNetflixActionButton() {
|
||||
static function getNetflixActionButton($videos_id) {
|
||||
$plugins = Plugin::getAllEnabled();
|
||||
$str = "";
|
||||
foreach ($plugins as $value) {
|
||||
$p = static::loadPlugin($value['dirName']);
|
||||
|
||||
if (is_object($p)) {
|
||||
$str .= $p->getNetflixActionButton();
|
||||
$str .= $p->getNetflixActionButton($videos_id);
|
||||
}
|
||||
}
|
||||
return $str;
|
||||
}
|
||||
|
||||
static function getGalleryActionButton() {
|
||||
static function getGalleryActionButton($videos_id) {
|
||||
$plugins = Plugin::getAllEnabled();
|
||||
$str = "";
|
||||
foreach ($plugins as $value) {
|
||||
$p = static::loadPlugin($value['dirName']);
|
||||
|
||||
if (is_object($p)) {
|
||||
$str .= $p->getGalleryActionButton();
|
||||
$str .= $p->getGalleryActionButton($videos_id);
|
||||
}
|
||||
}
|
||||
return $str;
|
||||
|
@ -676,4 +676,28 @@ class YouPHPTubePlugin {
|
|||
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;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -63,10 +63,17 @@ if ($obj->BigVideo && empty($_GET['showOnly'])) {
|
|||
}
|
||||
?>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
if (empty($advancedCustom->doNotDisplayViews)) {
|
||||
?>
|
||||
<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>
|
||||
<i class="fa fa-clock-o"></i>
|
||||
<?php echo humanTiming(strtotime($video['videoCreation'])), " ", __('ago'); ?>
|
||||
|
@ -219,6 +226,10 @@ if ($obj->BigVideo && empty($_GET['showOnly'])) {
|
|||
});
|
||||
</script>
|
||||
<?php } ?>
|
||||
|
||||
<?php
|
||||
echo YouPHPTubePlugin::getGalleryActionButton();
|
||||
?>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
|
|
|
@ -137,12 +137,19 @@ foreach ($playlists as $playlist) {
|
|||
}
|
||||
?>
|
||||
</div>
|
||||
<?php
|
||||
if (empty($advancedCustom->doNotDisplayViews)) {
|
||||
?>
|
||||
<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>
|
||||
<i class="fa fa-clock-o"></i>
|
||||
<?php
|
||||
|
@ -203,7 +210,6 @@ foreach ($playlists as $playlist) {
|
|||
}
|
||||
|
||||
$_GET['channelName'] = $channelName;
|
||||
|
||||
?>
|
||||
<script>
|
||||
|
||||
|
|
|
@ -64,9 +64,16 @@ $playlistVideos = PlayList::getVideosFromPlaylist($playlist_id);
|
|||
<div>
|
||||
<span class="<?php echo @$value['iconClass']; ?>"></span>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
if (empty($advancedCustom->doNotDisplayViews)) {
|
||||
?>
|
||||
<div>
|
||||
<strong class=""><?php echo number_format($value['views_count'], 0); ?></strong> <?php echo __("Views"); ?>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
</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,8 +294,15 @@ YouPHPTubePlugin::getModeYouTube($v['id']);
|
|||
<div class="col-xs-12 col-sm-12 col-md-12">
|
||||
<?php echo $video['creator']; ?>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
if (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>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<?php
|
||||
if (YouPHPTubePlugin::isEnabledByName("VideoTags")) {
|
||||
echo VideoTags::getLabels($video['id']);
|
||||
}
|
||||
|
@ -786,10 +793,17 @@ if (YouPHPTubePlugin::isEnabledByName("VideoTags")) {
|
|||
<span class="<?php echo $autoPlayVideo['iconClass']; ?>"></span>
|
||||
<?php echo $autoPlayVideo['category']; ?>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
if (empty($advancedCustom->doNotDisplayViews)) {
|
||||
?>
|
||||
<div>
|
||||
<strong class=""><?php echo number_format($autoPlayVideo['views_count'], 0); ?></strong>
|
||||
<?php echo __("Views"); ?>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<div><?php echo $autoPlayVideo['creator']; ?></div>
|
||||
</div>
|
||||
<div class="row">
|
||||
|
|
|
@ -107,12 +107,17 @@ unset($_POST['sort']);
|
|||
}
|
||||
?>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
if (empty($advancedCustom->doNotDisplayViews)) {
|
||||
?>
|
||||
<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>
|
||||
<i class="fa fa-clock-o"></i>
|
||||
<?php echo humanTiming(strtotime($value['videoCreation'])), " ", __('ago'); ?>
|
||||
|
|
|
@ -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="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>
|
||||
<?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>
|
||||
</div>
|
||||
<div class="col-md-4 col-sm-12" style="position: relative; z-index: 2;">
|
||||
|
@ -142,9 +146,13 @@ foreach ($videos as $key => $value) {
|
|||
<span class="<?php echo $value['iconClass']; ?>"></span>
|
||||
<?php echo $value['category']; ?>
|
||||
</div>
|
||||
<?php
|
||||
if (empty($advancedCustom->doNotDisplayViews)) {
|
||||
?>
|
||||
<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>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue