1
0
Fork 0
mirror of https://github.com/DanielnetoDotCom/YouPHPTube synced 2025-10-05 19:42:38 +02:00
Daniel 2021-07-26 10:58:28 -03:00
parent 64e2f7bb1b
commit cb860430ce
30 changed files with 620 additions and 397 deletions

1
.gitignore vendored
View file

@ -73,3 +73,4 @@
*.zip
sitemap.xml
/plugin/WebRTCLiveCam/
/plugin/Wix/

View file

@ -280,6 +280,10 @@ class Category {
return "{$global['webSiteRootURL']}cat/{$clean_name}";
}
function getLink(){
return self::getCategoryLinkFromName($this->getClean_name());
}
static function getCategoryByName($name) {
global $global;
$sql = "SELECT * FROM categories WHERE clean_name = ? LIMIT 1";

View file

@ -19,7 +19,6 @@ function fixCommentText($subject){
foreach ($comments as $key => $value) {
$name = User::getNameIdentificationById($value['users_id']);
//$comments[$key]['comment'] = " <div class=\"commenterName\"><strong>{$name}</strong><div class=\"date sub-text\">{$value['created']}</div></div><div class=\"commentText\">". nl2br($value['comment'])."</div>";
$comments[$key]['comment'] = '<div class="pull-left"><img src="'.User::getPhoto($value['users_id']).'" alt="User Photo" class="img img-responsive img-circle" style="max-width: 50px;"/></div><div class="commentDetails"><div class="commenterName"><strong><a href="'.User::getChannelLink($value['users_id']).'">'.$name.'</a></strong> <small>'.humanTiming(strtotime($value['created'])).'</small></div>'. fixCommentText(textToLink($value['commentHTML'])).'</div>';
$comments[$key]['total_replies'] = Comment::getTotalComments($_GET['video_id'], $comments[$key]['id']);
$comments[$key]['video'] = Video::getVideo($comments[$key]['videos_id']);

View file

@ -2173,7 +2173,7 @@ function combineFiles($filesArray, $extension = "js") {
function local_get_contents($path) {
if (function_exists('fopen')) {
$myfile = fopen($path, "r") or die("Unable to open file!");
$myfile = fopen($path, "r") or die("Unable to open file! [{$path}]");
$text = fread($myfile, filesize($path));
fclose($myfile);
return $text;

View file

@ -335,64 +335,51 @@ class Subscribe {
}
$total = static::getTotalSubscribes($user_id);
$btnFile = $global['systemRootPath'] . 'view/subscribeBtnOffline.html';
$subscribe = "<div class=\"btn-group\" >"
. "<button class='btn btn-xs subsB subs{$user_id} subscribeButton{$user_id}' "
. "title=\"" . __("Want to subscribe to this channel?") . "\" "
. "data-content=\"" . __("Sign in to subscribe to this channel") . "<hr><center><a class='btn btn-success btn-sm' href='{$global['webSiteRootURL']}user'>" . __("Sign in") . "</a></center>\" "
. "tabindex=\"0\" role=\"button\" data-html=\"true\" data-toggle=\"popover\" data-placement=\"bottom\" ><i class='fas fa-play-circle'></i> <b class='text'>" . __("Subscribe") . "</b></button>"
. "<button class='btn btn-xs subsB subs{$user_id}'><b class='textTotal{$user_id}'>{$total}</b></button>"
. "</div>";
//show subscribe button with mail field
$popover = "";
$script = "";
$notify = '';
$email = '';
$subscribed = '';
$subscribeText = __("Subscribe");
$subscribedText = __("Subscribed");
if (User::isLogged()) {
//check if the email is logged
$btnFile = $global['systemRootPath'] . 'view/subscribeBtn.html';
$email = User::getMail();
$subs = Subscribe::getSubscribeFromID(User::getId(), $user_id);
$popover = "<input type=\"hidden\" placeholder=\"E-mail\" class=\"form-control\" id=\"subscribeEmail{$user_id}\" value=\"{$email}\">";
// show unsubscribe Button
$subscribe = "<div class=\"btn-group\">";
if (!empty($subs) && $subs['status'] === 'a') {
$subscribe .= "<button class='btn btn-xs subsB subscribeButton{$user_id} subscribed subs{$user_id}'><i class='fas fa-play-circle'></i> <b class='text'>" . __("Subscribed") . "</b></button>";
$subscribe .= "<button class='btn btn-xs subsB subscribed subs{$user_id}'><b class='textTotal{$user_id}'>$total</b></button>";
} else {
$subscribe .= "<button class='btn btn-xs subsB subscribeButton{$user_id} subs{$user_id}'><i class='fas fa-play-circle'></i> <b class='text'>" . __("Subscribe") . "</b></button>";
$subscribe .= "<button class='btn btn-xs subsB subs{$user_id}'><b class='textTotal{$user_id}'>$total</b></button>";
}
$subscribe .= "</div>";
if (!empty($subs['notify'])) {
$notify = '';
$notNotify = 'hidden';
} else {
$notify = 'hidden';
$notNotify = '';
}
$subscribe .= '<span class=" notify' . $user_id . ' ' . $notify . '"><button onclick="toogleNotify' . $user_id . '();" class="btn btn-default btn-xs " data-toggle="tooltip"
title="' . __("Stop getting notified for every new video") . '">
<i class="fa fa-bell" ></i>
</button></span><span class=" notNotify' . $user_id . ' ' . $notNotify . '"><button onclick="toogleNotify' . $user_id . '();" class="btn btn-default btn-xs " data-toggle="tooltip"
title="' . __("Click to get notified for every new video") . '">
<i class="fa fa-bell-slash"></i>
</button></span>';
$script = "<script>
function toogleNotify{$user_id}(){
email = $('#subscribeEmail{$user_id}').val();
subscribeNotify(email, '{$user_id}');
}
$(document).ready(function () {
$(\".subscribeButton{$user_id}\").off(\"click\");
$(\".subscribeButton{$user_id}\").click(function () {
email = $('#subscribeEmail{$user_id}').val();
subscribe(email, '{$user_id}');
});
});
</script>";
$notify = 'notify';
}
return $subscribe . $popover . $script;
if (!empty($subs) && $subs['status'] === 'a') {
$subscribed = 'subscribed';
}
}
$content = local_get_contents($btnFile);
$signInBTN = ("<a class='btn btn-primary btn-sm btn-block' href='{$global['webSiteRootURL']}user'>".__("Sign in to subscribe to this channel")."</a>");
$search = array(
'_user_id_',
'{notify}',
'{tooltipStop}',
'{tooltip}',
'{titleOffline}',
'{tooltipOffline}',
'{email}', '{total}',
'{subscribed}', '{subscribeText}', '{subscribedText}');
$replace = array(
$user_id,
$notify,
__("Stop getting notified for every new video"),
__("Click to get notified for every new video"),
__("Want to subscribe to this channel?"),
$signInBTN,
$email, $total,
$subscribed, $subscribeText, $subscribedText);
$btnHTML = str_replace($search, $replace, $content);
return $btnHTML;
}
function getSubscriber_users_id() {
@ -411,6 +398,4 @@ class Subscribe {
$this->users_id = $users_id;
}
}

View file

@ -4321,6 +4321,178 @@ if (!class_exists('Video')) {
return false;
}
static function getCreatorHTML($users_id, $html = '', $small=false) {
global $global;
if($small){
$template = $global['systemRootPath'] . 'view/videoCreatorSmall.html';
}else{
$template = $global['systemRootPath'] . 'view/videoCreator.html';
}
$content = local_get_contents($template);
$name = User::getNameIdentificationById($users_id);
$search = array(
'{photo}',
'{channelLink}',
'{name}',
'{icon}',
'{subscriptionButton}',
'{html}');
$replace = array(
User::getPhoto($users_id),
User::getChannelLink($users_id),
strip_tags($name),
User::getEmailVerifiedIcon($users_id),
Subscribe::getButton($users_id),
$html
);
$btnHTML = str_replace($search, $replace, $content);
return $btnHTML;
}
static function getVideosListItem($videos_id, $divID='', $style='') {
global $global, $advancedCustom;
if(empty($divID)){
$divID = "divVideo-{$videos_id}";
}
$objGallery = AVideoPlugin::getObjectData("Gallery");
$program = AVideoPlugin::loadPluginIfEnabled('PlayLists');
$template = $global['systemRootPath'] . 'view/videosListItem.html';
$content = local_get_contents($template);
$value = Video::getVideoLight($videos_id);
$link = Video::getLink($value['id'], $value['clean_title'], "", $get);
if (!empty($_GET['page']) && $_GET['page'] > 1) {
$link = addQueryStringParameter($link, 'page', $_GET['page']);
}
$title = $value['title'];
$images = Video::getImageFromFilename($value['filename'], $value['type']);
if (!is_object($images)) {
$images = new stdClass();
$images->thumbsGif = "";
$images->poster = getCDN() . "view/img/notfound.jpg";
$images->thumbsJpg = getCDN() . "view/img/notfoundThumbs.jpg";
$images->thumbsJpgSmall = getCDN() . "view/img/notfoundThumbsSmall.jpg";
}
$imgJPGLow = $images->thumbsJpgSmall;
$imgJPGHight = $images->thumbsJpg;
$imgGif = $images->thumbsGif;
$imgGifHTML = '';
if (!empty($images->posterPortrait) && basename($images->posterPortrait) !== 'notfound_portrait.jpg' && basename($images->posterPortrait) !== 'pdf_portrait.png' && basename($images->posterPortrait) !== 'article_portrait.png') {
$imgGif = $images->gifPortrait;
$imgJPGHight = $images->posterPortrait;
}
if (!empty($imgGif)) {
$imgGifHTML = '<img src="' . getCDN() . 'view/img/loading-gif.png" data-src="' . $imgGif . '" style="position: absolute; top: 0; display: none;" alt="' . $title . '" id="thumbsGIF' . $videos_id . '" class="thumbsGIF img-responsive" height="130" />';
}
$timeHTML = '';
if (isToShowDuration($value['type'])) {
$timeHTML = '<time class="duration" datetime="' . Video::getItemPropDuration($value['duration']) . '">' . Video::getCleanDuration($value['duration']) . '</time>';
}
$loggedUserHTML = '';
if (User::isLogged() && !empty($program)) {
$value['favoriteId'] = self::getFavoriteIdFromUser(User::getId());
$value['watchLaterId'] = self::getWatchLaterIdFromUser(User::getId());
if ($value['isWatchLater']) {
$watchLaterBtnAddedStyle = "";
$watchLaterBtnStyle = "display: none;";
} else {
$watchLaterBtnAddedStyle = "display: none;";
$watchLaterBtnStyle = "";
}
if ($value['isFavorite']) {
$favoriteBtnAddedStyle = "";
$favoriteBtnStyle = "display: none;";
} else {
$favoriteBtnAddedStyle = "display: none;";
$favoriteBtnStyle = "";
}
$loggedUserHTML = '<div class="galleryVideoButtons">';
$loggedUserHTML .= '<button onclick="addVideoToPlayList(' . $value['id'] . ', false, ' . $value['watchLaterId'] . ');return false;" '
. 'class="btn btn-dark btn-xs watchLaterBtnAdded watchLaterBtnAdded' . $value['id'] . '" '
. 'title="' . __("Added On Watch Later") . '" style="color: #4285f4;' . $watchLaterBtnAddedStyle . '" ><i class="fas fa-check"></i></button> ';
$loggedUserHTML .= '<button onclick="addVideoToPlayList(' . $value['id'] . ', true, ' . $value['watchLaterId'] . ');return false;" class="btn btn-dark btn-xs watchLaterBtn watchLaterBtn' . $value['id'] . '" title="' . __("Watch Later") . '" style="' . $watchLaterBtnStyle . '" ><i class="fas fa-clock"></i></button>';
$loggedUserHTML .= '<br>';
$loggedUserHTML .= '<button onclick="addVideoToPlayList(' . $value['id'] . ', false, ' . $value['favoriteId'] . ');return false;" class="btn btn-dark btn-xs favoriteBtnAdded favoriteBtnAdded' . $value['id'] . '" title="' . __("Added On Favorite") . '" style="color: #4285f4; ' . $favoriteBtnAddedStyle . '"><i class="fas fa-check"></i></button> ';
$loggedUserHTML .= '<button onclick="addVideoToPlayList(' . $value['id'] . ', true, ' . $value['favoriteId'] . ');return false;" class="btn btn-dark btn-xs favoriteBtn favoriteBtn' . $value['id'] . '" title="' . __("Favorite") . '" style="' . $favoriteBtnStyle . '" ><i class="fas fa-heart" ></i></button> ';
$loggedUserHTML .= '</div>';
}
$progress = self::getVideoPogressPercent($value['id']);;
$category = new Category($value['categories_id']);
$categoryLink = $category->getLink();
$categoryIcon = $category->getIconClass();
$category = $category->getName();
$tagsHTML = '';
$tagsWhitelist = array(__("Paid Content"), __("Group"), __("Plugin"));
if (!empty($objGallery->showTags)) {
foreach ($value['tags'] as $value2) {
if (!empty($value2->label) && in_array($value2->label, $tagsWhitelist)) {
$tagsHTML .= '<span class="label label-' . $value2->type . '">' . $value2->text . '</span>';
}
}
}
$viewsHTML = '';
if (empty($advancedCustom->doNotDisplayViews)) {
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>';
} else {
$viewsHTML = '<div class="text-muted pull-right"><i class="fas fa-eye"></i> ' . number_format($value['views_count'], 0) . '</strong></div>';
}
}
$creator = self::getCreatorHTML($value['users_id'], '', true);
$search = array(
'{style}',
'{divID}',
'{link}',
'{title}',
'{imgJPGLow}',
'{imgJPGHight}',
'{imgGifHTML}',
'{timeHTML}',
'{loggedUserHTML}',
'{progress}',
'{categoryLink}',
'{categoryIcon}',
'{category}',
'{tagsHTML}',
'{viewsHTML}',
'{creator}');
$replace = array(
$style,
$divID,
$link,
$title,
$imgJPGLow,
$imgJPGHight,
$imgGifHTML,
$timeHTML,
$loggedUserHTML,
$progress,
$categoryLink,
$categoryIcon,
$category,
$tagsHTML,
$viewsHTML,
$creator
);
$btnHTML = str_replace($search, $replace, $content);
return $btnHTML;
}
}
}

View file

@ -28,7 +28,6 @@ $total = Video::getTotalVideos('', $showOnlyLoggedUserVideos, true, $showUnliste
foreach ($videos as $key => $value) {
unset($value['password'], $value['recoverPass']);
$name = empty($value['name'])?$value['user']:$value['name'];
//$categories[$key]['comment'] = " <div class=\"commenterName\"><strong>{$name}</strong><div class=\"date sub-text\">{$value['created']}</div></div><div class=\"commentText\">". nl2br($value['comment'])."</div>";
$videos[$key]['creator'] = '<div class="pull-left"><img src="'.User::getPhoto($value['users_id']).'" alt="User Photo" class="img img-responsive img-circle" style="max-width: 50px;"/></div><div class="commentDetails"><div class="commenterName"><strong>'.$name.'</strong>' . User::getEmailVerifiedIcon($value['users_id']) . ' <small>'.humanTiming(strtotime($value['videoCreation'])).'</small></div></div>';
$videos[$key]['next_video'] = array();
$videos[$key]['description'] = preg_replace('/[\x00-\x1F\x7F]/u', '', $videos[$key]['description']);

View file

@ -1,5 +1,5 @@
<li>
<a href="<?php echo $global['webSiteRootURL']; ?>plugin/Live" data-toggle="tooltip" title="<?php echo __("Broadcast a Live Stream"); ?>" data-placement="left" >
<span class="fa fa-circle"></span> <?php echo $buttonTitle; ?>
<i class="fa fa-circle faa-flash animated" style="color: red;" ></i> <?php echo $buttonTitle; ?>
</a>
</li>

View file

@ -8,10 +8,10 @@ $users_id = User::getId();
<?php
$streamName = $trasnmition['key'];
include $global['systemRootPath'] . 'plugin/Live/view/onlineLabel.php';
include $global['systemRootPath'] . 'plugin/Live/webRTC.php';
if (Live::canStreamWithMeet()) {
include $global['systemRootPath'] . 'plugin/Live/meet.php';
}
include $global['systemRootPath'] . 'plugin/Live/webRTC.php';
?>
</div>
<div class="panel-body">

View file

@ -46,7 +46,7 @@ include $global['systemRootPath'] . 'plugin/Meet/api.js.php';
<i class="fas fa-circle-notch fa-spin"></i> <?php echo __("Please Wait"); ?>
</button>
<button class="btn btn-default btn-xs hideOnMeetReady showOnMeetNotReady hideOnProcessingMeetReady" id="startMeet" onclick="startMeetNow();" data-toggle="tooltip" data-placement="bottom" title="<?php echo __("Use your webcam"); ?>">
<i class="fas fa-comments"></i> <span class="hidden-sm hidden-xs"><?php echo __("Meet"); ?></span>
<i class="fas fa-comments"></i> <?php echo __("Meet"); ?>
</button>
<button class="btn btn-warning btn-xs hideOnMeetReady showOnProcessingMeetReady" id="processMeet" style="display: none;" >
<i class="fas fa-cog fa-spin"></i> <?php echo __("Please Wait"); ?>
@ -61,13 +61,12 @@ include $global['systemRootPath'] . 'plugin/Meet/api.js.php';
?>
<a href="<?php echo $global['webSiteRootURL']; ?>plugin/Meet/checkServers.php" class="btn btn-xs btn-default"
data-toggle="tooltip" data-placement="bottom" title="You need to use one of our servers, your selfhosted jitsi will not work, you can disable this feature on Plugins->Live->disableMeetCamera">
<i class="fas fa-exclamation-triangle"></i> Use our servers
<i class="fas fa-exclamation-triangle"></i> <span class="hidden-sm hidden-xs">Use our servers</span>
</a>
<?php
}
?>
</span>
<div class="clearfix"></div>
<script>
var meetPassword;
var meetLink;

View file

@ -15,6 +15,7 @@
}
}
}
* For more information please check this https://github.com/WWBN/AVideo/wiki/Live-Plugin#control
*/
$streamerURL = "http://192.168.1.4/YouPHPTube/"; // change it to your streamer URL

View file

@ -27,16 +27,16 @@ $obj = AVideoPlugin::getDataObject("Live");
if (empty($obj->doNotShowGoLiveButton) && User::canStream()) {
?>
<li>
<a href="<?php echo $global['webSiteRootURL']; ?>plugin/Live" class="btn btn-danger navbar-btn" data-toggle="tooltip" title="<?php echo __("Broadcast a Live Stream"); ?>" data-placement="bottom" >
<span class="fa fa-circle"></span> <span class="hidden-md hidden-sm hidden-mdx"><?php echo __($buttonTitle); ?></span>
<a href="<?php echo $global['webSiteRootURL']; ?>plugin/Live" class="faa-parent animated-hover btn btn-danger navbar-btn" data-toggle="tooltip" title="<?php echo __("Broadcast a Live Stream"); ?>" data-placement="bottom" >
<span class="fa fa-circle faa-flash"></span> <span class="hidden-md hidden-sm hidden-mdx"><?php echo __($buttonTitle); ?></span>
</a>
</li>
<?php
}
?>
<li class="dropdown">
<a href="#" class=" btn btn-default navbar-btn" data-toggle="dropdown">
<span class="fa fa-bell"></span>
<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="badge onlineApplications" style=" background: rgba(255,0,0,1); color: #FFF;">0</span>
<b class="caret"></b>
</a>

View file

@ -5,18 +5,25 @@ $iframeURL = addQueryStringParameter($iframeURL, 'webSiteRootURL', $global['webS
$iframeURL = addQueryStringParameter($iframeURL, 'userHash', Live::getUserHash(User::getId()));
?>
<span class=" pull-right" style="margin-left: 5px;">
<button class="btn btn-danger btn-xs showOnWebRTC" id="webRTCDisconnect" style="display: none;" onclick="webRTCDisconnect();" data-toggle="tooltip" data-placement="bottom" title="<?php echo __("Stop"); ?>">
<i class="fas fa-stop"></i> <span class="hidden-sm hidden-xs"><?php echo __("Stop"); ?></span>
<button class="btn btn-danger btn-xs hideOnNonWebRTC" id="webRTCDisconnect" style="display: none;" onclick="webRTCDisconnect();" data-toggle="tooltip" data-placement="bottom" title="<?php echo __("Stop"); ?>">
<i class="fas fa-stop"></i> <?php echo __("Stop"); ?>
</button>
<button class="btn btn-success btn-xs showOnWebRTC" id="webRTCConnect" style="display: none;" onclick="webRTCConnect();" data-toggle="tooltip" data-placement="bottom" title="<?php echo __("Start Live Now"); ?>">
<i class="fas fa-circle"></i> <span class="hidden-sm hidden-xs"><?php echo __("Go Live"); ?></span>
<button class="btn btn-success btn-xs hideOnNonWebRTC" id="webRTCConnect" style="display: none;" onclick="webRTCConnect();" data-toggle="tooltip" data-placement="bottom" title="<?php echo __("Start Live Now"); ?>">
<i class="fas fa-circle"></i> <?php echo __("Go Live"); ?>
</button>
<button class="btn btn-primary btn-xs showOnWebRTC" style="display: none;" 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>
<button class="btn btn-default btn-xs" id="startWebcam" onclick="toogleWebcam();" data-toggle="tooltip" data-placement="bottom" title="<?php echo __("Use your webcam"); ?>">
<i class="fas fa-camera"></i> <span class="hidden-sm hidden-xs"><?php echo __("Webcam"); ?></span>
<div class="dropdown" style="display: inline;">
<button class="btn btn-default btn-xs dropdown-toggle" type="button" data-toggle="dropdown">
<i class="fas fa-camera"></i> <?php echo __("Webcam"); ?>
<span class="caret"></span>
</button>
<ul class="dropdown-menu">
<li><a href="<?php echo "{$global['webSiteRootURL']}plugin/Live/webcamFullscreen.php"; ?>"><i class="fas fa-expand"></i> Fullscreen</a></li>
<li><a href="#" onclick="toogleWebcam();" ><i class="fas fa-cog"></i> Advanced</a></li>
</ul>
</div>
</span>
<script src="<?php echo getCDN(); ?>plugin/Live/webRTC.js" type="text/javascript"></script>
<script>
@ -24,6 +31,7 @@ $iframeURL = addQueryStringParameter($iframeURL, 'userHash', Live::getUserHash(U
function toogleWebcam() {
updateControlStatusLastState = null;
isVisible = $('#divWebcamIFrame').is(":visible");
$('#webRTCConnect, #webRTCDisconnect').hide();
if (isVisible) {
hideWebcam();
} else {
@ -47,7 +55,7 @@ $iframeURL = addQueryStringParameter($iframeURL, 'userHash', Live::getUserHash(U
$('#mainVideo').show();
$('#divMeetToIFrame').hide();
$('#divWebcamIFrame').hide();
$('.showOnWebRTC').hide();
$('.showOnWebRTC, .hideOnNonWebRTC').hide();
$('#divWebcamIFrame iframe').attr('src', 'about:blank');
}
function updateControlStatus() {
@ -73,6 +81,6 @@ $iframeURL = addQueryStringParameter($iframeURL, 'userHash', Live::getUserHash(U
$(document).ready(function () {
setInterval(function () {
updateControlStatus();
}, 1000);
}, 500);
});
</script>

View file

@ -0,0 +1,95 @@
<?php
$isWebRTC = 1;
require_once '../../videos/configuration.php';
if(!User::canStream()){
forbiddenPage('You cannot stream');
}
$lObj = AVideoPlugin::getDataObject('Live');
$iframeURL = $lObj->webRTC_player;
$iframeURL = addQueryStringParameter($iframeURL, 'webSiteRootURL', $global['webSiteRootURL']);
$iframeURL = addQueryStringParameter($iframeURL, 'userHash', Live::getUserHash(User::getId()));
$chatURL = '';
$chat = AVideoPlugin::loadPluginIfEnabled('Chat2');
if(!empty($chat)){
Chat2::getChatRoomLink(User::getId(), 1, 1, 1, true);
}
?>
<!DOCTYPE html>
<html lang="<?php echo $_SESSION['language']; ?>">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" href="<?php echo getCDN(); ?>view/img/favicon.ico">
<title><?php echo $config->getWebSiteTitle(); ?></title>
<link href="<?php echo getCDN(); ?>view/bootstrap/css/bootstrap.css" rel="stylesheet" type="text/css"/>
<link href="<?php echo getCDN(); ?>view/css/fontawesome-free-5.5.0-web/css/all.min.css" rel="stylesheet" type="text/css"/>
<link href="<?php echo getCDN(); ?>view/css/player.css" rel="stylesheet" type="text/css"/>
<script src="<?php echo getCDN(); ?>view/js/jquery-3.5.1.min.js" type="text/javascript"></script>
<script src="<?php echo getCDN(); ?>view/bootstrap/js/bootstrap.min.js" type="text/javascript"></script>
<style>
body {
padding: 0 !important;
margin: 0 !important;
width: 100vw;
height: 100vh;
overflow:hidden;
background-color: #000;
}
iframe{
width: 100vw;
height: 100vh;
}
#chat2Iframe{
position: absolute;
top: 0;
left: 0;
width: 100vw;
height: 100vh;
}
</style>
<script>
var webSiteRootURL = '<?php echo $global['webSiteRootURL']; ?>';
var player;
</script>
<?php
echo AVideoPlugin::getHeadCode();
?>
</head>
<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" 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"
style="width: 100%; height: 100%;" ></iframe>
<div style="z-index: 999; position: absolute; top:5px; left: 5px; opacity: 0.8; filter: alpha(opacity=80);" class="liveEmbed">
<?php
$streamName = $uuid;
include $global['systemRootPath'] . 'plugin/Live/view/onlineLabel.php';
echo getLiveUsersLabel();
?>
</div>
<script src="<?php echo getCDN(); ?>view/js/script.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/seetalert/sweetalert.min.js" type="text/javascript"></script>
<?php
require_once $global['systemRootPath'] . 'plugin/AVideoPlugin.php';
?>
<!-- getFooterCode start -->
<?php
echo AVideoPlugin::getFooterCode();
?>
<!-- getFooterCode end -->
</body>
</html>
<?php
include $global['systemRootPath'] . 'objects/include_end.php';
?>

View file

@ -36,6 +36,8 @@ class LiveLinks extends PluginAbstract {
$obj->disableLiveThumbs = false;
$obj->doNotShowLiveLinksLabel = false;
$obj->disableProxy = false;
$obj->hideTopButton = true;
self::addDataObjectHelper('hideTopButton', 'Hide Top Button', 'This will hide the button on the top menu bar');
return $obj;
}
@ -61,6 +63,9 @@ class LiveLinks extends PluginAbstract {
public function getHTMLMenuRight() {
global $global;
$obj = $this->getDataObject();
if($obj->hideTopButton){
return '';
}
if (!$this->canAddLinks()) {
return '';
}
@ -307,7 +312,7 @@ class LiveLinks extends PluginAbstract {
}
$obj = $this->getDataObject();
$buttonTitle = $obj->buttonTitle;
//include $global['systemRootPath'] . 'plugin/LiveLinks/getUploadMenuButton.php';
include $global['systemRootPath'] . 'plugin/LiveLinks/getUploadMenuButton.php';
}
public static function getAllVideos($status = "", $showOnlyLoggedUserVideos = false, $activeUsersOnly = true) {

View file

@ -68,6 +68,8 @@ Passcode: {password}
$obj->CUSTOM_JITSI_DOMAIN = "jitsi.eu1.ypt.me";
$obj->JWT_APP_ID = "my_jitsi_app_id";
$obj->JWT_APP_SECRET = "my_jitsi_app_secret";
$obj->hideTopButton = true;
self::addDataObjectHelper('hideTopButton', 'Hide Top Button', 'This will hide the button on the top menu bar');
return $obj;
}
@ -319,6 +321,10 @@ Passcode: {password}
public function getHTMLMenuRight() {
global $global;
$obj = $this->getDataObject();
if($obj->hideTopButton){
return '';
}
if (!User::isLogged()) {
return "";
}
@ -573,4 +579,14 @@ Passcode: {password}
return true;
}
public function getUploadMenuButton() {
global $global;
if (!User::isLogged()) {
return '';
}
$obj = $this->getDataObject();
$buttonTitle = $obj->buttonTitle;
include $global['systemRootPath'] . 'plugin/Meet/getUploadMenuButton.php';
}
}

View file

@ -0,0 +1,5 @@
<li>
<a href="<?php echo $global['webSiteRootURL']; ?>plugin/Meet" data-toggle="tooltip" title="<?php echo __('Meet'); ?>" data-placement="left" >
<i class="fas fa-comments"></i> <span class="hidden-md hidden-sm hidden-mdx"><?php echo __('Meet'); ?></span>
</a>
</li>

View file

@ -24,7 +24,7 @@
th a, .select2-container--default span, .swal-text,
.nav-tabs>li.active>a, .nav-tabs>li.active>a:focus, .nav-tabs>li.active>a:hover,
.tabbable-line > .nav-tabs > li.active > a > i,
.swal-title {
.swal-title, h3.popover-title, div.popover-content {
color: #FFF !important;
}
th:hover, .select2-dropdown{

View file

@ -275,6 +275,11 @@ footer ul.list-inline li {
border-top: 2px solid #F2F2F2;
clear: both;
}
.watch8-action-buttons .btn{
margin: 5px 2px;
}
.bgWhite {
margin: 0 0 10px;
border: 0;
@ -470,27 +475,35 @@ img.rotate-90 {
-o-transform: rotate(270deg);
/* Opera */
}
.subsB {
background-color: #e62117;
color: #FFF;
-webkit-transition: all 1s ease-out;
-moz-transition: all 1s ease-out;
-o-transition: all 1s ease-out;
transition: all 1s ease-out;
.notificationButton button{
display: none;
border-radius: 4px 0 0 4px !important;
}
.subsB span:before {
content: "\f16a";
.notificationButton button.subscribe{
border-radius: 4px !important;
}
.subscribed {
background-color: #DDD;
color: #777;
.notificationButton button.notifyBtn{
border-radius: 0 4px 4px 0 !important;
}
.subscribed span:before {
content: "\f00c";
.notificationButton.subscribed .doNotify,
.notificationButton .subscribe{
display: inline-block;
}
.subscribed:hover span:before {
content: "\f057";
.notificationButton.subscribed .subscribed,
.notificationButton.subscribed.notify .doNotNotify{
display: inline-block;
}
.notificationButton.subscribed.notify .doNotify,
.notificationButton.subscribed .subscribe{
display: none;
}
.profileBg {
padding: 20px;
height: 27vw;
@ -1134,3 +1147,29 @@ li.dropdown-submenu > ul > li > a{
.scrtabs-tab-scroll-arrow{
border-top: 1px solid #ddd;
}
.videoCreator{
display: -webkit-inline-box;
}
.videoCreator .zoom{
width: 40px;
height: 40px;
}
.videoCreatorSmall .zoom{
width: 20px;
height: 20px;
}
.videoCreator>img,
.videoCreator>a,
.videoCreator>div{
margin: 2px 10px 2px 2px;
}
.videoCreator>img, .videoCreatorSmall img{
float: left;
}
.videoCreatorSmall img{
margin-right: 5px;
}
a:hover{
text-decoration: none;
}

View file

@ -342,6 +342,7 @@ function isEmailValid(email) {
}
function subscribe(email, user_id) {
modal.showPleaseWait();
$.ajax({
url: webSiteRootURL + 'objects/subscribe.json.php',
method: 'POST',
@ -350,22 +351,27 @@ function subscribe(email, user_id) {
'user_id': user_id
},
success: function (response) {
var totalElement = $('.notificationButton' + user_id+' .badge');
if (response.subscribe == "i") {
$('.subs' + user_id).removeClass("subscribed");
$('.subs' + user_id + ' b.text').text("Subscribe");
$('b.textTotal' + user_id).text(parseInt($('b.textTotal' + user_id).first().text()) - 1);
$('.notificationButton' + user_id).removeClass("subscribed");
totalElement.text(parseInt(totalElement.first().text()) - 1);
} else {
$('.subs' + user_id).addClass("subscribed");
$('.subs' + user_id + ' b.text').text("Subscribed");
$('b.textTotal' + user_id).text(parseInt($('b.textTotal' + user_id).first().text()) + 1);
$('.notificationButton' + user_id).addClass("subscribed");
totalElement.text(parseInt(totalElement.first().text()) + 1);
}
$('#popover-content #subscribeEmail').val(email);
$('.subscribeButton' + user_id).popover('hide');
modal.hidePleaseWait();
}
});
}
function toogleNotify(user_id) {
email = $('#subscribeEmail'+user_id).val();
subscribeNotify(email, user_id);
}
function subscribeNotify(email, user_id) {
modal.showPleaseWait();
$.ajax({
url: webSiteRootURL + 'objects/subscribeNotify.json.php',
method: 'POST',
@ -375,12 +381,11 @@ function subscribeNotify(email, user_id) {
},
success: function (response) {
if (response.notify) {
$('.notNotify' + user_id).addClass("hidden");
$('.notify' + user_id).removeClass("hidden");
$('.notificationButton' + user_id).addClass("notify");
} else {
$('.notNotify' + user_id).removeClass("hidden");
$('.notify' + user_id).addClass("hidden");
$('.notificationButton' + user_id).removeClass("notify");
}
modal.hidePleaseWait();
}
});
}
@ -903,8 +908,8 @@ function isALiveContent() {
}
function isWebRTC() {
if (typeof isWebRTC !== 'undefined') {
return isWebRTC;
if (typeof _isWebRTC !== 'undefined') {
return _isWebRTC;
}
return false;
}
@ -912,6 +917,7 @@ function isWebRTC() {
function isAutoplayEnabled() {
//console.log("Cookies.get('autoplay')", Cookies.get('autoplay'));
if (isWebRTC()) {
console.log("isAutoplayEnabled said No because is WebRTC ");
return false;
} else if (isALiveContent()) {
//console.log("isAutoplayEnabled always autoplay live contents");

View file

@ -183,11 +183,8 @@ if (!empty($evideo)) {
$modeYouTubeTimeLog['Code part 1.6'] = microtime(true) - $modeYouTubeTime;
$modeYouTubeTime = microtime(true);
if (!empty($autoPlayVideo)) {
$name2 = User::getNameIdentificationById($autoPlayVideo['users_id']) . ' ' . User::getEmailVerifiedIcon($autoPlayVideo['users_id']);
$autoPlayVideo['creator'] = '<div class="pull-left"><img src="' . User::getPhoto($autoPlayVideo['users_id']) . '" alt="User Photo" class="img img-responsive img-circle zoom" style="max-width: 40px;"/></div><div class="commentDetails" style="margin-left:45px;"><div class="commenterName"><strong>' . $name2 . '</strong> <small>' . humanTiming(strtotime($autoPlayVideo['videoCreation'])) . '</small></div></div>';
$autoPlayVideo['tags'] = Video::getTags($autoPlayVideo['id']);
//$autoPlayVideo['url'] = $global['webSiteRootURL'] . $catLink . "video/" . $autoPlayVideo['clean_title'];
$autoPlayVideo['creator'] = Video::getCreatorHTML($autoPlayVideo['users_id']);
$autoPlayVideo['tags'] = Video::getTags($autoPlayVideo['id'], '<br /><small>' . humanTiming(strtotime($autoPlayVideo['videoCreation'])) . '</small>');
$autoPlayVideo['url'] = Video::getLink($autoPlayVideo['id'], $autoPlayVideo['clean_title'], false, $get);
}
}
@ -197,7 +194,8 @@ if (!empty($evideo)) {
$name = User::getNameIdentificationById($video['users_id']);
$name = "<a href='" . User::getChannelLink($video['users_id']) . "' class='btn btn-xs btn-default'>{$name} " . User::getEmailVerifiedIcon($video['users_id']) . "</a>";
$subscribe = Subscribe::getButton($video['users_id']);
$video['creator'] = '<div class="pull-left"><img src="' . User::getPhoto($video['users_id']) . '" alt="User Photo" class="img img-responsive img-circle zoom" style="max-width: 40px;"/></div><div class="commentDetails" style="margin-left:45px;"><div class="commenterName text-muted"><strong>' . $name . '</strong><br />' . $subscribe . '<br /><small>' . humanTiming(strtotime($video['videoCreation'])) . '</small></div></div>';
$video['creator'] = Video::getCreatorHTML($video['users_id'], '<div class="clearfix"></div><small>' . humanTiming(strtotime($video['videoCreation'])) . '</small>');
$obj = new Video("", "", $video['id']);
// Don't need because have an embedded video on this page

View file

@ -5,10 +5,7 @@ if (empty($global['systemRootPath'])) {
require_once $global['systemRootPath'] . 'objects/subscribe.php';
if (empty($video) && !empty($_GET['videos_id'])) {
$video = Video::getVideo(intval($_GET['videos_id']), "viewable", true, false, true, true);
$name = User::getNameIdentificationById($video['users_id']);
$name = "<a href='" . User::getChannelLink($video['users_id']) . "' class='btn btn-xs btn-default'>{$name} " . User::getEmailVerifiedIcon($video['users_id']) . "</a>";
$subscribe = Subscribe::getButton($video['users_id']);
$video['creator'] = '<div class="pull-left"><img src="' . User::getPhoto($video['users_id']) . '" alt="User Photo" class="img img-responsive img-circle zoom" style="max-width: 40px;"/></div><div class="commentDetails" style="margin-left:45px;"><div class="commenterName text-muted"><strong>' . $name . '</strong><br />' . $subscribe . '<br /><small>' . humanTiming(strtotime($video['videoCreation'])) . '</small></div></div>';
$video['creator'] = Video::getCreatorHTML($video['users_id'], '<div class="clearfix"></div><small>' . humanTiming(strtotime($video['videoCreation'])) . '</small>');
$source = Video::getSourceFile($video['filename']);
if (($video['type'] !== "audio") && ($video['type'] !== "linkAudio") && !empty($source['url'])) {
$img = $source['url'];
@ -184,11 +181,11 @@ if (User::hasBlockedUser($video['users_id'])) {
<?php
if (!empty($video['id']) && empty($advancedCustom->removeThumbsUpAndDown)) {
?>
<a href="#" class="btn btn-default no-outline pull-right <?php echo (@$video['myVote'] == - 1) ? "myVote" : "" ?>" id="dislikeBtn" <?php if (!User::isLogged()) { ?> data-toggle="tooltip" title="<?php echo __("Don´t like this video? Sign in to make your opinion count."); ?>" <?php } ?>>
<span class="fa fa-thumbs-down"></span> <small><?php echo $video['dislikes']; ?></small>
<a href="#" class="faa-parent animated-hover btn btn-default no-outline pull-right <?php echo (@$video['myVote'] == - 1) ? "myVote" : "" ?>" id="dislikeBtn" <?php if (!User::isLogged()) { ?> data-toggle="tooltip" title="<?php echo __("Don´t like this video? Sign in to make your opinion count."); ?>" <?php } ?>>
<span class="fa fa-thumbs-down faa-bounce faa-reverse "></span> <small><?php echo $video['dislikes']; ?></small>
</a>
<a href="#" class="btn btn-default no-outline pull-right <?php echo (@$video['myVote'] == 1) ? "myVote" : "" ?>" id="likeBtn" <?php if (!User::isLogged()) { ?> data-toggle="tooltip" title="<?php echo __("Like this video? Sign in to make your opinion count."); ?>" <?php } ?>>
<span class="fa fa-thumbs-up"></span>
<a href="#" class="faa-parent animated-hover btn btn-default no-outline pull-right <?php echo (@$video['myVote'] == 1) ? "myVote" : "" ?>" id="likeBtn" <?php if (!User::isLogged()) { ?> data-toggle="tooltip" title="<?php echo __("Like this video? Sign in to make your opinion count."); ?>" <?php } ?>>
<span class="fa fa-thumbs-up faa-bounce"></span>
<small><?php echo $video['likes']; ?></small>
</a>
<script>

View file

@ -46,61 +46,12 @@ if (!empty($playlist_id)) {
</span>
</div>
</div>
<div class="col-lg-12 col-sm-12 col-xs-12 bottom-border autoPlayVideo" id="autoPlayVideoDiv" style="margin: 10px 0; padding: 15px 5px; <?php echo PlayerSkins::isAutoplayEnabled() ? "" : "display: none;"; ?>" >
<a href="<?php echo Video::getLink($autoPlayVideo['id'], $autoPlayVideo['clean_title'], "", $get); ?>" title="<?php echo str_replace('"', '', $autoPlayVideo['title']); ?>" class="videoLink h6">
<div class="col-lg-5 col-sm-5 col-xs-5 nopadding thumbsImage">
<?php
$images = Video::getImageFromFilename($autoPlayVideo['filename'], true);
$img = $img_portrait = $images->poster;
$imgGif = $images->thumbsGif;
?>
<img src="<?php echo $img; ?>" alt="<?php echo str_replace('"', '', $autoPlayVideo['title']); ?>" class="img img-responsive " height="130" />
<?php if (!empty($imgGif)) { ?>
<img src="<?php echo $imgGif; ?>" style="position: absolute; top: 0; display: none;" alt="<?php echo str_replace('"', '', $autoPlayVideo['title']); ?>" id="thumbsGIF<?php echo $autoPlayVideo['id']; ?>" class="thumbsGIF img-responsive <?php echo $img_portrait; ?> rotate<?php echo $autoPlayVideo['rotation']; ?>" height="130" />
<?php } ?>
<time class="duration" datetime="<?php echo Video::getItemPropDuration($autoPlayVideo['duration']); ?>"><?php echo Video::getCleanDuration($autoPlayVideo['duration']); ?></time>
</div>
<div class="col-lg-7 col-sm-7 col-xs-7 videosDetails">
<div class="text-uppercase row"><strong class="title"><?php echo $autoPlayVideo['title']; ?></strong></div>
<div class="details row text-muted" ">
<div>
<strong><?php echo __("Category"); ?>: </strong>
<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
$style = 'margin: 10px 0; padding: 15px 5px;';
if(!PlayerSkins::isAutoplayEnabled()){
$style .= 'display: none;';
}
?>
<div><?php echo $autoPlayVideo['creator']; ?></div>
</div>
<div class="row">
<?php
if (!empty($autoPlayVideo['tags'])) {
foreach ($autoPlayVideo['tags'] as $autoPlayVideo2) {
if (is_array($autoPlayVideo2)) {
$autoPlayVideo2 = (object) $autoPlayVideo2;
}
if ($autoPlayVideo2->label === __("Group")) {
?>
<span class="label label-<?php echo $autoPlayVideo2->type; ?>"><?php echo $autoPlayVideo2->text; ?></span>
<?php
}
}
}
?>
</div>
</div>
</a>
</div>
<?php
echo Video::getVideosListItem($autoPlayVideo['id'], 'autoPlayVideoDiv', $style);
}

26
view/subscribeBtn.html Normal file
View file

@ -0,0 +1,26 @@
<div class="btn-group notificationButton notificationButton_user_id_ {subscribed} {notify} ">
<button class='btn btn-xs btn-danger subs_user_id_ subscribe'
onclick="subscribe('{email}', '_user_id_');">
<i class='fas fa-play-circle'></i>
<b class='text'>{subscribeText}</b>
<span class="badge">{total}</span>
</button>
<button class='btn btn-xs btn-success subs_user_id_ subscribed'
onclick="subscribe('{email}', '_user_id_');">
<i class='fas fa-play-circle'></i>
<b class='text'>{subscribedText}</b>
<span class="badge">{total}</span>
</button>
<button onclick="toogleNotify(_user_id_);"
class="faa-parent animated-hover btn btn-success btn-xs notifyBtn doNotify"
data-toggle="tooltip"
title="{tooltipStop}">
<i class="fas fa-bell faa-ring" ></i>
</button>
<button onclick="toogleNotify(_user_id_);"
class="faa-parent animated-hover btn btn-default btn-xs notifyBtn doNotNotify"
data-toggle="tooltip"
title="{tooltip}">
<i class="fas fa-bell-slash faa-ring"></i>
</button>
</div>

View file

@ -0,0 +1,10 @@
<div class="btn-group" >
<button class='btn btn-xs btn-danger subs_user_id_ subscribe'
title="{titleOffline}"
data-content="{tooltipOffline}"
tabindex="0" role="button" data-html="true" data-toggle="popover" data-placement="bottom" >
<i class='fas fa-play-circle'></i>
<b class='text'>{subscribeText}</b>
<span class="badge">{total}</span>
</button>
</div>

View file

@ -62,12 +62,12 @@ if (User::canSeeCommentTextarea()) {
<?php
}
?>
<button class="btn btn-default no-outline btn-xs replyLikeBtn">
<span class="fa fa-thumbs-up"></span>
<button class="faa-parent animated-hover btn btn-default no-outline btn-xs replyLikeBtn">
<span class="fa fa-thumbs-up faa-bounce"></span>
<small>0</small>
</button>
<button class="btn btn-default no-outline btn-xs replyDislikeBtn">
<span class="fa fa-thumbs-down"></span>
<button class="faa-parent animated-hover btn btn-default no-outline btn-xs replyDislikeBtn">
<span class="fa fa-thumbs-down faa-bounce faa-reverse"></span>
<small>0</small>
</button>
<button class="btn btn-default no-outline allReplies btn-xs viewAllReplies">

14
view/videoCreator.html Normal file
View file

@ -0,0 +1,14 @@
<div class="videoCreator clearfix">
<a href='{channelLink}' class="pull-left">
<img src="{photo}" alt="{name} Photo"
class="img img-responsive img-circle zoom" />
</a>
<div class="pull-left">
<a href='{channelLink}' class='btn btn-xs btn-default'>
{name}
{icon}
</a>
{subscriptionButton}
</div>
</div>
{html}

View file

@ -0,0 +1,9 @@
<div class="videoCreatorSmall">
<a href="{channelLink}">
<img src="{photo}" alt="{name} Photo"
class="img img-responsive img-circle zoom"/>
{name}
{icon}
</a>
{html}
</div>

View file

@ -124,156 +124,7 @@ foreach ($videos as $key => $value) {
if (!empty($video['id']) && $video['id'] == $value['id']) {
continue; // skip video
}
$name = User::getNameIdentificationById($value['users_id']) . ' ' . User::getEmailVerifiedIcon($value['users_id']);
$value['creator'] = '<div class="pull-left">'
. '<a href="' . User::getChannelLink($value['users_id']) . '"><img src="' . User::getPhoto($value['users_id']) . '" alt="User Photo" class="img img-responsive img-circle zoom" style="max-width: 20px;"/></div><div class="commentDetails" style="margin-left:25px;"><div class="commenterName text-muted"><strong>' . $name . '</strong> <small>'
. '</a>' . humanTimingAgo(strtotime($value['videoCreation'])) . '</small></div></div>';
?>
<div class="col-lg-12 col-sm-12 col-xs-12 bottom-border videoListItem" id="divVideo-<?php echo $value['id']; ?>" >
<?php
$link = Video::getLink($value['id'], $value['clean_title'], "", $get);
$connection = "?";
if (strpos($link, '?') !== false) {
$connection = "&";
}
if (!empty($_GET['page']) && $_GET['page'] > 1) {
$link .= "{$connection}page={$_GET['page']}";
}
?>
<div class="col-lg-5 col-sm-5 col-xs-5 nopadding thumbsImage videoLink h6" >
<?php
$images = Video::getImageFromFilename($value['filename'], $value['type']);
if (!is_object($images)) {
$images = new stdClass();
$images->thumbsGif = "";
$images->poster = "".getCDN()."view/img/notfound.jpg";
$images->thumbsJpg = "".getCDN()."view/img/notfoundThumbs.jpg";
$images->thumbsJpgSmall = "".getCDN()."view/img/notfoundThumbsSmall.jpg";
}
$imgGif = $images->thumbsGif;
$img = $images->thumbsJpg;
if (!empty($images->posterPortrait) && basename($images->posterPortrait) !== 'notfound_portrait.jpg' && basename($images->posterPortrait) !== 'pdf_portrait.png' && basename($images->posterPortrait) !== 'article_portrait.png') {
$imgGif = $images->gifPortrait;
$img = $images->posterPortrait;
}
if (($value['type'] !== "audio") && ($value['type'] !== "linkAudio")) {
$img_portrait = ($value['rotation'] === "90" || $value['rotation'] === "270") ? "img-portrait" : "";
} else {
$img_portrait = "";
}
?>
<div style="position: relative;" class="galleryVideo">
<a href="<?php echo $link; ?>" title="<?php echo $value['title']; ?>">
<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
if (!empty($imgGif)) {
?>
<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 <?php echo $img_portrait; ?> rotate<?php echo $value['rotation']; ?>" height="130" />
<?php } ?>
</a>
<span content="<?php echo $img; ?>" ></span>
<span content="<?php echo $value['created']; ?>"></span>
<?php
if (isToShowDuration($value['type'])) {
?>
<time class="duration" datetime="<?php echo Video::getItemPropDuration($value['duration']); ?>"><?php echo Video::getCleanDuration($value['duration']); ?></time>
<?php
}
if (User::isLogged() && !empty($program)) {
?>
<div class="galleryVideoButtons">
<?php
//var_dump($value['isWatchLater'], $value['isFavorite']);
if ($value['isWatchLater']) {
$watchLaterBtnAddedStyle = "";
$watchLaterBtnStyle = "display: none;";
} else {
$watchLaterBtnAddedStyle = "display: none;";
$watchLaterBtnStyle = "";
}
if ($value['isFavorite']) {
$favoriteBtnAddedStyle = "";
$favoriteBtnStyle = "display: none;";
} else {
$favoriteBtnAddedStyle = "display: none;";
$favoriteBtnStyle = "";
}
?>
<button onclick="addVideoToPlayList(<?php echo $value['id']; ?>, false, <?php echo $value['watchLaterId']; ?>);return false;" class="btn btn-dark btn-xs watchLaterBtnAdded watchLaterBtnAdded<?php echo $value['id']; ?>" title="<?php echo __("Added On Watch Later"); ?>" style="color: #4285f4;<?php echo $watchLaterBtnAddedStyle; ?>" ><i class="fas fa-check"></i></button>
<button onclick="addVideoToPlayList(<?php echo $value['id']; ?>, true, <?php echo $value['watchLaterId']; ?>);return false;" class="btn btn-dark btn-xs watchLaterBtn watchLaterBtn<?php echo $value['id']; ?>" title="<?php echo __("Watch Later"); ?>" style="<?php echo $watchLaterBtnStyle; ?>" ><i class="fas fa-clock"></i></button>
<br>
<button onclick="addVideoToPlayList(<?php echo $value['id']; ?>, false, <?php echo $value['favoriteId']; ?>);return false;" class="btn btn-dark btn-xs favoriteBtnAdded favoriteBtnAdded<?php echo $value['id']; ?>" title="<?php echo __("Added On Favorite"); ?>" style="color: #4285f4; <?php echo $favoriteBtnAddedStyle; ?>"><i class="fas fa-check"></i></button>
<button onclick="addVideoToPlayList(<?php echo $value['id']; ?>, true, <?php echo $value['favoriteId']; ?>);return false;" class="btn btn-dark btn-xs favoriteBtn favoriteBtn<?php echo $value['id']; ?>" title="<?php echo __("Favorite"); ?>" style="<?php echo $favoriteBtnStyle; ?>" ><i class="fas fa-heart" ></i></button>
</div>
<?php
}
?>
</div>
<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>
</div>
</div>
<div class="col-lg-7 col-sm-7 col-xs-7 videosDetails" style="font-size: 0.75em;">
<a href="<?php echo $link; ?>" title="<?php echo $value['title']; ?>">
<div class="text-uppercase row"><strong class="title"><?php echo $value['title']; ?></strong></div>
</a>
<div class="details row">
<div class="pull-left" style="display: inline-table;">
<a class="label label-default" href="<?php echo $global['webSiteRootURL']; ?>cat/<?php echo $value['clean_category']; ?>">
<span class="<?php echo $value['iconClass']; ?>"></span>
<span class="hidden-sm hidden-xs"><?php echo $value['category']; ?></span>
</a>
<?php
if (!empty($objGallery->showTags)) {
foreach ($value['tags'] as $value2) {
if (!empty($value2->label) && $value2->label === __("Paid Content")) {
?><span class="label label-<?php echo $value2->type; ?>"><?php echo $value2->text; ?></span><?php
}
if (!empty($value2->label) && $value2->label === __("Group")) {
?><span class="label label-<?php echo $value2->type; ?>"><?php echo $value2->text; ?></span><?php
}
if (!empty($value2->label) && $value2->label === __("Plugin")) {
?>
<span class="label label-<?php echo $value2->type; ?>"><?php echo $value2->text; ?></span>
<?php
}
}
}
?>
</div>
<?php
if (empty($advancedCustom->doNotDisplayViews)) {
if (AVideoPlugin::isEnabledByName('LiveUsers')) {
echo '<div class="text-muted pull-right" style="display:flex;font-size: 1.2em;">'.getLiveUsersLabelVideo($value['id'], $value['views_count']).'</div>';
} else {
?>
<div class="text-muted pull-right">
<i class="fas fa-eye"></i> <?php echo number_format($value['views_count'], 0); ?></strong>
</div>
<?php
}
}
?>
<div class="clearfix"></div>
<div class="nopadding" style="margin-top: 5px !important;"><?php echo $value['creator']; ?></div>
</div>
</div>
<?php
//getLdJson($value['id']);
//getItemprop($value['id']);
?>
</div>
<?php
echo Video::getVideosListItem($value['id']);
}
?>
<ul class="pages">

33
view/videosListItem.html Normal file
View file

@ -0,0 +1,33 @@
<div class="col-lg-12 col-sm-12 col-xs-12 bottom-border videoListItem" id="{divID}" style='{style}' >
<div class="col-lg-5 col-sm-5 col-xs-5 nopadding thumbsImage videoLink h6" >
<div class="galleryVideo">
<a href="{link}" title="{title}">
<img src="{imgJPGLow}" data-src="{imgJPGHight}" alt="{title}" class="thumbsJPG img-responsive text-center rotate" height="130" />
{imgGifHTML}
</a>
{timeHTML}
{loggedUserHTML}
</div>
<div class="progress" style="height: 3px; margin-bottom: 2px;">
<div class="progress-bar progress-bar-danger" role="progressbar"
style="width: {progress}%;" aria-valuenow="{progress}" aria-valuemin="0" aria-valuemax="100"></div>
</div>
</div>
<div class="col-lg-7 col-sm-7 col-xs-7 videosDetails" style="font-size: 0.75em;">
<a href="{link}" title="{title}" >
<div class="text-uppercase row"><strong class="title">{title}</strong></div>
</a>
<div class="details row">
<div class="pull-left">
<a class="label label-default" href="{categoryLink}" data-toggle="tooltip" title="{category}" >
<span class="{categoryIcon}"></span>
</a>
{tagsHTML}
</div>
{viewsHTML}
</div>
<div class="row" style="margin-top: 5px;">
{creator}
</div>
</div>
</div>