mirror of
https://github.com/DanielnetoDotCom/YouPHPTube
synced 2025-10-03 01:39:24 +02:00
This commit is contained in:
parent
1e61a87c3c
commit
01f835f0b1
15 changed files with 930 additions and 718 deletions
|
@ -8,7 +8,9 @@ if (ADs::canHaveCustomAds()) {
|
|||
style="border-radius: 0;"
|
||||
onclick="avideoModalIframeFull(webSiteRootURL+'plugin/ADs/editor.php?customAds=1');return false;">
|
||||
<i class="fas fa-image"></i>
|
||||
<span class="menuLabel">
|
||||
<?php echo __('Custom ADs'); ?>
|
||||
</span>
|
||||
</a>
|
||||
</div>
|
||||
</li>
|
||||
|
|
|
@ -1038,6 +1038,7 @@ class AVideoPlugin
|
|||
self::YPTstart();
|
||||
$p = static::loadPlugin($value['dirName']);
|
||||
if (is_object($p)) {
|
||||
//_error_log("AVideoPlugin::getModeYouTube::{$value['dirName']}");
|
||||
$p->getModeYouTube($videos_id);
|
||||
}
|
||||
self::YPTend("{$value['dirName']}::" . __FUNCTION__);
|
||||
|
|
|
@ -5,9 +5,9 @@ $iframeHeight = 200;
|
|||
$zoom = 0.7;
|
||||
if (!isset($themeSwitcherAdded)) {
|
||||
$themeSwitcherAdded = 1;
|
||||
?>
|
||||
?>
|
||||
<style>
|
||||
.openThemeOptionsUL{
|
||||
.openThemeOptionsUL {
|
||||
top: auto;
|
||||
max-height: 250px;
|
||||
overflow-y: auto;
|
||||
|
@ -16,36 +16,48 @@ if (!isset($themeSwitcherAdded)) {
|
|||
margin-top: -26px;
|
||||
overflow-x: visible;
|
||||
}
|
||||
.openThemeOptionsUL li .fas{
|
||||
|
||||
.openThemeOptionsUL li .fas {
|
||||
display: none;
|
||||
}
|
||||
.openThemeOptionsUL li.active .far{
|
||||
|
||||
.openThemeOptionsUL li.active .far {
|
||||
display: none;
|
||||
}
|
||||
.openThemeOptionsUL li.active .fas{
|
||||
|
||||
.openThemeOptionsUL li.active .fas {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
#sideBarContainer .openThemeOptionsUL{
|
||||
#sideBarContainer .openThemeOptionsUL {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
#showThemeIframeDiv{
|
||||
#showThemeIframeDiv {
|
||||
position: fixed;
|
||||
top: 70px;
|
||||
left: 50%;
|
||||
margin-left: -<?php echo $iframeWidth/2; ?>px;
|
||||
margin-left: -<?php echo $iframeWidth / 2; ?>px;
|
||||
background-color: #000;
|
||||
-webkit-box-shadow: 0 0 5px 2px #000; /* Safari 3-4, iOS 4.0.2 - 4.2, Android 2.3+ */
|
||||
-moz-box-shadow: 0 0 5px 2px #000; /* Firefox 3.5 - 3.6 */
|
||||
box-shadow: 0 0 5px 2px #000; /* Opera 10.5, IE 9, Firefox 4+, Chrome 6+, iOS 5 */
|
||||
-webkit-box-shadow: 0 0 5px 2px #000;
|
||||
/* Safari 3-4, iOS 4.0.2 - 4.2, Android 2.3+ */
|
||||
-moz-box-shadow: 0 0 5px 2px #000;
|
||||
/* Firefox 3.5 - 3.6 */
|
||||
box-shadow: 0 0 5px 2px #000;
|
||||
/* Opera 10.5, IE 9, Firefox 4+, Chrome 6+, iOS 5 */
|
||||
z-index: 2000;
|
||||
width: <?php echo $iframeWidth; ?>px;
|
||||
height: <?php echo $iframeHeight; ?>px;
|
||||
padding: 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
#frame { width: <?php echo $iframeWidth/$zoom; ?>px; height: <?php echo $iframeHeight/$zoom; ?>px; border: 1px solid black; }
|
||||
|
||||
#frame {
|
||||
width: <?php echo $iframeWidth / $zoom; ?>px;
|
||||
height: <?php echo $iframeHeight / $zoom; ?>px;
|
||||
border: 1px solid black;
|
||||
}
|
||||
|
||||
#frame {
|
||||
-ms-zoom: <?php echo $zoom; ?>;
|
||||
-moz-transform: scale(<?php echo $zoom; ?>);
|
||||
|
@ -57,29 +69,29 @@ if (!isset($themeSwitcherAdded)) {
|
|||
}
|
||||
</style>
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
$(window).click(function () {
|
||||
$(document).ready(function() {
|
||||
$(window).click(function() {
|
||||
$('.openThemeOptions').next('ul').hide();
|
||||
$('#showThemeIframeDiv').fadeOut();
|
||||
});
|
||||
$('.liThemes').click(function (event) {
|
||||
$('.liThemes').click(function(event) {
|
||||
event.stopPropagation();
|
||||
});
|
||||
$('.openThemeOptions').on("click", function (e) {
|
||||
$('.openThemeOptions').on("click", function(e) {
|
||||
$(this).next('ul').toggle();
|
||||
if (!$(this).next('ul').is(":visible")) {
|
||||
$('#showThemeIframeDiv').fadeOut();
|
||||
$('#showThemeIframeDiv').fadeOut();
|
||||
}
|
||||
e.stopPropagation();
|
||||
e.preventDefault();
|
||||
});
|
||||
|
||||
$('body').append('<div id="showThemeIframeDiv" style="display:none;"></div>');
|
||||
setInterval(function(){
|
||||
if(!$('.openThemeOptions').is(":visible")){
|
||||
setInterval(function() {
|
||||
if (!$('.openThemeOptions').is(":visible")) {
|
||||
$('#showThemeIframeDiv').fadeOut();
|
||||
}
|
||||
},1000);
|
||||
}, 1000);
|
||||
});
|
||||
|
||||
function showThemeIframe(name) {
|
||||
|
@ -98,7 +110,7 @@ if (!isset($themeSwitcherAdded)) {
|
|||
});
|
||||
}
|
||||
</script>
|
||||
<?php
|
||||
<?php
|
||||
}
|
||||
$aClass = "";
|
||||
$keyComplement = "";
|
||||
|
@ -108,7 +120,12 @@ if ($navBarButtons) {
|
|||
}
|
||||
?>
|
||||
<li class="dropdown-submenu" style="position: relative;">
|
||||
<a class="openThemeOptions <?php echo $aClass; ?>" tabindex="-1" href="#"><i class="fas fa-adjust"></i> <?php echo __("Change theme"); ?> </a>
|
||||
<a class="openThemeOptions <?php echo $aClass; ?>" tabindex="-1" href="#">
|
||||
<i class="fas fa-adjust"></i>
|
||||
<span class="menuLabel">
|
||||
<?php echo __("Change theme"); ?>
|
||||
</span>
|
||||
</a>
|
||||
<ul class="dropdown-menu openThemeOptionsUL">
|
||||
<?php
|
||||
$themes = Gallery::getThemes();
|
||||
|
@ -121,9 +138,9 @@ if ($navBarButtons) {
|
|||
}
|
||||
|
||||
echo '<li class="' . $class . ' liThemes" id="li' . $value['name'] . '" ><a class="openThemeOptionsSub" tabindex="-1" href="#" '
|
||||
. 'onmouseover="showThemeIframe(\'' . $value['name'] . '\');"'
|
||||
. 'onclick="changeTheme(\'' . $value['name'] . '\');"'
|
||||
. '><i class="far fa-images"></i><i class="fas fa-image"></i> ' . $value['label'] . '</a></li>';
|
||||
. 'onmouseover="showThemeIframe(\'' . $value['name'] . '\');"'
|
||||
. 'onclick="changeTheme(\'' . $value['name'] . '\');"'
|
||||
. '><i class="far fa-images"></i><i class="fas fa-image"></i> ' . $value['label'] . '</a></li>';
|
||||
}
|
||||
?>
|
||||
</ul>
|
||||
|
|
|
@ -6,7 +6,7 @@ $url = addQueryStringParameter($url, 'site', $global['webSiteRootURL']);
|
|||
$url = addQueryStringParameter($url, 'user', User::getUserName());
|
||||
$url = addQueryStringParameter($url, 'pass', User::getUserPass());
|
||||
$url = addQueryStringParameter($url, 'users_id', User::getId());
|
||||
$url = addQueryStringParameter($url, 'isMobile', isMobile()?1:0);
|
||||
$url = addQueryStringParameter($url, 'isMobile', isMobile() ? 1 : 0);
|
||||
$url = addQueryStringParameter($url, 'qrcode', 1);
|
||||
|
||||
?>
|
||||
|
@ -18,10 +18,10 @@ $url = addQueryStringParameter($url, 'qrcode', 1);
|
|||
</strong>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#" onclick="avideoModalIframeXSmall('<?php echo $url; ?>');return false;" >
|
||||
<i class="fas fa-qrcode"></i> <?php echo __('Connect Mobile App'); ?>
|
||||
<a href="#" onclick="avideoModalIframeXSmall('<?php echo $url; ?>');return false;">
|
||||
<i class="fas fa-qrcode"></i>
|
||||
<span class="menuLabel">
|
||||
<?php echo __('Connect Mobile App'); ?>
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -15,7 +15,11 @@ $(document).ready(function () {
|
|||
this.controlText("Next");
|
||||
}
|
||||
handleClick() {
|
||||
document.location = autoPlayVideoURL;
|
||||
var url = getNextPlaylistUrl();
|
||||
if (empty(url)) {
|
||||
url = autoPlayVideoURL;
|
||||
}
|
||||
document.location = url;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -24,3 +28,22 @@ $(document).ready(function () {
|
|||
player.getChild('controlBar').addChild('NextButton', {}, getPlayerButtonIndex('PlayToggle')+1);
|
||||
}, 30);
|
||||
});
|
||||
function getNextPlaylistUrl() {
|
||||
// Check if '.playlist-nav' exists
|
||||
if ($('.playlist-nav').length === 0) {
|
||||
// If '.playlist-nav' does not exist, return false
|
||||
return false;
|
||||
}
|
||||
|
||||
// Find the active list item
|
||||
var activeLi = $('.playlist-nav .navbar-nav li.active');
|
||||
|
||||
// Determine the next list item; if the active item is the last, wrap to the first list item
|
||||
var nextLi = activeLi.is(':last-child') ? $('.playlist-nav .navbar-nav li').first() : activeLi.next();
|
||||
|
||||
// Get the URL from the 'a' element inside the next list item
|
||||
var nextUrl = nextLi.find('a').attr('href');
|
||||
|
||||
// Return the URL, or false if it's not found
|
||||
return nextUrl || false;
|
||||
}
|
||||
|
|
|
@ -336,7 +336,7 @@ class PlayLists extends PluginAbstract
|
|||
//$url = $global['webSiteRootURL'] . "plugin/PlayLists/player.php?playlists_id=" . $playlists_id;
|
||||
$url = $global['webSiteRootURL'] . "play/" . $playlists_id;
|
||||
} else {
|
||||
$url = $global['webSiteRootURL'] . "program/" . $playlists_id;
|
||||
$url = PlayLists::getURL($playlists_id);
|
||||
}
|
||||
}
|
||||
if (isset($playlist_index)) {
|
||||
|
@ -376,7 +376,9 @@ class PlayLists extends PluginAbstract
|
|||
<div>
|
||||
<a href="' . self::getWatchLaterLink() . '" class="btn btn-default btn-block" style="border-radius: 0;">
|
||||
<i class="fas fa-clock"></i>
|
||||
<span class="menuLabel">
|
||||
' . __("Watch Later") . '
|
||||
</span>
|
||||
</a>
|
||||
</div>
|
||||
</li>';
|
||||
|
@ -386,7 +388,9 @@ class PlayLists extends PluginAbstract
|
|||
<div>
|
||||
<a href="' . self::getFavoriteLink() . '" class="btn btn-default btn-block" style="border-radius: 0;">
|
||||
<i class="fas fa-heart"></i>
|
||||
<span class="menuLabel">
|
||||
' . __("Favorite") . '
|
||||
</span>
|
||||
</a>
|
||||
</div>
|
||||
</li>';
|
||||
|
@ -395,7 +399,9 @@ class PlayLists extends PluginAbstract
|
|||
<div>
|
||||
<a href="' . "{$global['webSiteRootURL']}plugin/PlayLists/managerPlaylists.php" . '" class="btn btn-default btn-block" style="border-radius: 0;">
|
||||
<i class="fas fa-list"></i>
|
||||
<span class="menuLabel">
|
||||
' . __("Organize") . ' ' . __($obj->name) . '
|
||||
</span>
|
||||
</a>
|
||||
</div>
|
||||
</li>';
|
||||
|
@ -872,7 +878,6 @@ class PlayLists extends PluginAbstract
|
|||
return '';
|
||||
}
|
||||
|
||||
|
||||
static function scheduleLiveButton($playlists_id, $showLabel = true, $class = 'btn btn-xs btn-default')
|
||||
{
|
||||
// can the user live?
|
||||
|
@ -1045,7 +1050,7 @@ class PlayLists extends PluginAbstract
|
|||
$key = $lt->getKey();
|
||||
_error_log("on_publish_done key={$key} live_transmitions_history_id={$live_transmitions_history_id} ");
|
||||
$isPlayListScheduled = Playlists_schedules::iskeyPlayListScheduled($key);
|
||||
if(!empty($isPlayListScheduled['playlists_schedules'])){
|
||||
if (!empty($isPlayListScheduled['playlists_schedules'])) {
|
||||
$pls = new Playlists_schedules($isPlayListScheduled['playlists_schedules']);
|
||||
if ($pls->getFinish_datetime() > time()) {
|
||||
$ps = Playlists_schedules::getPlaying($isPlayListScheduled['playlists_schedules']);
|
||||
|
@ -1061,8 +1066,8 @@ class PlayLists extends PluginAbstract
|
|||
_error_log("on_publish_done is complete {$pls->getFinish_datetime()} < " . time() . " | " . date('Y/m/d H:i:s', $pls->getFinish_datetime()) . ' < ' . date('Y/m/d H:i:s', time()));
|
||||
self::setScheduleStatus($key, Playlists_schedules::STATUS_COMPLETE);
|
||||
}
|
||||
}else{
|
||||
_error_log("on_publish_done is complete isPlayListScheduled=".json_encode($isPlayListScheduled));
|
||||
} else {
|
||||
_error_log("on_publish_done is complete isPlayListScheduled=" . json_encode($isPlayListScheduled));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1081,6 +1086,30 @@ class PlayLists extends PluginAbstract
|
|||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
static function getURL($playlist_id, $count=0, $PLChannelName = '', $plName = '', $current_video_clean_title = '')
|
||||
{
|
||||
global $global;
|
||||
if (empty($PLChannelName)) {
|
||||
$pl = new PlayList($playlist_id);
|
||||
$users_id = $pl->getUsers_id();
|
||||
$user = new User($users_id);
|
||||
$PLChannelName = $user->getChannelName();
|
||||
}
|
||||
if (empty($plName)) {
|
||||
if (empty($pl)) {
|
||||
$pl = new PlayList($playlist_id);
|
||||
}
|
||||
$plName = $user->getName();
|
||||
}
|
||||
if (empty($current_video_clean_title)) {
|
||||
$playlistVideos = PlayList::getVideosFromPlaylist($playlist_id);
|
||||
$current_video_clean_title = $playlistVideos[$count];
|
||||
}
|
||||
$plURL = "{$global['webSiteRootURL']}program/{$playlist_id}/{$count}/" . urlencode(cleanURLName($PLChannelName)) . '/' . urlencode(cleanURLName($plName)) . '/' . urlencode(cleanURLName($current_video_clean_title));
|
||||
|
||||
return $plURL;
|
||||
}
|
||||
}
|
||||
|
||||
class PlayListPlayer
|
||||
|
@ -1115,7 +1144,6 @@ class PlayListPlayer
|
|||
return $this->videos;
|
||||
}
|
||||
|
||||
|
||||
public function canSee()
|
||||
{
|
||||
return !empty($this->playlists_id) && PlayList::canSee($this->playlists_id, $this->users_id);
|
||||
|
@ -1128,11 +1156,11 @@ class PlayListPlayer
|
|||
$reasons = array();
|
||||
if ($status == 'favorite') {
|
||||
$reasons[] = __('Favorite is always private');
|
||||
}else if ($status == 'watch_later') {
|
||||
} else if ($status == 'watch_later') {
|
||||
$reasons[] = __('Watch later is always private');
|
||||
}else if ($status !== 'public' && $status !== 'unlisted') {
|
||||
$reasons[] = 'Status = '.$status;
|
||||
if($this->users_id !== $obj->getUsers_id()){
|
||||
} else if ($status !== 'public' && $status !== 'unlisted') {
|
||||
$reasons[] = 'Status = ' . $status;
|
||||
if ($this->users_id !== $obj->getUsers_id()) {
|
||||
$reasons[] = __('Playlist is private');
|
||||
}
|
||||
}
|
||||
|
@ -1188,11 +1216,11 @@ class PlayListPlayer
|
|||
$videos = array();
|
||||
if (!empty($this->playlists_id)) {
|
||||
global $_pl_getVideos;
|
||||
if(!isset($_pl_getVideos)){
|
||||
if (!isset($_pl_getVideos)) {
|
||||
$_pl_getVideos = array();
|
||||
}
|
||||
_error_log("PlayList::getVideosFromPlaylist($this->playlists_id) ".json_encode(debug_backtrace()));
|
||||
if(isset($_pl_getVideos[$this->playlists_id])){
|
||||
_error_log("PlayList::getVideosFromPlaylist($this->playlists_id) " . json_encode(debug_backtrace()));
|
||||
if (isset($_pl_getVideos[$this->playlists_id])) {
|
||||
return $_pl_getVideos[$this->playlists_id];
|
||||
}
|
||||
$_pl_getVideos[$this->playlists_id] = array();
|
||||
|
@ -1212,10 +1240,10 @@ class PlayListPlayer
|
|||
*/
|
||||
} else if (!empty($this->tags_id)) {
|
||||
global $_plt_getVideos;
|
||||
if(!isset($_plt_getVideos)){
|
||||
if (!isset($_plt_getVideos)) {
|
||||
$_plt_getVideos = array();
|
||||
}
|
||||
if(isset($_plt_getVideos[$this->playlists_id])){
|
||||
if (isset($_plt_getVideos[$this->playlists_id])) {
|
||||
return $_plt_getVideos[$this->playlists_id];
|
||||
}
|
||||
$_plt_getVideos[$this->playlists_id] = array();
|
||||
|
|
|
@ -1,14 +1,16 @@
|
|||
<?php
|
||||
if (User::isLogged()) {
|
||||
?>
|
||||
?>
|
||||
<li>
|
||||
<div>
|
||||
<button onclick="avideoModalIframe(webSiteRootURL + 'plugin/VideosStatistics/history.php');" class="btn btn-default btn-block" style="border-radius: 0;">
|
||||
<button onclick="avideoModalIframe(webSiteRootURL + 'plugin/VideosStatistics/history.php');" class="btn btn-default btn-block" style="border-radius: 0;">
|
||||
<i class="fas fa-history"></i>
|
||||
<?php echo __("Videos History"); ?>
|
||||
<span class="menuLabel">
|
||||
<?php echo __("Videos History"); ?>
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
</li>
|
||||
<?php
|
||||
<?php
|
||||
}
|
||||
?>
|
|
@ -206,7 +206,8 @@ unset($_POST['current']);
|
|||
$count++;
|
||||
continue;
|
||||
}
|
||||
$episodeLink = "{$global['webSiteRootURL']}program/{$playlist['id']}/{$count}/{$channelName}/" . urlencode(cleanURLName($playlist['name'])) . "/" . cleanURLName($value['clean_title']);
|
||||
|
||||
$episodeLink = PlayLists::getURL($playlist['id'], $count, $channelName, $playlist['name'], $value['clean_title']);
|
||||
$count++;
|
||||
$name = User::getNameIdentificationById($value['users_id']);
|
||||
$class = '';
|
||||
|
|
|
@ -37,90 +37,81 @@ if (empty($programs)) {
|
|||
$playListsObj = AVideoPlugin::getObjectData("PlayLists");
|
||||
//var_dump($_GET['program_id']);exit;
|
||||
PlayLists::loadScripts();
|
||||
|
||||
|
||||
$_page = new Page(array("Program"));
|
||||
$_page->setExtraStyles(
|
||||
array(
|
||||
'node_modules/video.js/dist/video-js.min.css',
|
||||
'plugin/Gallery/style.css'
|
||||
)
|
||||
);
|
||||
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html lang="<?php echo getLanguage(); ?>">
|
||||
|
||||
<head>
|
||||
<title><?php echo __("Program") . $config->getPageTitleSeparator() . $config->getWebSiteTitle(); ?></title>
|
||||
<?php
|
||||
include $global['systemRootPath'] . 'view/include/head.php';
|
||||
?>
|
||||
<style>
|
||||
.galleryVideo .panel {
|
||||
border-color: transparent;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
.galleryVideo .panel .panel-body {
|
||||
padding: 5px;
|
||||
}
|
||||
</style>
|
||||
<?php
|
||||
if (!empty($videos_id)) {
|
||||
getOpenGraph($videos_id);
|
||||
<style>
|
||||
.galleryVideo .panel {
|
||||
border-color: transparent;
|
||||
box-shadow: none;
|
||||
}
|
||||
?>
|
||||
</head>
|
||||
|
||||
<body class="<?php echo $global['bodyClass']; ?>">
|
||||
.galleryVideo .panel .panel-body {
|
||||
padding: 5px;
|
||||
}
|
||||
</style>
|
||||
<div class="container-fluid gallery">
|
||||
<?php
|
||||
include $global['systemRootPath'] . 'view/include/navbar.php';
|
||||
?>
|
||||
<div class="container-fluid gallery">
|
||||
<?php
|
||||
$channelName = @$_GET['channelName'];
|
||||
unset($_GET['channelName']);
|
||||
$channelName = @$_GET['channelName'];
|
||||
unset($_GET['channelName']);
|
||||
$startC = microtime(true);
|
||||
foreach ($programs as $key => $program) {
|
||||
@$timesC[__LINE__] += microtime(true) - $startC;
|
||||
$startC = microtime(true);
|
||||
foreach ($programs as $key => $program) {
|
||||
@$timesC[__LINE__] += microtime(true) - $startC;
|
||||
$startC = microtime(true);
|
||||
$videosArrayId = PlayList::getVideosIdFromPlaylist($program['id']);
|
||||
@$timesC[__LINE__] += microtime(true) - $startC;
|
||||
$startC = microtime(true);
|
||||
//getAllVideos($status = "viewable", $showOnlyLoggedUserVideos = false, $ignoreGroup = false, $videosArrayId = array(), $getStatistcs = false, $showUnlisted = false, $activeUsersOnly = true)
|
||||
if (empty($videosArrayId) && ($program['status'] == "favorite" || $program['status'] == "watch_later")) {
|
||||
unset($programs[$key]);
|
||||
continue;
|
||||
} elseif (empty($videosArrayId)) {
|
||||
$videosP = [];
|
||||
} else {
|
||||
$videosP = Video::getAllVideos("viewable", false, true, $videosArrayId, false, true);
|
||||
} //var_dump($videosArrayId, $videosP);exit;
|
||||
@$timesC[__LINE__] += microtime(true) - $startC;
|
||||
$startC = microtime(true);
|
||||
//_error_log("channelPlaylist videosP: ".json_encode($videosP));
|
||||
//$videosP = PlayList::sortVideos($videosP, $videosArrayId);
|
||||
@$timesC[__LINE__] += microtime(true) - $startC;
|
||||
$startC = microtime(true);
|
||||
//_error_log("channelPlaylist videosP2: ".json_encode($videosP));
|
||||
//_error_log("channelPlaylist videosArrayId: ".json_encode($videosArrayId));
|
||||
@$timesC[__LINE__] += microtime(true) - $startC;
|
||||
$startC = microtime(true);
|
||||
$totalVideos = count($videosP);
|
||||
$videosArrayId = PlayList::getVideosIdFromPlaylist($program['id']);
|
||||
@$timesC[__LINE__] += microtime(true) - $startC;
|
||||
$startC = microtime(true);
|
||||
//getAllVideos($status = "viewable", $showOnlyLoggedUserVideos = false, $ignoreGroup = false, $videosArrayId = array(), $getStatistcs = false, $showUnlisted = false, $activeUsersOnly = true)
|
||||
if (empty($videosArrayId) && ($program['status'] == "favorite" || $program['status'] == "watch_later")) {
|
||||
unset($programs[$key]);
|
||||
continue;
|
||||
} elseif (empty($videosArrayId)) {
|
||||
$videosP = [];
|
||||
} else {
|
||||
$videosP = Video::getAllVideos("viewable", false, true, $videosArrayId, false, true);
|
||||
} //var_dump($videosArrayId, $videosP);exit;
|
||||
@$timesC[__LINE__] += microtime(true) - $startC;
|
||||
$startC = microtime(true);
|
||||
//_error_log("channelPlaylist videosP: ".json_encode($videosP));
|
||||
//$videosP = PlayList::sortVideos($videosP, $videosArrayId);
|
||||
@$timesC[__LINE__] += microtime(true) - $startC;
|
||||
$startC = microtime(true);
|
||||
//_error_log("channelPlaylist videosP2: ".json_encode($videosP));
|
||||
//_error_log("channelPlaylist videosArrayId: ".json_encode($videosArrayId));
|
||||
@$timesC[__LINE__] += microtime(true) - $startC;
|
||||
$startC = microtime(true);
|
||||
$totalVideos = count($videosP);
|
||||
|
||||
$checked = '';
|
||||
if(!empty($program['showOnFirstPage'])){
|
||||
$checked = ' checked="checked" ';
|
||||
}
|
||||
?>
|
||||
<br>
|
||||
<div class="panel panel-default program" playListId="<?php echo $program['id']; ?>">
|
||||
<div class="panel-heading clearfix" style="padding-left: 10px;">
|
||||
<span class="badge pull-right"><?php echo $totalVideos; ?> <?php echo __('Videos'); ?></span>
|
||||
<div class="pull-left">
|
||||
<strong style="font-size: 1.1em;" class="playlistName">
|
||||
<!-- <?php echo basename(__FILE__); ?> -->
|
||||
<?php echo __($program['name']); ?>
|
||||
</strong><br>
|
||||
<small class="text-muted">
|
||||
<?php echo seconds2human(PlayList::getTotalDurationFromPlaylistInSeconds($program['id'])); ?>
|
||||
</small>
|
||||
</div>
|
||||
<?php
|
||||
PlayLists::getPLButtons($program['id'], false);
|
||||
if (PlayLists::canManageAllPlaylists()) {
|
||||
?>
|
||||
$checked = '';
|
||||
if (!empty($program['showOnFirstPage'])) {
|
||||
$checked = ' checked="checked" ';
|
||||
}
|
||||
?>
|
||||
<br>
|
||||
<div class="panel panel-default program" playListId="<?php echo $program['id']; ?>">
|
||||
<div class="panel-heading clearfix" style="padding-left: 10px;">
|
||||
<span class="badge pull-right"><?php echo $totalVideos; ?> <?php echo __('Videos'); ?></span>
|
||||
<div class="pull-left">
|
||||
<strong style="font-size: 1.1em;" class="playlistName">
|
||||
<!-- <?php echo basename(__FILE__); ?> -->
|
||||
<?php echo __($program['name']); ?>
|
||||
</strong><br>
|
||||
<small class="text-muted">
|
||||
<?php echo seconds2human(PlayList::getTotalDurationFromPlaylistInSeconds($program['id'])); ?>
|
||||
</small>
|
||||
</div>
|
||||
<?php
|
||||
PlayLists::getPLButtons($program['id'], false);
|
||||
if (PlayLists::canManageAllPlaylists()) {
|
||||
?>
|
||||
<br>
|
||||
<div class="pull-right" style="padding: 10px 0 0 0;">
|
||||
<label for="addOnFirstPage<?php echo $program['id']; ?>">
|
||||
|
@ -131,385 +122,384 @@ PlayLists::loadScripts();
|
|||
<label for="addOnFirstPage<?php echo $program['id']; ?>" class="label-success"></label>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
if (!empty($videosArrayId)) {
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
|
||||
<div class="panel-body">
|
||||
<?php
|
||||
if (!empty($videosArrayId)) {
|
||||
?>
|
||||
|
||||
<div class="panel-body">
|
||||
<?php
|
||||
$_REQUEST['user_id'] = $program['users_id'];
|
||||
$_REQUEST['playlists_id'] = $program['id'];
|
||||
include $global['systemRootPath'] . 'plugin/PlayLists/epg.html.php';
|
||||
?>
|
||||
<div id="sortable<?php echo $program['id']; ?>" style="list-style: none;">
|
||||
<?php
|
||||
$_REQUEST['user_id'] = $program['users_id'];
|
||||
$_REQUEST['playlists_id'] = $program['id'];
|
||||
include $global['systemRootPath'] . 'plugin/PlayLists/epg.html.php';
|
||||
$count = 0;
|
||||
$realCount = 0;
|
||||
foreach ($videosP as $value) {
|
||||
$episodeLink = PlayLists::getURL($program['id'], $count, $value["channelName"], $program['name'], $value['clean_title']);
|
||||
$count++;
|
||||
if (empty($value['created'])) {
|
||||
continue;
|
||||
}
|
||||
$realCount++;
|
||||
$name = User::getNameIdentificationById($value['users_id']);
|
||||
|
||||
$class = '';
|
||||
$style = '';
|
||||
if ($count > 6) {
|
||||
$class = "showMoreLess{$program['id']}";
|
||||
$style = "display: none;";
|
||||
}
|
||||
?>
|
||||
<div id="sortable<?php echo $program['id']; ?>" style="list-style: none;">
|
||||
<?php
|
||||
$count = 0;
|
||||
$realCount = 0;
|
||||
foreach ($videosP as $value) {
|
||||
$episodeLink = "{$global['webSiteRootURL']}program/{$program['id']}/{$count}";
|
||||
$count++;
|
||||
if (empty($value['created'])) {
|
||||
continue;
|
||||
}
|
||||
$realCount++;
|
||||
$img_portrait = ($value['rotation'] === "90" || $value['rotation'] === "270") ? "img-portrait" : "";
|
||||
$name = User::getNameIdentificationById($value['users_id']);
|
||||
|
||||
$class = '';
|
||||
$style = '';
|
||||
if ($count > 6) {
|
||||
$class = "showMoreLess{$program['id']}";
|
||||
$style = "display: none;";
|
||||
}
|
||||
?>
|
||||
<li class="col-lg-2 col-md-4 col-sm-4 col-xs-6 galleryVideo showMoreLess <?php echo $class; ?> " id="<?php echo $value['id']; ?>" style="padding: 1px; <?php echo $style; ?>">
|
||||
<div class="panel panel-default" playListId="<?php echo $program['id']; ?>" style="min-height: 215px;">
|
||||
<div class="panel-body" style="overflow: hidden;">
|
||||
<?php
|
||||
echo Video::getVideoImagewithHoverAnimationFromVideosId($value);
|
||||
?>
|
||||
<a class="h6 galleryLink hrefLink" href="<?php echo $episodeLink; ?>" title="<?php echo getSEOTitle($value['title']); ?>">
|
||||
<strong class="title"><?php echo getSEOTitle($value['title']); ?></strong>
|
||||
</a>
|
||||
<div class="galeryDetails" style="min-height: 60px;">
|
||||
<div class="galleryTags">
|
||||
<?php
|
||||
$value['tags'] = Video::getTags($value['id']);
|
||||
foreach ($value['tags'] as $value2) {
|
||||
if (is_array($value2)) {
|
||||
$value2 = (object) $value2;
|
||||
}
|
||||
if ($value2->label === __("Group")) {
|
||||
?>
|
||||
<span class="label label-<?php echo $value2->type; ?>"><?php echo $value2->text; ?></span>
|
||||
<?php
|
||||
}
|
||||
<li class="col-lg-2 col-md-4 col-sm-4 col-xs-6 galleryVideo showMoreLess <?php echo $class; ?> " id="<?php echo $value['id']; ?>" style="padding: 1px; <?php echo $style; ?>">
|
||||
<div class="panel panel-default" playListId="<?php echo $program['id']; ?>" style="min-height: 215px;">
|
||||
<div class="panel-body" style="overflow: hidden;">
|
||||
<?php
|
||||
echo Video::getVideoImagewithHoverAnimationFromVideosId($value);
|
||||
?>
|
||||
<a class="h6 galleryLink hrefLink" href="<?php echo $episodeLink; ?>" title="<?php echo getSEOTitle($value['title']); ?>">
|
||||
<strong class="title"><?php echo getSEOTitle($value['title']); ?></strong>
|
||||
</a>
|
||||
<div class="galeryDetails" style="min-height: 60px;">
|
||||
<div class="galleryTags">
|
||||
<?php
|
||||
$value['tags'] = Video::getTags($value['id']);
|
||||
foreach ($value['tags'] as $value2) {
|
||||
if (is_array($value2)) {
|
||||
$value2 = (object) $value2;
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
if ($value2->label === __("Group")) {
|
||||
?>
|
||||
<span class="label label-<?php echo $value2->type; ?>"><?php echo $value2->text; ?></span>
|
||||
<?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="far fa-clock"></i>
|
||||
<?php echo humanTiming(strtotime($value['videoCreation']), 0, true, true); ?>
|
||||
</div>
|
||||
<div>
|
||||
<i class="fa fa-user"></i>
|
||||
<?php echo $name; ?>
|
||||
</div>
|
||||
<?php
|
||||
if (Video::canEdit($value['id'])) {
|
||||
?>
|
||||
<div>
|
||||
<a href="<?php echo $global['webSiteRootURL']; ?>mvideos?video_id=<?php echo $value['id']; ?>"><i class="fa fa-edit"></i> <?php echo __("Edit Video"); ?></a>
|
||||
|
||||
|
||||
</div>
|
||||
<?php }
|
||||
?>
|
||||
<?php
|
||||
if ($isMyChannel) {
|
||||
?>
|
||||
<div>
|
||||
<span style=" cursor: pointer;" class="btn-link text-primary removeVideo" playlist_id="<?php echo $program['id']; ?>" video_id="<?php echo $value['id']; ?>">
|
||||
<i class="fa fa-trash"></i> <?php echo __("Remove"); ?>
|
||||
</span>
|
||||
</div>
|
||||
<div>
|
||||
<span playlist_id="<?php echo $program['id']; ?>" video_id="<?php echo $value['id']; ?>">
|
||||
<i class="fas fa-sort-numeric-down"></i> <?php echo __("Sort"); ?>
|
||||
<input type="number" step="1" class="video_order" value="<?php echo empty($program['videos'][$count - 1]) ? 0 : intval(@$program['videos'][$count - 1]['video_order']); ?>" style="max-width: 50px;">
|
||||
<button class="btn btn-sm btn-xs sortNow"><i class="fas fa-check-square"></i></button>
|
||||
</span>
|
||||
</div>
|
||||
<?php }
|
||||
}
|
||||
}
|
||||
?>
|
||||
</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="far fa-clock"></i>
|
||||
<?php echo humanTiming(strtotime($value['videoCreation']), 0, true, true); ?>
|
||||
</div>
|
||||
<div>
|
||||
<i class="fa fa-user"></i>
|
||||
<?php echo $name; ?>
|
||||
</div>
|
||||
<?php
|
||||
if (Video::canEdit($value['id'])) {
|
||||
?>
|
||||
<div>
|
||||
<a href="<?php echo $global['webSiteRootURL']; ?>mvideos?video_id=<?php echo $value['id']; ?>"><i class="fa fa-edit"></i> <?php echo __("Edit Video"); ?></a>
|
||||
|
||||
|
||||
</div>
|
||||
<?php }
|
||||
?>
|
||||
<?php
|
||||
if ($isMyChannel) {
|
||||
?>
|
||||
<div>
|
||||
<span style=" cursor: pointer;" class="btn-link text-primary removeVideo" playlist_id="<?php echo $program['id']; ?>" video_id="<?php echo $value['id']; ?>">
|
||||
<i class="fa fa-trash"></i> <?php echo __("Remove"); ?>
|
||||
</span>
|
||||
</div>
|
||||
<div>
|
||||
<span playlist_id="<?php echo $program['id']; ?>" video_id="<?php echo $value['id']; ?>">
|
||||
<i class="fas fa-sort-numeric-down"></i> <?php echo __("Sort"); ?>
|
||||
<input type="number" step="1" class="video_order" value="<?php echo empty($program['videos'][$count - 1]) ? 0 : intval(@$program['videos'][$count - 1]['video_order']); ?>" style="max-width: 50px;">
|
||||
<button class="btn btn-sm btn-xs sortNow"><i class="fas fa-check-square"></i></button>
|
||||
</span>
|
||||
</div>
|
||||
<?php }
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<?php
|
||||
if ($realCount % 6 === 0) {
|
||||
echo '<div class="clearfix hidden-md hidden-sm hidden-xs"></div>';
|
||||
}
|
||||
if ($realCount % 3 === 0) {
|
||||
echo '<div class="clearfix hidden-lg hidden-xs"></div>';
|
||||
}
|
||||
if ($realCount % 2 === 0) {
|
||||
echo '<div class="clearfix hidden-md hidden-sm hidden-lg"></div>';
|
||||
}
|
||||
</div>
|
||||
</li>
|
||||
<?php
|
||||
if ($realCount % 6 === 0) {
|
||||
echo '<div class="clearfix hidden-md hidden-sm hidden-xs"></div>';
|
||||
}
|
||||
if ($realCount % 3 === 0) {
|
||||
echo '<div class="clearfix hidden-lg hidden-xs"></div>';
|
||||
}
|
||||
if ($realCount % 2 === 0) {
|
||||
echo '<div class="clearfix hidden-md hidden-sm hidden-lg"></div>';
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="panel-footer">
|
||||
<?php
|
||||
if (count($programs) > 1) {
|
||||
?>
|
||||
<button class="btn btn-default btn-xs btn-sm showMoreLessBtn showMoreLessBtn<?php echo $program['id']; ?>" onclick="$('.showMoreLessBtn<?php echo $program['id']; ?>').toggle();
|
||||
$('.<?php echo $class; ?>').slideDown();"><i class="fas fa-angle-down"></i> <?php echo __('Show More'); ?></button>
|
||||
<button class="btn btn-default btn-xs btn-sm showMoreLessBtn showMoreLessBtn<?php echo $program['id']; ?>" onclick="$('.showMoreLessBtn<?php echo $program['id']; ?>').toggle();
|
||||
$('.<?php echo $class; ?>').slideUp();" style="display: none;"><i class="fas fa-angle-up"></i> <?php echo __('Show Less'); ?></button>
|
||||
<?php
|
||||
}
|
||||
if ($isMyChannel && !empty($videosArrayId)) {
|
||||
?>
|
||||
<span class="label label-info"><i class="fa fa-info-circle"></i> <?php echo __("Drag and drop to sort"); ?></span>
|
||||
<?php }
|
||||
?>
|
||||
</div>
|
||||
<?php }
|
||||
?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<?php
|
||||
<div class="panel-footer">
|
||||
<?php
|
||||
if (count($programs) > 1) {
|
||||
?>
|
||||
<button class="btn btn-default btn-xs btn-sm showMoreLessBtn showMoreLessBtn<?php echo $program['id']; ?>" onclick="$('.showMoreLessBtn<?php echo $program['id']; ?>').toggle();
|
||||
$('.<?php echo $class; ?>').slideDown();"><i class="fas fa-angle-down"></i> <?php echo __('Show More'); ?></button>
|
||||
<button class="btn btn-default btn-xs btn-sm showMoreLessBtn showMoreLessBtn<?php echo $program['id']; ?>" onclick="$('.showMoreLessBtn<?php echo $program['id']; ?>').toggle();
|
||||
$('.<?php echo $class; ?>').slideUp();" style="display: none;"><i class="fas fa-angle-up"></i> <?php echo __('Show Less'); ?></button>
|
||||
<?php
|
||||
}
|
||||
if ($isMyChannel && !empty($videosArrayId)) {
|
||||
?>
|
||||
<span class="label label-info"><i class="fa fa-info-circle"></i> <?php echo __("Drag and drop to sort"); ?></span>
|
||||
<?php }
|
||||
?>
|
||||
</div>
|
||||
<?php }
|
||||
?>
|
||||
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
|
||||
$_GET['channelName'] = $channelName;
|
||||
?>
|
||||
|
||||
<script>
|
||||
var timoutembed;
|
||||
|
||||
function setTextEmbedCopied() {
|
||||
clearTimeout(timoutembed);
|
||||
$("#btnEmbedText").html("<?php echo __("Copied!"); ?>");
|
||||
timoutembed = setTimeout(function() {
|
||||
$("#btnEmbedText").html("<?php echo __("Copy embed code"); ?>");
|
||||
}, 3000);
|
||||
}
|
||||
|
||||
$_GET['channelName'] = $channelName;
|
||||
?>
|
||||
function saveSortable($sortableObject, playlist_id) {
|
||||
var list = $($sortableObject).sortable("toArray");
|
||||
$.ajax({
|
||||
url: '<?php echo $global['webSiteRootURL']; ?>objects/playlistSort.php',
|
||||
data: {
|
||||
"list": list,
|
||||
"playlist_id": playlist_id
|
||||
},
|
||||
type: 'post',
|
||||
success: function(response) {
|
||||
//$("#channelPlaylists").load(webSiteRootURL + "view/channelPlaylist.php?channelName=" + channelName);
|
||||
modal.hidePleaseWait();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
<script>
|
||||
var timoutembed;
|
||||
|
||||
function setTextEmbedCopied() {
|
||||
clearTimeout(timoutembed);
|
||||
$("#btnEmbedText").html("<?php echo __("Copied!"); ?>");
|
||||
timoutembed = setTimeout(function() {
|
||||
$("#btnEmbedText").html("<?php echo __("Copy embed code"); ?>");
|
||||
}, 3000);
|
||||
function sortNow($t, position) {
|
||||
var $this = $($t).closest('.galleryVideo');
|
||||
var $uiDiv = $($t).closest('.ui-sortable');
|
||||
var $playListId = $($t).closest('.panel').attr('playListId');
|
||||
var $list = $($t).closest('.ui-sortable').find('li');
|
||||
if (position < 0) {
|
||||
return false;
|
||||
}
|
||||
if (position === 0) {
|
||||
$this.slideUp(500, function() {
|
||||
$this.insertBefore($this.siblings(':eq(0)'));
|
||||
saveSortable($uiDiv, $playListId);
|
||||
}).slideDown(500);
|
||||
} else if ($list.length - 1 > position) {
|
||||
$this.slideUp(500, function() {
|
||||
$this.insertBefore($this.siblings(':eq(' + position + ')'));
|
||||
saveSortable($uiDiv, $playListId);
|
||||
}).slideDown(500);
|
||||
} else {
|
||||
$this.slideUp(500, function() {
|
||||
$this.insertAfter($this.siblings(':eq(' + ($list.length - 2) + ')'));
|
||||
saveSortable($uiDiv, $playListId);
|
||||
}).slideDown(500);
|
||||
}
|
||||
}
|
||||
|
||||
function saveSortable($sortableObject, playlist_id) {
|
||||
var list = $($sortableObject).sortable("toArray");
|
||||
var currentObject;
|
||||
$(function() {
|
||||
$('.addOnFirstPage').on('change', function() {
|
||||
url = webSiteRootURL + 'objects/playlistAddOnFirstPage.json.php';
|
||||
var playlist_id = $(this).val();
|
||||
var showOnFirstPage = $(this).prop('checked');
|
||||
avideoAjax(url, {
|
||||
playlist_id: playlist_id,
|
||||
showOnFirstPage: showOnFirstPage
|
||||
});
|
||||
});
|
||||
<?php
|
||||
if (count($programs) <= 1 || !empty($palyListsObj->expandPlayListOnChannels)) {
|
||||
?>
|
||||
$('.showMoreLess').slideDown();
|
||||
$('.showMoreLessBtn').toggle();
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
$('.removeVideo').click(function() {
|
||||
currentObject = this;
|
||||
|
||||
swal({
|
||||
title: "<?php echo __("Are you sure?"); ?>",
|
||||
text: "<?php echo __("You will not be able to recover this action!"); ?>",
|
||||
icon: "warning",
|
||||
buttons: true,
|
||||
dangerMode: true,
|
||||
})
|
||||
.then(function(willDelete) {
|
||||
if (willDelete) {
|
||||
|
||||
modal.showPleaseWait();
|
||||
var playlist_id = $(currentObject).attr('playlist_id');
|
||||
var video_id = $(currentObject).attr('video_id');
|
||||
$.ajax({
|
||||
url: webSiteRootURL + 'objects/playlistRemoveVideo.php',
|
||||
data: {
|
||||
"playlist_id": playlist_id,
|
||||
"video_id": video_id
|
||||
},
|
||||
type: 'post',
|
||||
success: function(response) {
|
||||
reloadPlayLists();
|
||||
$(".playListsIds" + video_id).prop("checked", false);
|
||||
$(currentObject).closest('.galleryVideo').fadeOut();
|
||||
modal.hidePleaseWait();
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
$('.deletePlaylist').click(function() {
|
||||
currentObject = this;
|
||||
|
||||
swal({
|
||||
title: "<?php echo __("Are you sure?"); ?>",
|
||||
text: "<?php echo __("You will not be able to recover this action!"); ?>",
|
||||
icon: "warning",
|
||||
buttons: true,
|
||||
dangerMode: true,
|
||||
})
|
||||
.then(function(willDelete) {
|
||||
if (willDelete) {
|
||||
|
||||
modal.showPleaseWait();
|
||||
var playlist_id = $(currentObject).attr('playlist_id');
|
||||
console.log(playlist_id);
|
||||
$.ajax({
|
||||
url: '<?php echo $global['webSiteRootURL']; ?>objects/playlistRemove.php',
|
||||
data: {
|
||||
"playlist_id": playlist_id
|
||||
},
|
||||
type: 'post',
|
||||
success: function(response) {
|
||||
$(currentObject).closest('.panel').slideUp();
|
||||
modal.hidePleaseWait();
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
$('.statusPlaylist').click(function() {
|
||||
var playlist_id = $(this).attr('playlist_id');
|
||||
var status = "public";
|
||||
if ($('#statusPrivate' + playlist_id).is(":visible")) {
|
||||
status = "public";
|
||||
$('.statusPlaylist' + playlist_id + ' span').hide();
|
||||
$('#statusPublic' + playlist_id).fadeIn();
|
||||
} else if ($('#statusPublic' + playlist_id).is(":visible")) {
|
||||
status = "unlisted";
|
||||
$('.statusPlaylist' + playlist_id + ' span').hide();
|
||||
$('#statusUnlisted' + playlist_id).fadeIn();
|
||||
} else if ($('#statusUnlisted' + playlist_id).is(":visible")) {
|
||||
status = "private";
|
||||
$('.statusPlaylist' + playlist_id + ' span').hide();
|
||||
$('#statusPrivate' + playlist_id).fadeIn();
|
||||
}
|
||||
modal.showPleaseWait();
|
||||
console.log(playlist_id);
|
||||
$.ajax({
|
||||
url: '<?php echo $global['webSiteRootURL']; ?>objects/playlistSort.php',
|
||||
url: '<?php echo $global['webSiteRootURL']; ?>objects/playlistStatus.php',
|
||||
data: {
|
||||
"list": list,
|
||||
"playlist_id": playlist_id
|
||||
"playlist_id": playlist_id,
|
||||
"status": status
|
||||
},
|
||||
type: 'post',
|
||||
success: function(response) {
|
||||
//$("#channelPlaylists").load(webSiteRootURL + "view/channelPlaylist.php?channelName=" + channelName);
|
||||
|
||||
modal.hidePleaseWait();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function sortNow($t, position) {
|
||||
var $this = $($t).closest('.galleryVideo');
|
||||
var $uiDiv = $($t).closest('.ui-sortable');
|
||||
var $playListId = $($t).closest('.panel').attr('playListId');
|
||||
var $list = $($t).closest('.ui-sortable').find('li');
|
||||
if (position < 0) {
|
||||
return false;
|
||||
}
|
||||
if (position === 0) {
|
||||
$this.slideUp(500, function() {
|
||||
$this.insertBefore($this.siblings(':eq(0)'));
|
||||
saveSortable($uiDiv, $playListId);
|
||||
}).slideDown(500);
|
||||
} else if ($list.length - 1 > position) {
|
||||
$this.slideUp(500, function() {
|
||||
$this.insertBefore($this.siblings(':eq(' + position + ')'));
|
||||
saveSortable($uiDiv, $playListId);
|
||||
}).slideDown(500);
|
||||
} else {
|
||||
$this.slideUp(500, function() {
|
||||
$this.insertAfter($this.siblings(':eq(' + ($list.length - 2) + ')'));
|
||||
saveSortable($uiDiv, $playListId);
|
||||
}).slideDown(500);
|
||||
}
|
||||
}
|
||||
|
||||
var currentObject;
|
||||
$(function() {
|
||||
$('.addOnFirstPage').on('change', function() {
|
||||
url = webSiteRootURL + 'objects/playlistAddOnFirstPage.json.php';
|
||||
var playlist_id = $(this).val();
|
||||
var showOnFirstPage = $(this).prop('checked');
|
||||
avideoAjax(url, {
|
||||
playlist_id: playlist_id,
|
||||
showOnFirstPage: showOnFirstPage
|
||||
});
|
||||
});
|
||||
<?php
|
||||
if (count($programs) <= 1 || !empty($palyListsObj->expandPlayListOnChannels)) {
|
||||
?>
|
||||
$('.showMoreLess').slideDown();
|
||||
$('.showMoreLessBtn').toggle();
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
$('.removeVideo').click(function() {
|
||||
currentObject = this;
|
||||
|
||||
swal({
|
||||
title: "<?php echo __("Are you sure?"); ?>",
|
||||
text: "<?php echo __("You will not be able to recover this action!"); ?>",
|
||||
icon: "warning",
|
||||
buttons: true,
|
||||
dangerMode: true,
|
||||
})
|
||||
.then(function(willDelete) {
|
||||
if (willDelete) {
|
||||
|
||||
modal.showPleaseWait();
|
||||
var playlist_id = $(currentObject).attr('playlist_id');
|
||||
var video_id = $(currentObject).attr('video_id');
|
||||
$.ajax({
|
||||
url: webSiteRootURL + 'objects/playlistRemoveVideo.php',
|
||||
data: {
|
||||
"playlist_id": playlist_id,
|
||||
"video_id": video_id
|
||||
},
|
||||
type: 'post',
|
||||
success: function(response) {
|
||||
reloadPlayLists();
|
||||
$(".playListsIds" + video_id).prop("checked", false);
|
||||
$(currentObject).closest('.galleryVideo').fadeOut();
|
||||
modal.hidePleaseWait();
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
$('.deletePlaylist').click(function() {
|
||||
currentObject = this;
|
||||
|
||||
swal({
|
||||
title: "<?php echo __("Are you sure?"); ?>",
|
||||
text: "<?php echo __("You will not be able to recover this action!"); ?>",
|
||||
icon: "warning",
|
||||
buttons: true,
|
||||
dangerMode: true,
|
||||
})
|
||||
.then(function(willDelete) {
|
||||
if (willDelete) {
|
||||
|
||||
modal.showPleaseWait();
|
||||
var playlist_id = $(currentObject).attr('playlist_id');
|
||||
console.log(playlist_id);
|
||||
$.ajax({
|
||||
url: '<?php echo $global['webSiteRootURL']; ?>objects/playlistRemove.php',
|
||||
data: {
|
||||
"playlist_id": playlist_id
|
||||
},
|
||||
type: 'post',
|
||||
success: function(response) {
|
||||
$(currentObject).closest('.panel').slideUp();
|
||||
modal.hidePleaseWait();
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
$('.statusPlaylist').click(function() {
|
||||
var playlist_id = $(this).attr('playlist_id');
|
||||
var status = "public";
|
||||
if ($('#statusPrivate' + playlist_id).is(":visible")) {
|
||||
status = "public";
|
||||
$('.statusPlaylist' + playlist_id + ' span').hide();
|
||||
$('#statusPublic' + playlist_id).fadeIn();
|
||||
} else if ($('#statusPublic' + playlist_id).is(":visible")) {
|
||||
status = "unlisted";
|
||||
$('.statusPlaylist' + playlist_id + ' span').hide();
|
||||
$('#statusUnlisted' + playlist_id).fadeIn();
|
||||
} else if ($('#statusUnlisted' + playlist_id).is(":visible")) {
|
||||
status = "private";
|
||||
$('.statusPlaylist' + playlist_id + ' span').hide();
|
||||
$('#statusPrivate' + playlist_id).fadeIn();
|
||||
}
|
||||
modal.showPleaseWait();
|
||||
console.log(playlist_id);
|
||||
$.ajax({
|
||||
url: '<?php echo $global['webSiteRootURL']; ?>objects/playlistStatus.php',
|
||||
data: {
|
||||
"playlist_id": playlist_id,
|
||||
"status": status
|
||||
},
|
||||
type: 'post',
|
||||
success: function(response) {
|
||||
|
||||
modal.hidePleaseWait();
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
$('.renamePlaylist').click(function() {
|
||||
currentObject = this;
|
||||
swal({
|
||||
text: "<?php echo __("Change Playlist Name"); ?>!",
|
||||
content: "input",
|
||||
button: {
|
||||
text: "<?php echo __("Confirm Playlist name"); ?>",
|
||||
closeModal: false,
|
||||
},
|
||||
}).then(function(name) {
|
||||
if (!name)
|
||||
throw null;
|
||||
modal.showPleaseWait();
|
||||
var playlist_id = $(currentObject).attr('playlist_id');
|
||||
console.log(playlist_id);
|
||||
return fetch('<?php echo $global['webSiteRootURL']; ?>objects/playlistRename.php?playlist_id=' + playlist_id + '&name=' + encodeURI(name));
|
||||
}).then(function(results) {
|
||||
return results.json();
|
||||
}).then(function(response) {
|
||||
if (response.error) {
|
||||
avideoAlert("<?php echo __("Sorry!"); ?>", response.msg, "error");
|
||||
modal.hidePleaseWait();
|
||||
} else {
|
||||
$(currentObject).closest('.panel').find('.playlistName').text(response.name);
|
||||
swal.stopLoading();
|
||||
swal.close();
|
||||
modal.hidePleaseWait();
|
||||
}
|
||||
}).catch(function(err) {
|
||||
if (err) {
|
||||
swal("Oh noes!", "The AJAX request failed!", "error");
|
||||
} else {
|
||||
swal.stopLoading();
|
||||
swal.close();
|
||||
}
|
||||
modal.hidePleaseWait();
|
||||
});;
|
||||
|
||||
});
|
||||
|
||||
$('.sortNow').click(function() {
|
||||
var $val = $(this).siblings("input").val();
|
||||
sortNow(this, $val);
|
||||
});
|
||||
|
||||
$('.video_order').keypress(function(e) {
|
||||
if (e.which == 13) {
|
||||
sortNow(this, $(this).val());
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
<!--
|
||||
|
||||
$('.renamePlaylist').click(function() {
|
||||
currentObject = this;
|
||||
swal({
|
||||
text: "<?php echo __("Change Playlist Name"); ?>!",
|
||||
content: "input",
|
||||
button: {
|
||||
text: "<?php echo __("Confirm Playlist name"); ?>",
|
||||
closeModal: false,
|
||||
},
|
||||
}).then(function(name) {
|
||||
if (!name)
|
||||
throw null;
|
||||
modal.showPleaseWait();
|
||||
var playlist_id = $(currentObject).attr('playlist_id');
|
||||
console.log(playlist_id);
|
||||
return fetch('<?php echo $global['webSiteRootURL']; ?>objects/playlistRename.php?playlist_id=' + playlist_id + '&name=' + encodeURI(name));
|
||||
}).then(function(results) {
|
||||
return results.json();
|
||||
}).then(function(response) {
|
||||
if (response.error) {
|
||||
avideoAlert("<?php echo __("Sorry!"); ?>", response.msg, "error");
|
||||
modal.hidePleaseWait();
|
||||
} else {
|
||||
$(currentObject).closest('.panel').find('.playlistName').text(response.name);
|
||||
swal.stopLoading();
|
||||
swal.close();
|
||||
modal.hidePleaseWait();
|
||||
}
|
||||
}).catch(function(err) {
|
||||
if (err) {
|
||||
swal("Oh noes!", "The AJAX request failed!", "error");
|
||||
} else {
|
||||
swal.stopLoading();
|
||||
swal.close();
|
||||
}
|
||||
modal.hidePleaseWait();
|
||||
});;
|
||||
|
||||
});
|
||||
|
||||
$('.sortNow').click(function() {
|
||||
var $val = $(this).siblings("input").val();
|
||||
sortNow(this, $val);
|
||||
});
|
||||
|
||||
$('.video_order').keypress(function(e) {
|
||||
if (e.which == 13) {
|
||||
sortNow(this, $(this).val());
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
<!--
|
||||
channelPlaylist
|
||||
<?php
|
||||
$timesC[__LINE__] = microtime(true) - $startC;
|
||||
|
@ -519,11 +509,8 @@ PlayLists::loadScripts();
|
|||
}
|
||||
?>
|
||||
-->
|
||||
</div><!--/.container-->
|
||||
</div><!--/.container-->
|
||||
|
||||
<?php
|
||||
include $global['systemRootPath'] . 'view/include/footer.php';
|
||||
?>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
<?php
|
||||
$_page->print();
|
||||
?>
|
|
@ -644,29 +644,6 @@ img.rotate-90 {
|
|||
background-size: cover;
|
||||
}
|
||||
|
||||
#sidebar {
|
||||
width: 300px;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
height: 100vh;
|
||||
margin-top: 50px;
|
||||
}
|
||||
|
||||
#sideBarContainer {
|
||||
overflow: hidden;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
padding: 10px;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
overflow-y: auto;
|
||||
padding-right: 10px;
|
||||
}
|
||||
|
||||
#sideBarContainer ul {
|
||||
margin-bottom: 150px;
|
||||
}
|
||||
|
||||
.navbar-brand {
|
||||
padding: 0px;
|
||||
/* firefox bug fix */
|
||||
|
|
|
@ -1,36 +1,92 @@
|
|||
/* if it is IE */
|
||||
@media all and (-ms-high-contrast:none){
|
||||
@media all and (-ms-high-contrast:none) {
|
||||
nav ul.items-container li:first-child {
|
||||
display: block;
|
||||
flex: 0 1 auto; /* Default */
|
||||
flex: 0 1 auto;
|
||||
/* Default */
|
||||
}
|
||||
}
|
||||
|
||||
#buttonMyNavbar{
|
||||
|
||||
#sidebar {
|
||||
width: 300px;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
height: 100vh;
|
||||
margin-top: 50px;
|
||||
}
|
||||
|
||||
|
||||
body.youtube.compressedMenu #sidebar {
|
||||
width: 100px;
|
||||
}
|
||||
|
||||
body.youtube.compressedMenu #sidebar .menuLabel {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#sideBarContainer {
|
||||
overflow: hidden;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
padding: 10px;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
overflow-y: auto;
|
||||
padding-right: 10px;
|
||||
overflow: hidden;
|
||||
padding-right: 12px;
|
||||
}
|
||||
|
||||
#sideBarContainer:hover {
|
||||
overflow: auto;
|
||||
padding-right: 0;
|
||||
}
|
||||
|
||||
#sideBarContainer ul {
|
||||
margin-bottom: 150px;
|
||||
}
|
||||
|
||||
#sideBarContainer>ul>li>strong, .singleLineMenu {
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
body.youtube.compressedMenu #sideBarContainer li a{
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#buttonMyNavbar {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#mysearch.in,
|
||||
#mysearch.collapsing {
|
||||
display: block!important;
|
||||
display: block !important;
|
||||
}
|
||||
#myNavbar{
|
||||
|
||||
#myNavbar {
|
||||
display: block;
|
||||
}
|
||||
|
||||
#myNavbar.in,
|
||||
#myNavbar.collapsing {
|
||||
display: block!important;
|
||||
display: block !important;
|
||||
}
|
||||
|
||||
#searchForm {
|
||||
width: 100%;
|
||||
margin: 0 5px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
#searchForm > span.input-group-prepend > button{
|
||||
|
||||
#searchForm>span.input-group-prepend>button {
|
||||
|
||||
border-right-width: 0;
|
||||
}
|
||||
#searchForm > span.input-group-append > button{
|
||||
|
||||
#searchForm>span.input-group-append>button {
|
||||
|
||||
border-left-width: 0;
|
||||
}
|
||||
|
@ -46,11 +102,12 @@
|
|||
margin-left: -5px;
|
||||
margin-right: -5px;
|
||||
}
|
||||
|
||||
#filterDropdown.show .dropdown-menu {
|
||||
display: block;
|
||||
}
|
||||
|
||||
#rightProfileButton{
|
||||
#rightProfileButton {
|
||||
padding: 0;
|
||||
margin: 5px;
|
||||
border: 0;
|
||||
|
@ -58,64 +115,74 @@
|
|||
background-color: transparent;
|
||||
}
|
||||
|
||||
#rightLoginButton{
|
||||
#rightLoginButton {
|
||||
margin-left: 5px;
|
||||
margin-right: 40px;
|
||||
}
|
||||
|
||||
#navbarRegularButtons{
|
||||
#navbarRegularButtons {
|
||||
max-width: 70%;
|
||||
/* remove the scroll because the dropsown menus does not work */
|
||||
/*overflow-x: auto;*/
|
||||
/*overflow-y: hidden;*/
|
||||
}
|
||||
|
||||
#navbarRegularButtons span.hidden-mdx{
|
||||
#navbarRegularButtons span.hidden-mdx {
|
||||
max-width: 15vw;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
#navbarRegularButtons .btn{
|
||||
#navbarRegularButtons .btn {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
#navbarRegularButtons::-webkit-scrollbar {
|
||||
height: 4px;
|
||||
}
|
||||
#lastItemOnMenu{
|
||||
|
||||
#lastItemOnMenu {
|
||||
padding-right: 40px;
|
||||
}
|
||||
#mysearch{
|
||||
|
||||
#mysearch {
|
||||
height: auto !important;
|
||||
}
|
||||
#searchNavItem, #lastItemOnMenu{
|
||||
|
||||
#searchNavItem,
|
||||
#lastItemOnMenu {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
#lastItemOnMenu ul{
|
||||
|
||||
#lastItemOnMenu ul {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
@media (max-width : 767px) {
|
||||
#filterDropdown{
|
||||
#filterDropdown {
|
||||
position: absolute;
|
||||
top: 50px;
|
||||
left: 10px;
|
||||
}
|
||||
|
||||
#searchForm {
|
||||
margin: 0;
|
||||
display: flex;
|
||||
justify-content: center; /* center horizontally */
|
||||
align-items: center; /* center vertically */
|
||||
justify-content: center;
|
||||
/* center horizontally */
|
||||
align-items: center;
|
||||
/* center vertically */
|
||||
padding: 0 5px;
|
||||
}
|
||||
#rightLoginButton, #rightProfileButton{
|
||||
|
||||
#rightLoginButton,
|
||||
#rightProfileButton {
|
||||
margin-right: 5px;
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
#searchForm > div{
|
||||
#searchForm>div {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
|
@ -125,11 +192,12 @@
|
|||
right: 5px;
|
||||
}
|
||||
|
||||
#buttonMyNavbar, #searchNavItem{
|
||||
#buttonMyNavbar,
|
||||
#searchNavItem {
|
||||
display: block;
|
||||
}
|
||||
|
||||
#mysearch{
|
||||
#mysearch {
|
||||
width: 100%;
|
||||
display: none;
|
||||
position: absolute;
|
||||
|
@ -146,7 +214,7 @@
|
|||
min-width: 75vw;
|
||||
}
|
||||
|
||||
#myNavbar{
|
||||
#myNavbar {
|
||||
display: none;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
|
@ -155,50 +223,63 @@
|
|||
padding: 4px;
|
||||
width: 50%;
|
||||
}
|
||||
#mainNavBar .navbar-brand{
|
||||
|
||||
#mainNavBar .navbar-brand {
|
||||
width: 100% !important;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#mainNavBar .navbar-brand>img {
|
||||
display: unset;
|
||||
}
|
||||
|
||||
#myNavbar ul.right-menus{
|
||||
#myNavbar ul.right-menus {
|
||||
display: block;
|
||||
}
|
||||
|
||||
#myNavbar ul.right-menus li{
|
||||
#myNavbar ul.right-menus li {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
#myNavbar ul.right-menus .btn, #myNavbar ul.right-menus .btn-group{
|
||||
|
||||
#myNavbar ul.right-menus .btn,
|
||||
#myNavbar ul.right-menus .btn-group {
|
||||
margin: 2px;
|
||||
width: 100%;
|
||||
}
|
||||
#myNavbar ul.right-menus .btn-group{
|
||||
|
||||
#myNavbar ul.right-menus .btn-group {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
nav ul.items-container li:first-child {
|
||||
display: list-item;
|
||||
}
|
||||
|
||||
#navbarRegularButtons span.hidden-mdx {
|
||||
max-width: 100vw;
|
||||
}
|
||||
|
||||
.searchli {
|
||||
width: 100%;
|
||||
margin-right: 0;
|
||||
margin-left: 0;
|
||||
|
||||
}
|
||||
|
||||
.navbar-toggle {
|
||||
margin-right: 5px !important;
|
||||
|
||||
|
||||
}
|
||||
#navbarRegularButtons, #lastItemOnMenu, .left-side {
|
||||
|
||||
#navbarRegularButtons,
|
||||
#lastItemOnMenu,
|
||||
.left-side {
|
||||
padding: 0 5px;
|
||||
}
|
||||
.searchul{
|
||||
|
||||
.searchul {
|
||||
padding-left: 0px;
|
||||
}
|
||||
}
|
||||
|
@ -206,25 +287,32 @@
|
|||
li.navsub-toggle .badge {
|
||||
float: right;
|
||||
}
|
||||
li.navsub-toggle a + ul {
|
||||
|
||||
li.navsub-toggle a+ul {
|
||||
padding-left: 15px;
|
||||
}
|
||||
|
||||
.navbar-lang-btn .select2-container{
|
||||
.navbar-lang-btn .select2-container {
|
||||
margin: 8px 0;
|
||||
}
|
||||
.navbar-lang-btn .select2-selection{
|
||||
|
||||
.navbar-lang-btn .select2-selection {
|
||||
border-color: #00000077 !important;
|
||||
}
|
||||
|
||||
@media screen and (min-width: 992px) {
|
||||
|
||||
body.youtube{
|
||||
body.youtube {
|
||||
margin-left: 300px;
|
||||
}
|
||||
body.youtube div.container-fluid .col-sm-10.col-sm-offset-1.list-group-item{
|
||||
|
||||
body.youtube div.container-fluid .col-sm-10.col-sm-offset-1.list-group-item {
|
||||
margin-left: 0;
|
||||
margin-right: 0;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
body.youtube.compressedMenu {
|
||||
margin-left: 100px;
|
||||
}
|
||||
}
|
|
@ -153,7 +153,7 @@ if (!empty($_COOKIE['forKids'])) {
|
|||
$checked = 'checked';
|
||||
}
|
||||
?>
|
||||
<label for="forKids" class="row-label">
|
||||
<label for="forKids" class="row-label singleLineMenu">
|
||||
<?php
|
||||
echo createColorfulTextSpans(__('For Kids'));
|
||||
?>
|
||||
|
|
|
@ -11,8 +11,10 @@ global $avideoLayout;
|
|||
<li>
|
||||
<div>
|
||||
<a href="<?php echo getHomePageURL(); ?>" class="btn btn-primary btn-block " style="border-radius: 4px 4px 0 0;">
|
||||
<span class="fa fa-home"></span>
|
||||
<?php echo __("Home"); ?>
|
||||
<i class="fa-solid fa-house"></i>
|
||||
<span class="menuLabel">
|
||||
<?php echo __("Home"); ?>
|
||||
</span>
|
||||
</a>
|
||||
</div>
|
||||
</li>
|
||||
|
@ -24,7 +26,9 @@ global $avideoLayout;
|
|||
<div>
|
||||
<a href="#" onclick="avideoModalIframeFull(webSiteRootURL + 'epg');return false;" class="btn btn-primary btn-block " style="border-radius: 0 0 0 0;">
|
||||
<i class="fas fa-stream"></i>
|
||||
<?php echo __("EPG"); ?>
|
||||
<span class="menuLabel">
|
||||
<?php echo __("EPG"); ?>
|
||||
</span>
|
||||
</a>
|
||||
|
||||
</div>
|
||||
|
@ -33,7 +37,9 @@ global $avideoLayout;
|
|||
<div>
|
||||
<a href="#" onclick="avideoModalIframeFull(webSiteRootURL + 'tv');return false;" class="btn btn-primary btn-block " style="border-radius: 0 0 0 0;">
|
||||
<i class="fas fa-tv"></i>
|
||||
<?php echo __("TV"); ?>
|
||||
<span class="menuLabel">
|
||||
<?php echo __("TV"); ?>
|
||||
</span>
|
||||
</a>
|
||||
|
||||
</div>
|
||||
|
@ -47,7 +53,9 @@ global $avideoLayout;
|
|||
<div>
|
||||
<a href="<?php echo $global['webSiteRootURL']; ?>trending" class="btn btn-primary btn-block " style="border-radius: 0 0 4px 4px;">
|
||||
<i class="fas fa-fire"></i>
|
||||
<?php echo __("Trending"); ?>
|
||||
<span class="menuLabel">
|
||||
<?php echo __("Trending"); ?>
|
||||
</span>
|
||||
</a>
|
||||
|
||||
</div>
|
||||
|
@ -58,10 +66,15 @@ global $avideoLayout;
|
|||
?>
|
||||
<li>
|
||||
<button type="button" class="btn btn-success btn-block" onclick="swapUser(0);">
|
||||
<i class="fas fa-backspace"></i> <i class="fas fa-user-friends"></i> <?php echo __("Back to"); ?> <?php echo User::getNameIdentificationById(User::isSwapBackActive()); ?>
|
||||
<i class="fas fa-backspace"></i>
|
||||
<i class="fas fa-user-friends"></i>
|
||||
<span class="menuLabel">
|
||||
<?php echo __("Back to"); ?>
|
||||
<?php echo User::getNameIdentificationById(User::isSwapBackActive()); ?>
|
||||
</span>
|
||||
</button>
|
||||
</li>
|
||||
<?php
|
||||
<?php
|
||||
}
|
||||
if (Video::videoMadeForKidsExists()) {
|
||||
?>
|
||||
|
@ -75,7 +88,7 @@ global $avideoLayout;
|
|||
?>
|
||||
</div>
|
||||
</li>
|
||||
<?php
|
||||
<?php
|
||||
}
|
||||
//var_dump(Video::videoMadeForKidsExists());exit;
|
||||
if (empty($advancedCustomUser->doNotShowLeftProfile)) {
|
||||
|
@ -100,7 +113,10 @@ global $avideoLayout;
|
|||
<i class="fas fa-lock-open text-muted" style="opacity: 0.2;"></i>
|
||||
<?php }
|
||||
?>
|
||||
<i class="fas fa-sign-out-alt"></i> <?php echo __("Sign out"); ?>
|
||||
<i class="fas fa-sign-out-alt"></i>
|
||||
<span class="menuLabel">
|
||||
<?php echo __("Sign out"); ?>
|
||||
</span>
|
||||
</a>
|
||||
</div>
|
||||
<?php }
|
||||
|
@ -111,10 +127,9 @@ global $avideoLayout;
|
|||
<div class="pull-left" style="margin-left: 10px;">
|
||||
<img src="<?php echo User::getPhoto(); ?>" style="max-width: 55px;" class="img img-thumbnail img-responsive img-circle" />
|
||||
</div>
|
||||
<div style="margin-left: 80px;">
|
||||
<div style="margin-left: 80px;" class="menuLabel">
|
||||
<strong class="text-danger"><?php echo User::getName(); ?></strong>
|
||||
<div><small><?php echo User::getMail(); ?></small></div>
|
||||
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
|
@ -122,7 +137,9 @@ global $avideoLayout;
|
|||
<div>
|
||||
<a href="<?php echo $global['webSiteRootURL']; ?>user" class="btn btn-primary btn-block" style="border-radius: 4px 4px 0 0;">
|
||||
<span class="fa fa-user-circle"></span>
|
||||
<?php echo __("My Account"); ?>
|
||||
<span class="menuLabel">
|
||||
<?php echo __("My Account"); ?>
|
||||
</span>
|
||||
</a>
|
||||
|
||||
</div>
|
||||
|
@ -137,7 +154,9 @@ global $avideoLayout;
|
|||
return false;" class="btn btn-success btn-block" style="border-radius: 0;">
|
||||
<i class="fa-solid fa-film"></i>
|
||||
<i class="fa-solid fa-headphones"></i>
|
||||
<?php echo __("My videos"); ?>
|
||||
<span class="menuLabel">
|
||||
<?php echo __("My videos"); ?>
|
||||
</span>
|
||||
</a>
|
||||
</div>
|
||||
</li>
|
||||
|
@ -149,7 +168,9 @@ global $avideoLayout;
|
|||
<a href="#" onclick="avideoModalIframeFull('<?php echo User::getChannelLink(); ?>');
|
||||
return false;" class="btn btn-danger btn-block" style="border-radius: 0;">
|
||||
<span class="fas fa-play-circle"></span>
|
||||
<?php echo __($advancedCustomUser->MyChannelLabel); ?>
|
||||
<span class="menuLabel">
|
||||
<?php echo __($advancedCustomUser->MyChannelLabel); ?>
|
||||
</span>
|
||||
</a>
|
||||
|
||||
</div>
|
||||
|
@ -164,7 +185,9 @@ global $avideoLayout;
|
|||
<a href="#" onclick="avideoModalIframeFull(webSiteRootURL + 'charts');
|
||||
return false;" class="btn btn-default btn-block" style="border-radius: 0;">
|
||||
<span class="fas fa-tachometer-alt"></span>
|
||||
<?php echo __("Dashboard"); ?>
|
||||
<span class="menuLabel">
|
||||
<?php echo __("Dashboard"); ?>
|
||||
</span>
|
||||
</a>
|
||||
</div>
|
||||
</li>
|
||||
|
@ -177,7 +200,9 @@ global $avideoLayout;
|
|||
<a href="#" onclick="avideoModalIframeFull(webSiteRootURL + 'subscribes');
|
||||
return false;" class="btn btn-default btn-block" style="border-radius: 0">
|
||||
<span class="fa fa-check"></span>
|
||||
<?php echo __("My Subscribers"); ?>
|
||||
<span class="menuLabel">
|
||||
<?php echo __("My Subscribers"); ?>
|
||||
</span>
|
||||
</a>
|
||||
</div>
|
||||
</li>
|
||||
|
@ -190,7 +215,8 @@ global $avideoLayout;
|
|||
<a href="#" onclick="avideoModalIframeFull(webSiteRootURL + 'categories');
|
||||
return false;" class="btn btn-default btn-block" style="border-radius: 0;">
|
||||
<i class="fa-solid fa-list"></i>
|
||||
<?php echo __($advancedCustom->CategoryLabel); ?>
|
||||
<span class="menuLabel">
|
||||
<?php echo __($advancedCustom->CategoryLabel); ?>
|
||||
</a>
|
||||
</div>
|
||||
</li>
|
||||
|
@ -201,7 +227,9 @@ global $avideoLayout;
|
|||
<a href="#" onclick="avideoModalIframeFull(webSiteRootURL + 'comments');
|
||||
return false;" class="btn btn-default btn-block" style="border-radius: 0 0 4px 4px;">
|
||||
<span class="fa fa-comment"></span>
|
||||
<?php echo __("Comments"); ?>
|
||||
<span class="menuLabel">
|
||||
<?php echo __("Comments"); ?>
|
||||
</span>
|
||||
</a>
|
||||
</div>
|
||||
</li>
|
||||
|
@ -217,7 +245,9 @@ global $avideoLayout;
|
|||
<div>
|
||||
<a href="<?php echo $global['webSiteRootURL']; ?>user" class="btn btn-success btn-block line_<?php echo __LINE__; ?>">
|
||||
<i class="fas fa-sign-in-alt"></i>
|
||||
<?php echo __("Login"); ?>
|
||||
<span class="menuLabel">
|
||||
<?php echo __("Login"); ?>
|
||||
</span>
|
||||
</a>
|
||||
</div>
|
||||
</li>
|
||||
|
@ -236,74 +266,93 @@ global $avideoLayout;
|
|||
<a href="#" onclick="avideoModalIframeFull(webSiteRootURL + 'admin/');
|
||||
return false;">
|
||||
<i class="fas fa-star"></i>
|
||||
<?php echo __("Admin Panel"); ?>
|
||||
<span class="menuLabel">
|
||||
<?php echo __("Admin Panel"); ?>
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#" onclick="avideoModalIframeFull(webSiteRootURL + 'users');
|
||||
return false;">
|
||||
<i class="fa-solid fa-user"></i>
|
||||
<?php echo __("Users"); ?>
|
||||
<span class="menuLabel">
|
||||
<?php echo __("Users"); ?>
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#" onclick="avideoModalIframeFull(webSiteRootURL + 'usersGroups');
|
||||
return false;">
|
||||
<span class="fa fa-users"></span>
|
||||
<?php echo __("Users Groups"); ?>
|
||||
<span class="menuLabel">
|
||||
<?php echo __("Users Groups"); ?>
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#" onclick="avideoModalIframeFull(webSiteRootURL + 'categories');
|
||||
return false;">
|
||||
<i class="fa-solid fa-list"></i>
|
||||
<?php echo __($advancedCustom->CategoryLabel); ?>
|
||||
<span class="menuLabel">
|
||||
<?php echo __($advancedCustom->CategoryLabel); ?>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#" onclick="avideoModalIframeFull(webSiteRootURL + 'update');
|
||||
return false;">
|
||||
<i class="fa-solid fa-arrows-rotate"></i>
|
||||
<?php echo __("Update version"); ?>
|
||||
<?php
|
||||
if (!empty($updateFiles)) {
|
||||
?><span class="label label-danger"><?php echo count($updateFiles); ?></span><?php }
|
||||
?>
|
||||
<span class="menuLabel">
|
||||
<?php echo __("Update version"); ?>
|
||||
<?php
|
||||
if (!empty($updateFiles)) {
|
||||
?>
|
||||
<span class="label label-danger"><?php echo count($updateFiles); ?></span>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#" onclick="avideoModalIframeFull(webSiteRootURL + 'siteConfigurations');
|
||||
return false;">
|
||||
<i class="fa-solid fa-gear"></i>
|
||||
<?php echo __("Site Configurations"); ?>
|
||||
<span class="menuLabel">
|
||||
<?php echo __("Site Configurations"); ?>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#" onclick="avideoModalIframeFull(webSiteRootURL + 'plugins');
|
||||
return false;">
|
||||
<i class="fas fa-puzzle-piece"></i>
|
||||
<?php echo __("Plugins"); ?>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#" class="clearCacheFirstPageButton">
|
||||
<i class="fa fa-trash"></i> <?php echo __("Clear First Page Cache"); ?>
|
||||
<span class="menuLabel">
|
||||
<?php echo __("Plugins"); ?>
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#" class="clearCacheButton">
|
||||
<i class="fa fa-trash"></i> <?php echo __("Clear Cache Directory"); ?>
|
||||
<i class="fa fa-trash"></i>
|
||||
<span class="menuLabel">
|
||||
<?php echo __("Clear Cache Directory"); ?>
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#" onclick="avideoModalIframeFull(webSiteRootURL + 'i/log');
|
||||
return false;" class="">
|
||||
<i class="fas fa-clipboard-list"></i> <?php echo __("Log file"); ?>
|
||||
<i class="fas fa-clipboard-list"></i>
|
||||
<span class="menuLabel">
|
||||
<?php echo __("Log file"); ?>
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#" class="generateSiteMapButton">
|
||||
<i class="fa fa-sitemap"></i> <?php echo __("Generate Sitemap"); ?>
|
||||
<i class="fa fa-sitemap"></i>
|
||||
<span class="menuLabel">
|
||||
<?php echo __("Generate Sitemap"); ?>
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
@ -317,7 +366,9 @@ global $avideoLayout;
|
|||
<li>
|
||||
<a href="#" onclick="avideoModalIframeFull(webSiteRootURL+\'users\');return false;">
|
||||
<i class="fa-solid fa-user"></i>
|
||||
<span class="menuLabel">
|
||||
<?php echo __("Users"); ?>
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
<?php
|
||||
|
@ -328,7 +379,9 @@ global $avideoLayout;
|
|||
<li>
|
||||
<a href="#" onclick="avideoModalIframeFull(webSiteRootURL+\'usersGroups\');return false;">
|
||||
<span class="fa fa-users"></span>
|
||||
<span class="menuLabel">
|
||||
<?php echo __("Users Groups"); ?>
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
<?php
|
||||
|
@ -336,14 +389,12 @@ global $avideoLayout;
|
|||
}
|
||||
if (Permissions::canClearCache()) {
|
||||
$menus[] = '?>
|
||||
<li>
|
||||
<a href="#" class="clearCacheFirstPageButton">
|
||||
<i class="fa fa-trash"></i> <?php echo __("Clear First Page Cache"); ?>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#" class="clearCacheButton">
|
||||
<i class="fa fa-trash"></i> <?php echo __("Clear Cache Directory"); ?>
|
||||
<i class="fa fa-trash"></i>
|
||||
<span class="menuLabel">
|
||||
<?php echo __("Clear Cache Directory"); ?>
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
<?php
|
||||
|
@ -353,7 +404,10 @@ global $avideoLayout;
|
|||
$menus[] = ' ?>
|
||||
<li>
|
||||
<a href="#" onclick="avideoModalIframeFull(webSiteRootURL+\'i/log\');return false;" class="">
|
||||
<i class="fas fa-clipboard-list"></i> <?php echo __("Log file"); ?>
|
||||
<i class="fas fa-clipboard-list"></i>
|
||||
<span class="menuLabel">
|
||||
<?php echo __("Log file"); ?>
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
<?php
|
||||
|
@ -363,7 +417,10 @@ global $avideoLayout;
|
|||
$menus[] = '?>
|
||||
<li>
|
||||
<a href="#" class="generateSiteMapButton">
|
||||
<i class="fa fa-sitemap"></i> <?php echo __("Generate Sitemap"); ?>
|
||||
<i class="fa fa-sitemap"></i>
|
||||
<span class="menuLabel">
|
||||
<?php echo __("Generate Sitemap"); ?>
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
<?php
|
||||
|
@ -393,19 +450,25 @@ global $avideoLayout;
|
|||
<li class="nav-item <?php echo empty($_SESSION['type']) ? "active" : ""; ?>">
|
||||
<a class="nav-link " href="<?php echo $global['webSiteRootURL']; ?>?type=all">
|
||||
<i class="fa-solid fa-star"></i>
|
||||
<?php echo __("Audio and Video"); ?>
|
||||
<span class="menuLabel">
|
||||
<?php echo __("Audio and Video"); ?>
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item <?php echo (!empty($_SESSION['type']) && $_SESSION['type'] == 'video' && empty($_REQUEST['catName'])) ? "active" : ""; ?>">
|
||||
<a class="nav-link " href="<?php echo $global['webSiteRootURL']; ?>videoOnly">
|
||||
<i class="fa-solid fa-video"></i>
|
||||
<?php echo __("Videos"); ?>
|
||||
<span class="menuLabel">
|
||||
<?php echo __("Videos"); ?>
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item <?php echo (!empty($_SESSION['type']) && $_SESSION['type'] == 'audio' && empty($_REQUEST['catName'])) ? "active" : ""; ?>">
|
||||
<a class="nav-link" href="<?php echo $global['webSiteRootURL']; ?>audioOnly">
|
||||
<i class="fa-solid fa-headphones"></i>
|
||||
<?php echo __("Audio"); ?>
|
||||
<span class="menuLabel">
|
||||
<?php echo __("Audio"); ?>
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
<?php }
|
||||
|
@ -425,7 +488,9 @@ global $avideoLayout;
|
|||
<a href="#" onclick="avideoModalIframeFull(webSiteRootURL + 'channels');
|
||||
return false;">
|
||||
<i class="fa fa-search"></i>
|
||||
<?php echo __("Browse Channels"); ?>
|
||||
<span class="menuLabel">
|
||||
<?php echo __("Browse Channels"); ?>
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
|
@ -442,7 +507,9 @@ global $avideoLayout;
|
|||
<strong>
|
||||
<a href="#" onclick="avideoModalIframeFull(webSiteRootURL + 'listCategories');
|
||||
return false;" class="text-danger">
|
||||
<?php echo __($advancedCustom->CategoryLabel); ?>
|
||||
<span class="menuLabel">
|
||||
<?php echo __($advancedCustom->CategoryLabel); ?>
|
||||
</span>
|
||||
</a>
|
||||
</strong>
|
||||
</li>
|
||||
|
@ -515,7 +582,8 @@ global $avideoLayout;
|
|||
//$parsed_cats[] = $value['id'];
|
||||
echo '<li class="navsub-toggle ' . ($value['clean_name'] == @$_REQUEST['catName'] ? "active" : "") . '">'
|
||||
. '<a href="' . Category::getCategoryLinkFromName($value['clean_name']) . '" >';
|
||||
echo '<span class="' . (empty($value['iconClass']) ? "fa fa-folder" : $value['iconClass']) . '"></span> ' . __($value['name']);
|
||||
echo '<span class="' . (empty($value['iconClass']) ? "fa fa-folder" : $value['iconClass']) . '"></span>
|
||||
<span class="menuLabel">' . __($value['name']) . '</span>';
|
||||
if (empty($advancedCustom->hideCategoryVideosCount)) {
|
||||
echo ' <span class="badge">' . $total . '</span>';
|
||||
}
|
||||
|
@ -536,7 +604,10 @@ global $avideoLayout;
|
|||
<li class="nav-item ">
|
||||
<a class="nav-link " href="#" onclick="avideoModalIframeFull(webSiteRootURL + 'listCategories');return false;">
|
||||
<i class="fas fa-list"></i>
|
||||
<?php echo __($advancedCustom->CategoryLabel); ?></a>
|
||||
<span class="menuLabel">
|
||||
<?php echo __($advancedCustom->CategoryLabel); ?>
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
<?php
|
||||
}
|
||||
|
@ -554,7 +625,9 @@ global $avideoLayout;
|
|||
<a class="nav-link" href="#" onclick="A2HSInstall();
|
||||
return false;">
|
||||
<i class="fas fa-arrow-alt-circle-down"></i>
|
||||
<?php echo __("Install"); ?>
|
||||
<span class="menuLabel">
|
||||
<?php echo __("Install"); ?>
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
<?php
|
||||
|
@ -565,7 +638,9 @@ global $avideoLayout;
|
|||
<a class="nav-link" href="#" onclick="avideoModalIframeFull(webSiteRootURL + 'playLink');
|
||||
return false;">
|
||||
<i class="fas fa-play-circle"></i>
|
||||
<?php echo __("Play a Link"); ?>
|
||||
<span class="menuLabel">
|
||||
<?php echo __("Play a Link"); ?>
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
<?php
|
||||
|
@ -576,7 +651,9 @@ global $avideoLayout;
|
|||
<a href="#" onclick="avideoModalIframeFull(webSiteRootURL + 'help');
|
||||
return false;">
|
||||
<i class="fa-solid fa-circle-question"></i>
|
||||
<?php echo __("Help"); ?>
|
||||
<span class="menuLabel">
|
||||
<?php echo __("Help"); ?>
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
<?php
|
||||
|
@ -588,7 +665,9 @@ global $avideoLayout;
|
|||
<a href="#" onclick="avideoModalIframeFull(webSiteRootURL + 'about');
|
||||
return false;">
|
||||
<i class="fa-solid fa-circle-info"></i>
|
||||
<?php echo __("About"); ?>
|
||||
<span class="menuLabel">
|
||||
<?php echo __("About"); ?>
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
<?php
|
||||
|
@ -600,7 +679,9 @@ global $avideoLayout;
|
|||
<a href="#" onclick="avideoModalIframeFull(webSiteRootURL + 'contact');
|
||||
return false;">
|
||||
<i class="fa-solid fa-comment"></i>
|
||||
<?php echo __("Contact"); ?>
|
||||
<span class="menuLabel">
|
||||
<?php echo __("Contact"); ?>
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
<?php }
|
||||
|
@ -608,3 +689,22 @@ global $avideoLayout;
|
|||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
// Loop through each li in the sidebar that directly contains a .menuLabel
|
||||
$('#sideBarContainer ul.nav li').has('.menuLabel').each(function() {
|
||||
// Since the .menuLabel might not be a direct child, let's adjust the selector to find it correctly
|
||||
var menuLabelText = $(this).find('.menuLabel').first().text().trim();
|
||||
|
||||
// Set the title attribute of the li to the menuLabel text
|
||||
$(this).attr('title', menuLabelText);
|
||||
|
||||
// Initialize tooltip for this li
|
||||
$(this).tooltip({
|
||||
container: 'body',
|
||||
html: true,
|
||||
placement: 'right' // Adjust the placement as needed
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
|
@ -72,9 +72,12 @@ if (!empty($videoSerie)) {
|
|||
if ($count == $playlist_index) {
|
||||
$class .= " active";
|
||||
$indicator = '<span class="fa fa-play text-danger"></span>';
|
||||
} ?>
|
||||
}
|
||||
|
||||
$plURL = PlayLists::getURL($playlist_id, $count, $value["channelName"], $playlist->getName(), $value['clean_title']);
|
||||
?>
|
||||
<li class="<?php echo $class; ?>">
|
||||
<a href="<?php echo $global['webSiteRootURL']; ?>program/<?php echo $playlist_id; ?>/<?php echo $count . "/" . urlencode(cleanURLName(@$value["channelName"])) . "/" . urlencode(cleanURLName($playlist->getName())) . "/" . (@$value['clean_title']); ?>" title="<?php echo $value['title']; ?>" class="videoLink row">
|
||||
<a href="<?php echo $plURL; ?>" title="<?php echo str_replace('"', '', $value['title']); ?>" class="videoLink row">
|
||||
<div class="col-md-1 col-sm-1 col-xs-1">
|
||||
<?php echo $indicator; ?>
|
||||
</div>
|
||||
|
|
|
@ -71,7 +71,7 @@ if (!empty($evideo)) {
|
|||
TimeLogEnd($timeLogNameMY, __LINE__, $TimeLogLimitMY);
|
||||
if (empty($_GET['playlist_id']) && !empty($_GET['playlist_name'])) {
|
||||
$_GET['playlist_id'] = $_GET['playlist_name'];
|
||||
}else if (empty($_GET['playlist_id']) && !empty($_GET['playlists_id'])) {
|
||||
} else if (empty($_GET['playlist_id']) && !empty($_GET['playlists_id'])) {
|
||||
$_GET['playlist_id'] = $_GET['playlists_id'];
|
||||
}/*
|
||||
else{
|
||||
|
@ -86,22 +86,22 @@ if (!empty($evideo)) {
|
|||
$playListData = $plp->getPlayListData();
|
||||
//var_dump($_GET['playlist_id'], $_GET['playlists_tags_id'], $playListData, $messagesFromPlayList);exit;
|
||||
if (!$plp->canSee()) {
|
||||
forbiddenPage(_('You cannot see this playlist').' '.basename(__FILE__));
|
||||
forbiddenPage(_('You cannot see this playlist') . ' ' . basename(__FILE__));
|
||||
}
|
||||
$playListData = $plp->getPlayListData();
|
||||
//var_dump($playListData);exit;
|
||||
if (empty($playListData)) {
|
||||
if(empty($messagesFromPlayList)){
|
||||
if (empty($messagesFromPlayList)) {
|
||||
$messagesFromPlayList = array();
|
||||
}
|
||||
_error_log(implode(PHP_EOL."Playlist error: playlist_id={$_GET['playlist_id']}, playlists_tags_id={$_GET['playlists_tags_id']} - ", $messagesFromPlayList));
|
||||
_error_log(implode(PHP_EOL . "Playlist error: playlist_id={$_GET['playlist_id']}, playlists_tags_id={$_GET['playlists_tags_id']} - ", $messagesFromPlayList));
|
||||
|
||||
$notFoundMessage = PlayLists::getPlaylistNotFoundMessage($_GET['playlist_id']);
|
||||
videoNotFound($notFoundMessage);
|
||||
}
|
||||
|
||||
$video = $plp->getCurrentVideo();
|
||||
if(!empty($video)){
|
||||
if (!empty($video)) {
|
||||
$_getVideos_id = intval($video['id']);
|
||||
$playlist_index = $plp->getIndex();
|
||||
$videosPlayList = $plp->getVideos();
|
||||
|
@ -190,7 +190,6 @@ if (!empty($evideo)) {
|
|||
}
|
||||
TimeLogEnd($timeLogNameMY, __LINE__, $TimeLogLimitMY);
|
||||
}
|
||||
|
||||
$modeYouTubeTimeLog['Code part 2'] = microtime(true) - $modeYouTubeTime;
|
||||
$modeYouTubeTime = microtime(true);
|
||||
if (!empty($video) && !empty($video['users_id'])) {
|
||||
|
@ -260,35 +259,35 @@ if (!empty($evideo)) {
|
|||
if (empty($_GET['videoName']) && !empty($video) && !empty($video['clean_title'])) {
|
||||
$_GET['videoName'] = $video['clean_title'];
|
||||
}
|
||||
if(!empty($video)){
|
||||
if (!empty($video)) {
|
||||
$v = Video::getVideo($video['id'], "", true, false, false, true);
|
||||
}else if (!empty($_GET['videoName'])) {
|
||||
} else if (!empty($_GET['videoName'])) {
|
||||
$v = Video::getVideoFromCleanTitle($_GET['videoName']);
|
||||
}
|
||||
if (empty($v) && empty($videosPlayList[$playlist_index]['id'])) {
|
||||
if($_GET['playlist_id'] == 'favorite' || $_GET['playlist_id'] == 'watch-later'){
|
||||
if($_GET['playlist_id'] == 'favorite'){
|
||||
if ($_GET['playlist_id'] == 'favorite' || $_GET['playlist_id'] == 'watch-later') {
|
||||
if ($_GET['playlist_id'] == 'favorite') {
|
||||
$msg = __('Your Favorite playlist is waiting to be filled! Start exploring and add the videos you love the most.');
|
||||
}else{
|
||||
} else {
|
||||
$msg = __('Oops! Your Watch Later playlist is empty. Don\'t worry, we have plenty of exciting videos for you to choose from and add here.');
|
||||
}
|
||||
$url = addQueryStringParameter($global['webSiteRootURL'], 'msg', $msg);
|
||||
header("location: {$url}");
|
||||
exit;
|
||||
}else if(!empty($video['id'])){
|
||||
} else if (!empty($video['id'])) {
|
||||
$response = Video::whyUserCannotWatchVideo(User::getId(), @$video['id']);
|
||||
$html = "<ul><li>".implode('</li><li>', $response->why)."</li></ul>";
|
||||
$html = "<ul><li>" . implode('</li><li>', $response->why) . "</li></ul>";
|
||||
videoNotFound($html);
|
||||
}else{
|
||||
} else {
|
||||
AVideoPlugin::getModeYouTube($videos_id);
|
||||
forbiddenPage('We could not load the video');
|
||||
}
|
||||
}
|
||||
TimeLogEnd($timeLogNameMY, __LINE__, $TimeLogLimitMY);
|
||||
}
|
||||
|
||||
//_error_log('AVideoPlugin::getModeYouTube');
|
||||
AVideoPlugin::getModeYouTube($videos_id);
|
||||
|
||||
//var_dump(__LINE__);exit;
|
||||
TimeLogEnd($timeLogNameMY, __LINE__, $TimeLogLimitMY);
|
||||
|
||||
// video not found
|
||||
|
@ -301,9 +300,9 @@ if (empty($video)) {
|
|||
$vid->save();
|
||||
_error_log('Missing files recovered ' . $_GET['v']);
|
||||
} else {
|
||||
if(!User::isLogged()){
|
||||
if (!User::isLogged()) {
|
||||
gotToLoginAndComeBackHere();
|
||||
}else{
|
||||
} else {
|
||||
$msg = 'ERROR 1: The video ID [' . $_GET['v'] . '] is not available: status=' . Video::$statusDesc[$vid->getStatus()];
|
||||
videoNotFound($msg);
|
||||
}
|
||||
|
@ -314,9 +313,9 @@ if (empty($video)) {
|
|||
videoNotFound($msg);
|
||||
exit;
|
||||
} else {
|
||||
if(!User::isLogged()){
|
||||
if (!User::isLogged()) {
|
||||
gotToLoginAndComeBackHere();
|
||||
}else{
|
||||
} else {
|
||||
$msg = 'ERROR 2: The video ID [' . $_GET['v'] . '] is not available: status=' . Video::$statusDesc[$vid->getStatus()];
|
||||
videoNotFound($msg);
|
||||
}
|
||||
|
@ -352,78 +351,62 @@ if (!empty($video['users_id']) && User::hasBlockedUser($video['users_id'])) {
|
|||
|
||||
TimeLogEnd($timeLogNameMY, __LINE__, $TimeLogLimitMY);
|
||||
global $nonCriticalCSS;
|
||||
|
||||
$_page = new Page(array($titleTag));
|
||||
$_page->setExtraStyles(
|
||||
array(
|
||||
'node_modules/video.js/dist/video-js.min.css',
|
||||
'plugin/Gallery/style.css'
|
||||
)
|
||||
);
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html lang="<?php echo getLanguage(); ?>" prefix="og: http://ogp.me/ns#">
|
||||
<head>
|
||||
<title><?php echo $titleTag; ?></title>
|
||||
<link href="<?php echo getURL('node_modules/video.js/dist/video-js.min.css'); ?>" rel="stylesheet" type="text/css" />
|
||||
<link href="<?php echo getCDN('plugin/Gallery/style.css'); ?>" rel="stylesheet" type="text/css"/>
|
||||
<?php
|
||||
TimeLogEnd($timeLogNameMY, __LINE__, $TimeLogLimitMY);
|
||||
include $global['systemRootPath'] . 'view/include/head.php';
|
||||
?>
|
||||
</head>
|
||||
|
||||
<body class="<?php echo $global['bodyClass']; ?>">
|
||||
<?php
|
||||
TimeLogEnd($timeLogNameMY, __LINE__, $TimeLogLimitMY);
|
||||
include $global['systemRootPath'] . 'view/include/navbar.php';
|
||||
|
||||
TimeLogEnd($timeLogNameMY, __LINE__, $TimeLogLimitMY);
|
||||
if (!empty($advancedCustomUser->showChannelBannerOnModeYoutube)) {
|
||||
?>
|
||||
<div class="container" style="margin-bottom: 10px;">
|
||||
<img src="<?php echo User::getBackground($video['users_id']); ?>" class="img img-responsive" />
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<!-- view modeYoutube.php -->
|
||||
<div class="container-fluid principalContainer avideoLoadPage" id="modeYoutubePrincipal" style="overflow: hidden;">
|
||||
<?php
|
||||
if (!empty($video)) {
|
||||
if (empty($video['type'])) {
|
||||
$video['type'] = "video";
|
||||
}
|
||||
|
||||
TimeLogEnd($timeLogNameMY, __LINE__, $TimeLogLimitMY);
|
||||
require "{$global['systemRootPath']}view/modeYoutubeBundle.php";
|
||||
|
||||
TimeLogEnd($timeLogNameMY, __LINE__, $TimeLogLimitMY);
|
||||
} else {
|
||||
?>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<div class="alert alert-warning">
|
||||
<i class="fa-solid fa-video"></i>
|
||||
<strong><?php echo __("Attention"); ?>!</strong> <?php echo empty($advancedCustom->videoNotFoundText->value) ? __("We have not found any videos or audios to show") : $advancedCustom->videoNotFoundText->value; ?>.
|
||||
</div>
|
||||
<?php }
|
||||
?>
|
||||
</div>
|
||||
<?php
|
||||
include $global['systemRootPath'] . 'view/include/video.min.js.php';
|
||||
echo AVideoPlugin::afterVideoJS();
|
||||
include $global['systemRootPath'] . 'view/include/footer.php';
|
||||
TimeLogEnd($timeLogNameMY, __LINE__, $TimeLogLimitMY);
|
||||
?>
|
||||
<script src="<?php echo getURL('view/js/BootstrapMenu.min.js'); ?>node_modules/videojs-playlist/dist/videojs-playlist.min.js"></script>
|
||||
<script>
|
||||
var fading = false;
|
||||
</script>
|
||||
|
||||
<?php
|
||||
showCloseButton();
|
||||
|
||||
TimeLogEnd($timeLogNameMY, __LINE__, $TimeLogLimitMY);
|
||||
?>
|
||||
</body>
|
||||
</html>
|
||||
<?php
|
||||
include $global['systemRootPath'] . 'objects/include_end.php';
|
||||
if (!empty($advancedCustomUser->showChannelBannerOnModeYoutube)) {
|
||||
?>
|
||||
<div class="container" style="margin-bottom: 10px;">
|
||||
<img src="<?php echo User::getBackground($video['users_id']); ?>" class="img img-responsive" />
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<!-- view modeYoutube.php -->
|
||||
<div class="container-fluid principalContainer avideoLoadPage" id="modeYoutubePrincipal" style="overflow: hidden;">
|
||||
<?php
|
||||
if (!empty($video)) {
|
||||
if (empty($video['type'])) {
|
||||
$video['type'] = "video";
|
||||
}
|
||||
|
||||
TimeLogEnd($timeLogNameMY, __LINE__, $TimeLogLimitMY);
|
||||
require "{$global['systemRootPath']}view/modeYoutubeBundle.php";
|
||||
TimeLogEnd($timeLogNameMY, __LINE__, $TimeLogLimitMY);
|
||||
} else {
|
||||
?>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<div class="alert alert-warning">
|
||||
<i class="fa-solid fa-video"></i>
|
||||
<strong><?php echo __("Attention"); ?>!</strong> <?php echo empty($advancedCustom->videoNotFoundText->value) ? __("We have not found any videos or audios to show") : $advancedCustom->videoNotFoundText->value; ?>.
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<?php
|
||||
include $global['systemRootPath'] . 'view/include/video.min.js.php';
|
||||
echo AVideoPlugin::afterVideoJS();
|
||||
TimeLogEnd($timeLogNameMY, __LINE__, $TimeLogLimitMY);
|
||||
?>
|
||||
<script>
|
||||
var fading = false;
|
||||
</script>
|
||||
<?php
|
||||
showCloseButton();
|
||||
|
||||
TimeLogEnd($timeLogNameMY, __LINE__, $TimeLogLimitMY);
|
||||
?>
|
||||
<?php
|
||||
$_page->print();
|
||||
?>
|
Loading…
Add table
Add a link
Reference in a new issue