1
0
Fork 0
mirror of https://github.com/DanielnetoDotCom/YouPHPTube synced 2025-10-05 19:42:38 +02:00
Daniel Neto 2024-02-21 10:39:19 -03:00
parent 1e61a87c3c
commit 01f835f0b1
15 changed files with 930 additions and 718 deletions

View file

@ -8,7 +8,9 @@ if (ADs::canHaveCustomAds()) {
style="border-radius: 0;" style="border-radius: 0;"
onclick="avideoModalIframeFull(webSiteRootURL+'plugin/ADs/editor.php?customAds=1');return false;"> onclick="avideoModalIframeFull(webSiteRootURL+'plugin/ADs/editor.php?customAds=1');return false;">
<i class="fas fa-image"></i> <i class="fas fa-image"></i>
<span class="menuLabel">
<?php echo __('Custom ADs'); ?> <?php echo __('Custom ADs'); ?>
</span>
</a> </a>
</div> </div>
</li> </li>

View file

@ -1038,6 +1038,7 @@ class AVideoPlugin
self::YPTstart(); self::YPTstart();
$p = static::loadPlugin($value['dirName']); $p = static::loadPlugin($value['dirName']);
if (is_object($p)) { if (is_object($p)) {
//_error_log("AVideoPlugin::getModeYouTube::{$value['dirName']}");
$p->getModeYouTube($videos_id); $p->getModeYouTube($videos_id);
} }
self::YPTend("{$value['dirName']}::" . __FUNCTION__); self::YPTend("{$value['dirName']}::" . __FUNCTION__);

View file

@ -5,9 +5,9 @@ $iframeHeight = 200;
$zoom = 0.7; $zoom = 0.7;
if (!isset($themeSwitcherAdded)) { if (!isset($themeSwitcherAdded)) {
$themeSwitcherAdded = 1; $themeSwitcherAdded = 1;
?> ?>
<style> <style>
.openThemeOptionsUL{ .openThemeOptionsUL {
top: auto; top: auto;
max-height: 250px; max-height: 250px;
overflow-y: auto; overflow-y: auto;
@ -16,36 +16,48 @@ if (!isset($themeSwitcherAdded)) {
margin-top: -26px; margin-top: -26px;
overflow-x: visible; overflow-x: visible;
} }
.openThemeOptionsUL li .fas{
.openThemeOptionsUL li .fas {
display: none; display: none;
} }
.openThemeOptionsUL li.active .far{
.openThemeOptionsUL li.active .far {
display: none; display: none;
} }
.openThemeOptionsUL li.active .fas{
.openThemeOptionsUL li.active .fas {
display: inline-block; display: inline-block;
} }
#sideBarContainer .openThemeOptionsUL{ #sideBarContainer .openThemeOptionsUL {
margin: 0; margin: 0;
} }
#showThemeIframeDiv{ #showThemeIframeDiv {
position: fixed; position: fixed;
top: 70px; top: 70px;
left: 50%; left: 50%;
margin-left: -<?php echo $iframeWidth/2; ?>px; margin-left: -<?php echo $iframeWidth / 2; ?>px;
background-color: #000; background-color: #000;
-webkit-box-shadow: 0 0 5px 2px #000; /* Safari 3-4, iOS 4.0.2 - 4.2, Android 2.3+ */ -webkit-box-shadow: 0 0 5px 2px #000;
-moz-box-shadow: 0 0 5px 2px #000; /* Firefox 3.5 - 3.6 */ /* Safari 3-4, iOS 4.0.2 - 4.2, Android 2.3+ */
box-shadow: 0 0 5px 2px #000; /* Opera 10.5, IE 9, Firefox 4+, Chrome 6+, iOS 5 */ -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; z-index: 2000;
width: <?php echo $iframeWidth; ?>px; width: <?php echo $iframeWidth; ?>px;
height: <?php echo $iframeHeight; ?>px; height: <?php echo $iframeHeight; ?>px;
padding: 0; padding: 0;
overflow: hidden; 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 { #frame {
-ms-zoom: <?php echo $zoom; ?>; -ms-zoom: <?php echo $zoom; ?>;
-moz-transform: scale(<?php echo $zoom; ?>); -moz-transform: scale(<?php echo $zoom; ?>);
@ -57,15 +69,15 @@ if (!isset($themeSwitcherAdded)) {
} }
</style> </style>
<script> <script>
$(document).ready(function () { $(document).ready(function() {
$(window).click(function () { $(window).click(function() {
$('.openThemeOptions').next('ul').hide(); $('.openThemeOptions').next('ul').hide();
$('#showThemeIframeDiv').fadeOut(); $('#showThemeIframeDiv').fadeOut();
}); });
$('.liThemes').click(function (event) { $('.liThemes').click(function(event) {
event.stopPropagation(); event.stopPropagation();
}); });
$('.openThemeOptions').on("click", function (e) { $('.openThemeOptions').on("click", function(e) {
$(this).next('ul').toggle(); $(this).next('ul').toggle();
if (!$(this).next('ul').is(":visible")) { if (!$(this).next('ul').is(":visible")) {
$('#showThemeIframeDiv').fadeOut(); $('#showThemeIframeDiv').fadeOut();
@ -75,11 +87,11 @@ if (!isset($themeSwitcherAdded)) {
}); });
$('body').append('<div id="showThemeIframeDiv" style="display:none;"></div>'); $('body').append('<div id="showThemeIframeDiv" style="display:none;"></div>');
setInterval(function(){ setInterval(function() {
if(!$('.openThemeOptions').is(":visible")){ if (!$('.openThemeOptions').is(":visible")) {
$('#showThemeIframeDiv').fadeOut(); $('#showThemeIframeDiv').fadeOut();
} }
},1000); }, 1000);
}); });
function showThemeIframe(name) { function showThemeIframe(name) {
@ -98,7 +110,7 @@ if (!isset($themeSwitcherAdded)) {
}); });
} }
</script> </script>
<?php <?php
} }
$aClass = ""; $aClass = "";
$keyComplement = ""; $keyComplement = "";
@ -108,7 +120,12 @@ if ($navBarButtons) {
} }
?> ?>
<li class="dropdown-submenu" style="position: relative;"> <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"> <ul class="dropdown-menu openThemeOptionsUL">
<?php <?php
$themes = Gallery::getThemes(); $themes = Gallery::getThemes();

View file

@ -6,7 +6,7 @@ $url = addQueryStringParameter($url, 'site', $global['webSiteRootURL']);
$url = addQueryStringParameter($url, 'user', User::getUserName()); $url = addQueryStringParameter($url, 'user', User::getUserName());
$url = addQueryStringParameter($url, 'pass', User::getUserPass()); $url = addQueryStringParameter($url, 'pass', User::getUserPass());
$url = addQueryStringParameter($url, 'users_id', User::getId()); $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); $url = addQueryStringParameter($url, 'qrcode', 1);
?> ?>
@ -18,10 +18,10 @@ $url = addQueryStringParameter($url, 'qrcode', 1);
</strong> </strong>
</li> </li>
<li> <li>
<a href="#" onclick="avideoModalIframeXSmall('<?php echo $url; ?>');return false;" > <a href="#" onclick="avideoModalIframeXSmall('<?php echo $url; ?>');return false;">
<i class="fas fa-qrcode"></i> <?php echo __('Connect Mobile App'); ?> <i class="fas fa-qrcode"></i>
<span class="menuLabel">
<?php echo __('Connect Mobile App'); ?>
</span>
</a> </a>
</li> </li>

View file

@ -15,7 +15,11 @@ $(document).ready(function () {
this.controlText("Next"); this.controlText("Next");
} }
handleClick() { 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); player.getChild('controlBar').addChild('NextButton', {}, getPlayerButtonIndex('PlayToggle')+1);
}, 30); }, 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;
}

View file

@ -336,7 +336,7 @@ class PlayLists extends PluginAbstract
//$url = $global['webSiteRootURL'] . "plugin/PlayLists/player.php?playlists_id=" . $playlists_id; //$url = $global['webSiteRootURL'] . "plugin/PlayLists/player.php?playlists_id=" . $playlists_id;
$url = $global['webSiteRootURL'] . "play/" . $playlists_id; $url = $global['webSiteRootURL'] . "play/" . $playlists_id;
} else { } else {
$url = $global['webSiteRootURL'] . "program/" . $playlists_id; $url = PlayLists::getURL($playlists_id);
} }
} }
if (isset($playlist_index)) { if (isset($playlist_index)) {
@ -376,7 +376,9 @@ class PlayLists extends PluginAbstract
<div> <div>
<a href="' . self::getWatchLaterLink() . '" class="btn btn-default btn-block" style="border-radius: 0;"> <a href="' . self::getWatchLaterLink() . '" class="btn btn-default btn-block" style="border-radius: 0;">
<i class="fas fa-clock"></i> <i class="fas fa-clock"></i>
<span class="menuLabel">
' . __("Watch Later") . ' ' . __("Watch Later") . '
</span>
</a> </a>
</div> </div>
</li>'; </li>';
@ -386,7 +388,9 @@ class PlayLists extends PluginAbstract
<div> <div>
<a href="' . self::getFavoriteLink() . '" class="btn btn-default btn-block" style="border-radius: 0;"> <a href="' . self::getFavoriteLink() . '" class="btn btn-default btn-block" style="border-radius: 0;">
<i class="fas fa-heart"></i> <i class="fas fa-heart"></i>
<span class="menuLabel">
' . __("Favorite") . ' ' . __("Favorite") . '
</span>
</a> </a>
</div> </div>
</li>'; </li>';
@ -395,7 +399,9 @@ class PlayLists extends PluginAbstract
<div> <div>
<a href="' . "{$global['webSiteRootURL']}plugin/PlayLists/managerPlaylists.php" . '" class="btn btn-default btn-block" style="border-radius: 0;"> <a href="' . "{$global['webSiteRootURL']}plugin/PlayLists/managerPlaylists.php" . '" class="btn btn-default btn-block" style="border-radius: 0;">
<i class="fas fa-list"></i> <i class="fas fa-list"></i>
<span class="menuLabel">
' . __("Organize") . ' ' . __($obj->name) . ' ' . __("Organize") . ' ' . __($obj->name) . '
</span>
</a> </a>
</div> </div>
</li>'; </li>';
@ -872,7 +878,6 @@ class PlayLists extends PluginAbstract
return ''; return '';
} }
static function scheduleLiveButton($playlists_id, $showLabel = true, $class = 'btn btn-xs btn-default') static function scheduleLiveButton($playlists_id, $showLabel = true, $class = 'btn btn-xs btn-default')
{ {
// can the user live? // can the user live?
@ -1045,7 +1050,7 @@ class PlayLists extends PluginAbstract
$key = $lt->getKey(); $key = $lt->getKey();
_error_log("on_publish_done key={$key} live_transmitions_history_id={$live_transmitions_history_id} "); _error_log("on_publish_done key={$key} live_transmitions_history_id={$live_transmitions_history_id} ");
$isPlayListScheduled = Playlists_schedules::iskeyPlayListScheduled($key); $isPlayListScheduled = Playlists_schedules::iskeyPlayListScheduled($key);
if(!empty($isPlayListScheduled['playlists_schedules'])){ if (!empty($isPlayListScheduled['playlists_schedules'])) {
$pls = new Playlists_schedules($isPlayListScheduled['playlists_schedules']); $pls = new Playlists_schedules($isPlayListScheduled['playlists_schedules']);
if ($pls->getFinish_datetime() > time()) { if ($pls->getFinish_datetime() > time()) {
$ps = Playlists_schedules::getPlaying($isPlayListScheduled['playlists_schedules']); $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())); _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); self::setScheduleStatus($key, Playlists_schedules::STATUS_COMPLETE);
} }
}else{ } else {
_error_log("on_publish_done is complete isPlayListScheduled=".json_encode($isPlayListScheduled)); _error_log("on_publish_done is complete isPlayListScheduled=" . json_encode($isPlayListScheduled));
} }
} }
@ -1081,6 +1086,30 @@ class PlayLists extends PluginAbstract
} }
return false; 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 class PlayListPlayer
@ -1115,7 +1144,6 @@ class PlayListPlayer
return $this->videos; return $this->videos;
} }
public function canSee() public function canSee()
{ {
return !empty($this->playlists_id) && PlayList::canSee($this->playlists_id, $this->users_id); return !empty($this->playlists_id) && PlayList::canSee($this->playlists_id, $this->users_id);
@ -1128,11 +1156,11 @@ class PlayListPlayer
$reasons = array(); $reasons = array();
if ($status == 'favorite') { if ($status == 'favorite') {
$reasons[] = __('Favorite is always private'); $reasons[] = __('Favorite is always private');
}else if ($status == 'watch_later') { } else if ($status == 'watch_later') {
$reasons[] = __('Watch later is always private'); $reasons[] = __('Watch later is always private');
}else if ($status !== 'public' && $status !== 'unlisted') { } else if ($status !== 'public' && $status !== 'unlisted') {
$reasons[] = 'Status = '.$status; $reasons[] = 'Status = ' . $status;
if($this->users_id !== $obj->getUsers_id()){ if ($this->users_id !== $obj->getUsers_id()) {
$reasons[] = __('Playlist is private'); $reasons[] = __('Playlist is private');
} }
} }
@ -1188,11 +1216,11 @@ class PlayListPlayer
$videos = array(); $videos = array();
if (!empty($this->playlists_id)) { if (!empty($this->playlists_id)) {
global $_pl_getVideos; global $_pl_getVideos;
if(!isset($_pl_getVideos)){ if (!isset($_pl_getVideos)) {
$_pl_getVideos = array(); $_pl_getVideos = array();
} }
_error_log("PlayList::getVideosFromPlaylist($this->playlists_id) ".json_encode(debug_backtrace())); _error_log("PlayList::getVideosFromPlaylist($this->playlists_id) " . json_encode(debug_backtrace()));
if(isset($_pl_getVideos[$this->playlists_id])){ if (isset($_pl_getVideos[$this->playlists_id])) {
return $_pl_getVideos[$this->playlists_id]; return $_pl_getVideos[$this->playlists_id];
} }
$_pl_getVideos[$this->playlists_id] = array(); $_pl_getVideos[$this->playlists_id] = array();
@ -1212,10 +1240,10 @@ class PlayListPlayer
*/ */
} else if (!empty($this->tags_id)) { } else if (!empty($this->tags_id)) {
global $_plt_getVideos; global $_plt_getVideos;
if(!isset($_plt_getVideos)){ if (!isset($_plt_getVideos)) {
$_plt_getVideos = array(); $_plt_getVideos = array();
} }
if(isset($_plt_getVideos[$this->playlists_id])){ if (isset($_plt_getVideos[$this->playlists_id])) {
return $_plt_getVideos[$this->playlists_id]; return $_plt_getVideos[$this->playlists_id];
} }
$_plt_getVideos[$this->playlists_id] = array(); $_plt_getVideos[$this->playlists_id] = array();

View file

@ -1,14 +1,16 @@
<?php <?php
if (User::isLogged()) { if (User::isLogged()) {
?> ?>
<li> <li>
<div> <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> <i class="fas fa-history"></i>
<span class="menuLabel">
<?php echo __("Videos History"); ?> <?php echo __("Videos History"); ?>
</span>
</button> </button>
</div> </div>
</li> </li>
<?php <?php
} }
?> ?>

View file

@ -206,7 +206,8 @@ unset($_POST['current']);
$count++; $count++;
continue; 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++; $count++;
$name = User::getNameIdentificationById($value['users_id']); $name = User::getNameIdentificationById($value['users_id']);
$class = ''; $class = '';

View file

@ -37,16 +37,18 @@ if (empty($programs)) {
$playListsObj = AVideoPlugin::getObjectData("PlayLists"); $playListsObj = AVideoPlugin::getObjectData("PlayLists");
//var_dump($_GET['program_id']);exit; //var_dump($_GET['program_id']);exit;
PlayLists::loadScripts(); PlayLists::loadScripts();
?>
<!DOCTYPE html>
<html lang="<?php echo getLanguage(); ?>">
<head>
<title><?php echo __("Program") . $config->getPageTitleSeparator() . $config->getWebSiteTitle(); ?></title> $_page = new Page(array("Program"));
<?php $_page->setExtraStyles(
include $global['systemRootPath'] . 'view/include/head.php'; array(
?> 'node_modules/video.js/dist/video-js.min.css',
<style> 'plugin/Gallery/style.css'
)
);
?>
<style>
.galleryVideo .panel { .galleryVideo .panel {
border-color: transparent; border-color: transparent;
box-shadow: none; box-shadow: none;
@ -55,19 +57,8 @@ PlayLists::loadScripts();
.galleryVideo .panel .panel-body { .galleryVideo .panel .panel-body {
padding: 5px; padding: 5px;
} }
</style> </style>
<?php <div class="container-fluid gallery">
if (!empty($videos_id)) {
getOpenGraph($videos_id);
}
?>
</head>
<body class="<?php echo $global['bodyClass']; ?>">
<?php
include $global['systemRootPath'] . 'view/include/navbar.php';
?>
<div class="container-fluid gallery">
<?php <?php
$channelName = @$_GET['channelName']; $channelName = @$_GET['channelName'];
unset($_GET['channelName']); unset($_GET['channelName']);
@ -100,7 +91,7 @@ PlayLists::loadScripts();
$totalVideos = count($videosP); $totalVideos = count($videosP);
$checked = ''; $checked = '';
if(!empty($program['showOnFirstPage'])){ if (!empty($program['showOnFirstPage'])) {
$checked = ' checked="checked" '; $checked = ' checked="checked" ';
} }
?> ?>
@ -151,13 +142,12 @@ PlayLists::loadScripts();
$count = 0; $count = 0;
$realCount = 0; $realCount = 0;
foreach ($videosP as $value) { foreach ($videosP as $value) {
$episodeLink = "{$global['webSiteRootURL']}program/{$program['id']}/{$count}"; $episodeLink = PlayLists::getURL($program['id'], $count, $value["channelName"], $program['name'], $value['clean_title']);
$count++; $count++;
if (empty($value['created'])) { if (empty($value['created'])) {
continue; continue;
} }
$realCount++; $realCount++;
$img_portrait = ($value['rotation'] === "90" || $value['rotation'] === "270") ? "img-portrait" : "";
$name = User::getNameIdentificationById($value['users_id']); $name = User::getNameIdentificationById($value['users_id']);
$class = ''; $class = '';
@ -519,11 +509,8 @@ PlayLists::loadScripts();
} }
?> ?>
--> -->
</div><!--/.container--> </div><!--/.container-->
<?php <?php
include $global['systemRootPath'] . 'view/include/footer.php'; $_page->print();
?> ?>
</body>
</html>

View file

@ -644,29 +644,6 @@ img.rotate-90 {
background-size: cover; 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 { .navbar-brand {
padding: 0px; padding: 0px;
/* firefox bug fix */ /* firefox bug fix */

View file

@ -1,36 +1,92 @@
/* if it is IE */ /* 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 { nav ul.items-container li:first-child {
display: block; 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; display: none;
} }
#mysearch.in, #mysearch.in,
#mysearch.collapsing { #mysearch.collapsing {
display: block!important; display: block !important;
} }
#myNavbar{
#myNavbar {
display: block; display: block;
} }
#myNavbar.in, #myNavbar.in,
#myNavbar.collapsing { #myNavbar.collapsing {
display: block!important; display: block !important;
} }
#searchForm { #searchForm {
width: 100%; width: 100%;
margin: 0 5px; margin: 0 5px;
white-space: nowrap; white-space: nowrap;
} }
#searchForm > span.input-group-prepend > button{
#searchForm>span.input-group-prepend>button {
border-right-width: 0; border-right-width: 0;
} }
#searchForm > span.input-group-append > button{
#searchForm>span.input-group-append>button {
border-left-width: 0; border-left-width: 0;
} }
@ -46,11 +102,12 @@
margin-left: -5px; margin-left: -5px;
margin-right: -5px; margin-right: -5px;
} }
#filterDropdown.show .dropdown-menu { #filterDropdown.show .dropdown-menu {
display: block; display: block;
} }
#rightProfileButton{ #rightProfileButton {
padding: 0; padding: 0;
margin: 5px; margin: 5px;
border: 0; border: 0;
@ -58,64 +115,74 @@
background-color: transparent; background-color: transparent;
} }
#rightLoginButton{ #rightLoginButton {
margin-left: 5px; margin-left: 5px;
margin-right: 40px; margin-right: 40px;
} }
#navbarRegularButtons{ #navbarRegularButtons {
max-width: 70%; max-width: 70%;
/* remove the scroll because the dropsown menus does not work */ /* remove the scroll because the dropsown menus does not work */
/*overflow-x: auto;*/ /*overflow-x: auto;*/
/*overflow-y: hidden;*/ /*overflow-y: hidden;*/
} }
#navbarRegularButtons span.hidden-mdx{ #navbarRegularButtons span.hidden-mdx {
max-width: 15vw; max-width: 15vw;
display: inline-block; display: inline-block;
} }
#navbarRegularButtons .btn{ #navbarRegularButtons .btn {
overflow: hidden; overflow: hidden;
} }
#navbarRegularButtons::-webkit-scrollbar { #navbarRegularButtons::-webkit-scrollbar {
height: 4px; height: 4px;
} }
#lastItemOnMenu{
#lastItemOnMenu {
padding-right: 40px; padding-right: 40px;
} }
#mysearch{
#mysearch {
height: auto !important; height: auto !important;
} }
#searchNavItem, #lastItemOnMenu{
#searchNavItem,
#lastItemOnMenu {
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
} }
#lastItemOnMenu ul{
#lastItemOnMenu ul {
padding: 0; padding: 0;
} }
@media (max-width : 767px) { @media (max-width : 767px) {
#filterDropdown{ #filterDropdown {
position: absolute; position: absolute;
top: 50px; top: 50px;
left: 10px; left: 10px;
} }
#searchForm { #searchForm {
margin: 0; margin: 0;
display: flex; display: flex;
justify-content: center; /* center horizontally */ justify-content: center;
align-items: center; /* center vertically */ /* center horizontally */
align-items: center;
/* center vertically */
padding: 0 5px; padding: 0 5px;
} }
#rightLoginButton, #rightProfileButton{
#rightLoginButton,
#rightProfileButton {
margin-right: 5px; margin-right: 5px;
margin-left: 0; margin-left: 0;
} }
#searchForm > div{ #searchForm>div {
width: 100%; width: 100%;
} }
@ -125,11 +192,12 @@
right: 5px; right: 5px;
} }
#buttonMyNavbar, #searchNavItem{ #buttonMyNavbar,
#searchNavItem {
display: block; display: block;
} }
#mysearch{ #mysearch {
width: 100%; width: 100%;
display: none; display: none;
position: absolute; position: absolute;
@ -146,7 +214,7 @@
min-width: 75vw; min-width: 75vw;
} }
#myNavbar{ #myNavbar {
display: none; display: none;
position: absolute; position: absolute;
right: 0; right: 0;
@ -155,50 +223,63 @@
padding: 4px; padding: 4px;
width: 50%; width: 50%;
} }
#mainNavBar .navbar-brand{
#mainNavBar .navbar-brand {
width: 100% !important; width: 100% !important;
text-align: center; text-align: center;
} }
#mainNavBar .navbar-brand>img { #mainNavBar .navbar-brand>img {
display: unset; display: unset;
} }
#myNavbar ul.right-menus{ #myNavbar ul.right-menus {
display: block; display: block;
} }
#myNavbar ul.right-menus li{ #myNavbar ul.right-menus li {
margin: 0; margin: 0;
padding: 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; margin: 2px;
width: 100%; width: 100%;
} }
#myNavbar ul.right-menus .btn-group{
#myNavbar ul.right-menus .btn-group {
margin: 0; margin: 0;
} }
nav ul.items-container li:first-child { nav ul.items-container li:first-child {
display: list-item; display: list-item;
} }
#navbarRegularButtons span.hidden-mdx { #navbarRegularButtons span.hidden-mdx {
max-width: 100vw; max-width: 100vw;
} }
.searchli { .searchli {
width: 100%; width: 100%;
margin-right: 0; margin-right: 0;
margin-left: 0; margin-left: 0;
} }
.navbar-toggle { .navbar-toggle {
margin-right: 5px !important; margin-right: 5px !important;
} }
#navbarRegularButtons, #lastItemOnMenu, .left-side {
#navbarRegularButtons,
#lastItemOnMenu,
.left-side {
padding: 0 5px; padding: 0 5px;
} }
.searchul{
.searchul {
padding-left: 0px; padding-left: 0px;
} }
} }
@ -206,25 +287,32 @@
li.navsub-toggle .badge { li.navsub-toggle .badge {
float: right; float: right;
} }
li.navsub-toggle a + ul {
li.navsub-toggle a+ul {
padding-left: 15px; padding-left: 15px;
} }
.navbar-lang-btn .select2-container{ .navbar-lang-btn .select2-container {
margin: 8px 0; margin: 8px 0;
} }
.navbar-lang-btn .select2-selection{
.navbar-lang-btn .select2-selection {
border-color: #00000077 !important; border-color: #00000077 !important;
} }
@media screen and (min-width: 992px) { @media screen and (min-width: 992px) {
body.youtube{ body.youtube {
margin-left: 300px; 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-left: 0;
margin-right: 0; margin-right: 0;
width: 100%; width: 100%;
} }
body.youtube.compressedMenu {
margin-left: 100px;
}
} }

View file

@ -153,7 +153,7 @@ if (!empty($_COOKIE['forKids'])) {
$checked = 'checked'; $checked = 'checked';
} }
?> ?>
<label for="forKids" class="row-label"> <label for="forKids" class="row-label singleLineMenu">
<?php <?php
echo createColorfulTextSpans(__('For Kids')); echo createColorfulTextSpans(__('For Kids'));
?> ?>

View file

@ -11,8 +11,10 @@ global $avideoLayout;
<li> <li>
<div> <div>
<a href="<?php echo getHomePageURL(); ?>" class="btn btn-primary btn-block " style="border-radius: 4px 4px 0 0;"> <a href="<?php echo getHomePageURL(); ?>" class="btn btn-primary btn-block " style="border-radius: 4px 4px 0 0;">
<span class="fa fa-home"></span> <i class="fa-solid fa-house"></i>
<span class="menuLabel">
<?php echo __("Home"); ?> <?php echo __("Home"); ?>
</span>
</a> </a>
</div> </div>
</li> </li>
@ -24,7 +26,9 @@ global $avideoLayout;
<div> <div>
<a href="#" onclick="avideoModalIframeFull(webSiteRootURL + 'epg');return false;" class="btn btn-primary btn-block " style="border-radius: 0 0 0 0;"> <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> <i class="fas fa-stream"></i>
<span class="menuLabel">
<?php echo __("EPG"); ?> <?php echo __("EPG"); ?>
</span>
</a> </a>
</div> </div>
@ -33,7 +37,9 @@ global $avideoLayout;
<div> <div>
<a href="#" onclick="avideoModalIframeFull(webSiteRootURL + 'tv');return false;" class="btn btn-primary btn-block " style="border-radius: 0 0 0 0;"> <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> <i class="fas fa-tv"></i>
<span class="menuLabel">
<?php echo __("TV"); ?> <?php echo __("TV"); ?>
</span>
</a> </a>
</div> </div>
@ -47,7 +53,9 @@ global $avideoLayout;
<div> <div>
<a href="<?php echo $global['webSiteRootURL']; ?>trending" class="btn btn-primary btn-block " style="border-radius: 0 0 4px 4px;"> <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> <i class="fas fa-fire"></i>
<span class="menuLabel">
<?php echo __("Trending"); ?> <?php echo __("Trending"); ?>
</span>
</a> </a>
</div> </div>
@ -58,7 +66,12 @@ global $avideoLayout;
?> ?>
<li> <li>
<button type="button" class="btn btn-success btn-block" onclick="swapUser(0);"> <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> </button>
</li> </li>
<?php <?php
@ -100,7 +113,10 @@ global $avideoLayout;
<i class="fas fa-lock-open text-muted" style="opacity: 0.2;"></i> <i class="fas fa-lock-open text-muted" style="opacity: 0.2;"></i>
<?php } <?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> </a>
</div> </div>
<?php } <?php }
@ -111,10 +127,9 @@ global $avideoLayout;
<div class="pull-left" style="margin-left: 10px;"> <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" /> <img src="<?php echo User::getPhoto(); ?>" style="max-width: 55px;" class="img img-thumbnail img-responsive img-circle" />
</div> </div>
<div style="margin-left: 80px;"> <div style="margin-left: 80px;" class="menuLabel">
<strong class="text-danger"><?php echo User::getName(); ?></strong> <strong class="text-danger"><?php echo User::getName(); ?></strong>
<div><small><?php echo User::getMail(); ?></small></div> <div><small><?php echo User::getMail(); ?></small></div>
</div> </div>
</li> </li>
<li> <li>
@ -122,7 +137,9 @@ global $avideoLayout;
<div> <div>
<a href="<?php echo $global['webSiteRootURL']; ?>user" class="btn btn-primary btn-block" style="border-radius: 4px 4px 0 0;"> <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> <span class="fa fa-user-circle"></span>
<span class="menuLabel">
<?php echo __("My Account"); ?> <?php echo __("My Account"); ?>
</span>
</a> </a>
</div> </div>
@ -137,7 +154,9 @@ global $avideoLayout;
return false;" class="btn btn-success btn-block" style="border-radius: 0;"> return false;" class="btn btn-success btn-block" style="border-radius: 0;">
<i class="fa-solid fa-film"></i> <i class="fa-solid fa-film"></i>
<i class="fa-solid fa-headphones"></i> <i class="fa-solid fa-headphones"></i>
<span class="menuLabel">
<?php echo __("My videos"); ?> <?php echo __("My videos"); ?>
</span>
</a> </a>
</div> </div>
</li> </li>
@ -149,7 +168,9 @@ global $avideoLayout;
<a href="#" onclick="avideoModalIframeFull('<?php echo User::getChannelLink(); ?>'); <a href="#" onclick="avideoModalIframeFull('<?php echo User::getChannelLink(); ?>');
return false;" class="btn btn-danger btn-block" style="border-radius: 0;"> return false;" class="btn btn-danger btn-block" style="border-radius: 0;">
<span class="fas fa-play-circle"></span> <span class="fas fa-play-circle"></span>
<span class="menuLabel">
<?php echo __($advancedCustomUser->MyChannelLabel); ?> <?php echo __($advancedCustomUser->MyChannelLabel); ?>
</span>
</a> </a>
</div> </div>
@ -164,7 +185,9 @@ global $avideoLayout;
<a href="#" onclick="avideoModalIframeFull(webSiteRootURL + 'charts'); <a href="#" onclick="avideoModalIframeFull(webSiteRootURL + 'charts');
return false;" class="btn btn-default btn-block" style="border-radius: 0;"> return false;" class="btn btn-default btn-block" style="border-radius: 0;">
<span class="fas fa-tachometer-alt"></span> <span class="fas fa-tachometer-alt"></span>
<span class="menuLabel">
<?php echo __("Dashboard"); ?> <?php echo __("Dashboard"); ?>
</span>
</a> </a>
</div> </div>
</li> </li>
@ -177,7 +200,9 @@ global $avideoLayout;
<a href="#" onclick="avideoModalIframeFull(webSiteRootURL + 'subscribes'); <a href="#" onclick="avideoModalIframeFull(webSiteRootURL + 'subscribes');
return false;" class="btn btn-default btn-block" style="border-radius: 0"> return false;" class="btn btn-default btn-block" style="border-radius: 0">
<span class="fa fa-check"></span> <span class="fa fa-check"></span>
<span class="menuLabel">
<?php echo __("My Subscribers"); ?> <?php echo __("My Subscribers"); ?>
</span>
</a> </a>
</div> </div>
</li> </li>
@ -190,6 +215,7 @@ global $avideoLayout;
<a href="#" onclick="avideoModalIframeFull(webSiteRootURL + 'categories'); <a href="#" onclick="avideoModalIframeFull(webSiteRootURL + 'categories');
return false;" class="btn btn-default btn-block" style="border-radius: 0;"> return false;" class="btn btn-default btn-block" style="border-radius: 0;">
<i class="fa-solid fa-list"></i> <i class="fa-solid fa-list"></i>
<span class="menuLabel">
<?php echo __($advancedCustom->CategoryLabel); ?> <?php echo __($advancedCustom->CategoryLabel); ?>
</a> </a>
</div> </div>
@ -201,7 +227,9 @@ global $avideoLayout;
<a href="#" onclick="avideoModalIframeFull(webSiteRootURL + 'comments'); <a href="#" onclick="avideoModalIframeFull(webSiteRootURL + 'comments');
return false;" class="btn btn-default btn-block" style="border-radius: 0 0 4px 4px;"> return false;" class="btn btn-default btn-block" style="border-radius: 0 0 4px 4px;">
<span class="fa fa-comment"></span> <span class="fa fa-comment"></span>
<span class="menuLabel">
<?php echo __("Comments"); ?> <?php echo __("Comments"); ?>
</span>
</a> </a>
</div> </div>
</li> </li>
@ -217,7 +245,9 @@ global $avideoLayout;
<div> <div>
<a href="<?php echo $global['webSiteRootURL']; ?>user" class="btn btn-success btn-block line_<?php echo __LINE__; ?>"> <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> <i class="fas fa-sign-in-alt"></i>
<span class="menuLabel">
<?php echo __("Login"); ?> <?php echo __("Login"); ?>
</span>
</a> </a>
</div> </div>
</li> </li>
@ -236,27 +266,34 @@ global $avideoLayout;
<a href="#" onclick="avideoModalIframeFull(webSiteRootURL + 'admin/'); <a href="#" onclick="avideoModalIframeFull(webSiteRootURL + 'admin/');
return false;"> return false;">
<i class="fas fa-star"></i> <i class="fas fa-star"></i>
<span class="menuLabel">
<?php echo __("Admin Panel"); ?> <?php echo __("Admin Panel"); ?>
</span>
</a> </a>
</li> </li>
<li> <li>
<a href="#" onclick="avideoModalIframeFull(webSiteRootURL + 'users'); <a href="#" onclick="avideoModalIframeFull(webSiteRootURL + 'users');
return false;"> return false;">
<i class="fa-solid fa-user"></i> <i class="fa-solid fa-user"></i>
<span class="menuLabel">
<?php echo __("Users"); ?> <?php echo __("Users"); ?>
</span>
</a> </a>
</li> </li>
<li> <li>
<a href="#" onclick="avideoModalIframeFull(webSiteRootURL + 'usersGroups'); <a href="#" onclick="avideoModalIframeFull(webSiteRootURL + 'usersGroups');
return false;"> return false;">
<span class="fa fa-users"></span> <span class="fa fa-users"></span>
<span class="menuLabel">
<?php echo __("Users Groups"); ?> <?php echo __("Users Groups"); ?>
</span>
</a> </a>
</li> </li>
<li> <li>
<a href="#" onclick="avideoModalIframeFull(webSiteRootURL + 'categories'); <a href="#" onclick="avideoModalIframeFull(webSiteRootURL + 'categories');
return false;"> return false;">
<i class="fa-solid fa-list"></i> <i class="fa-solid fa-list"></i>
<span class="menuLabel">
<?php echo __($advancedCustom->CategoryLabel); ?> <?php echo __($advancedCustom->CategoryLabel); ?>
</a> </a>
</li> </li>
@ -264,17 +301,23 @@ global $avideoLayout;
<a href="#" onclick="avideoModalIframeFull(webSiteRootURL + 'update'); <a href="#" onclick="avideoModalIframeFull(webSiteRootURL + 'update');
return false;"> return false;">
<i class="fa-solid fa-arrows-rotate"></i> <i class="fa-solid fa-arrows-rotate"></i>
<span class="menuLabel">
<?php echo __("Update version"); ?> <?php echo __("Update version"); ?>
<?php <?php
if (!empty($updateFiles)) { if (!empty($updateFiles)) {
?><span class="label label-danger"><?php echo count($updateFiles); ?></span><?php }
?> ?>
<span class="label label-danger"><?php echo count($updateFiles); ?></span>
<?php
}
?>
</span>
</a> </a>
</li> </li>
<li> <li>
<a href="#" onclick="avideoModalIframeFull(webSiteRootURL + 'siteConfigurations'); <a href="#" onclick="avideoModalIframeFull(webSiteRootURL + 'siteConfigurations');
return false;"> return false;">
<i class="fa-solid fa-gear"></i> <i class="fa-solid fa-gear"></i>
<span class="menuLabel">
<?php echo __("Site Configurations"); ?> <?php echo __("Site Configurations"); ?>
</a> </a>
</li> </li>
@ -282,28 +325,34 @@ global $avideoLayout;
<a href="#" onclick="avideoModalIframeFull(webSiteRootURL + 'plugins'); <a href="#" onclick="avideoModalIframeFull(webSiteRootURL + 'plugins');
return false;"> return false;">
<i class="fas fa-puzzle-piece"></i> <i class="fas fa-puzzle-piece"></i>
<span class="menuLabel">
<?php echo __("Plugins"); ?> <?php echo __("Plugins"); ?>
</a> </span>
</li>
<li>
<a href="#" class="clearCacheFirstPageButton">
<i class="fa fa-trash"></i> <?php echo __("Clear First Page Cache"); ?>
</a> </a>
</li> </li>
<li> <li>
<a href="#" class="clearCacheButton"> <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> </a>
</li> </li>
<li> <li>
<a href="#" onclick="avideoModalIframeFull(webSiteRootURL + 'i/log'); <a href="#" onclick="avideoModalIframeFull(webSiteRootURL + 'i/log');
return false;" class=""> 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> </a>
</li> </li>
<li> <li>
<a href="#" class="generateSiteMapButton"> <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> </a>
</li> </li>
</ul> </ul>
@ -317,7 +366,9 @@ global $avideoLayout;
<li> <li>
<a href="#" onclick="avideoModalIframeFull(webSiteRootURL+\'users\');return false;"> <a href="#" onclick="avideoModalIframeFull(webSiteRootURL+\'users\');return false;">
<i class="fa-solid fa-user"></i> <i class="fa-solid fa-user"></i>
<span class="menuLabel">
<?php echo __("Users"); ?> <?php echo __("Users"); ?>
</span>
</a> </a>
</li> </li>
<?php <?php
@ -328,7 +379,9 @@ global $avideoLayout;
<li> <li>
<a href="#" onclick="avideoModalIframeFull(webSiteRootURL+\'usersGroups\');return false;"> <a href="#" onclick="avideoModalIframeFull(webSiteRootURL+\'usersGroups\');return false;">
<span class="fa fa-users"></span> <span class="fa fa-users"></span>
<span class="menuLabel">
<?php echo __("Users Groups"); ?> <?php echo __("Users Groups"); ?>
</span>
</a> </a>
</li> </li>
<?php <?php
@ -336,14 +389,12 @@ global $avideoLayout;
} }
if (Permissions::canClearCache()) { if (Permissions::canClearCache()) {
$menus[] = '?> $menus[] = '?>
<li>
<a href="#" class="clearCacheFirstPageButton">
<i class="fa fa-trash"></i> <?php echo __("Clear First Page Cache"); ?>
</a>
</li>
<li> <li>
<a href="#" class="clearCacheButton"> <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> </a>
</li> </li>
<?php <?php
@ -353,7 +404,10 @@ global $avideoLayout;
$menus[] = ' ?> $menus[] = ' ?>
<li> <li>
<a href="#" onclick="avideoModalIframeFull(webSiteRootURL+\'i/log\');return false;" class=""> <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> </a>
</li> </li>
<?php <?php
@ -363,7 +417,10 @@ global $avideoLayout;
$menus[] = '?> $menus[] = '?>
<li> <li>
<a href="#" class="generateSiteMapButton"> <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> </a>
</li> </li>
<?php <?php
@ -393,19 +450,25 @@ global $avideoLayout;
<li class="nav-item <?php echo empty($_SESSION['type']) ? "active" : ""; ?>"> <li class="nav-item <?php echo empty($_SESSION['type']) ? "active" : ""; ?>">
<a class="nav-link " href="<?php echo $global['webSiteRootURL']; ?>?type=all"> <a class="nav-link " href="<?php echo $global['webSiteRootURL']; ?>?type=all">
<i class="fa-solid fa-star"></i> <i class="fa-solid fa-star"></i>
<span class="menuLabel">
<?php echo __("Audio and Video"); ?> <?php echo __("Audio and Video"); ?>
</span>
</a> </a>
</li> </li>
<li class="nav-item <?php echo (!empty($_SESSION['type']) && $_SESSION['type'] == 'video' && empty($_REQUEST['catName'])) ? "active" : ""; ?>"> <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"> <a class="nav-link " href="<?php echo $global['webSiteRootURL']; ?>videoOnly">
<i class="fa-solid fa-video"></i> <i class="fa-solid fa-video"></i>
<span class="menuLabel">
<?php echo __("Videos"); ?> <?php echo __("Videos"); ?>
</span>
</a> </a>
</li> </li>
<li class="nav-item <?php echo (!empty($_SESSION['type']) && $_SESSION['type'] == 'audio' && empty($_REQUEST['catName'])) ? "active" : ""; ?>"> <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"> <a class="nav-link" href="<?php echo $global['webSiteRootURL']; ?>audioOnly">
<i class="fa-solid fa-headphones"></i> <i class="fa-solid fa-headphones"></i>
<span class="menuLabel">
<?php echo __("Audio"); ?> <?php echo __("Audio"); ?>
</span>
</a> </a>
</li> </li>
<?php } <?php }
@ -425,7 +488,9 @@ global $avideoLayout;
<a href="#" onclick="avideoModalIframeFull(webSiteRootURL + 'channels'); <a href="#" onclick="avideoModalIframeFull(webSiteRootURL + 'channels');
return false;"> return false;">
<i class="fa fa-search"></i> <i class="fa fa-search"></i>
<span class="menuLabel">
<?php echo __("Browse Channels"); ?> <?php echo __("Browse Channels"); ?>
</span>
</a> </a>
</li> </li>
@ -442,7 +507,9 @@ global $avideoLayout;
<strong> <strong>
<a href="#" onclick="avideoModalIframeFull(webSiteRootURL + 'listCategories'); <a href="#" onclick="avideoModalIframeFull(webSiteRootURL + 'listCategories');
return false;" class="text-danger"> return false;" class="text-danger">
<span class="menuLabel">
<?php echo __($advancedCustom->CategoryLabel); ?> <?php echo __($advancedCustom->CategoryLabel); ?>
</span>
</a> </a>
</strong> </strong>
</li> </li>
@ -515,7 +582,8 @@ global $avideoLayout;
//$parsed_cats[] = $value['id']; //$parsed_cats[] = $value['id'];
echo '<li class="navsub-toggle ' . ($value['clean_name'] == @$_REQUEST['catName'] ? "active" : "") . '">' echo '<li class="navsub-toggle ' . ($value['clean_name'] == @$_REQUEST['catName'] ? "active" : "") . '">'
. '<a href="' . Category::getCategoryLinkFromName($value['clean_name']) . '" >'; . '<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)) { if (empty($advancedCustom->hideCategoryVideosCount)) {
echo ' <span class="badge">' . $total . '</span>'; echo ' <span class="badge">' . $total . '</span>';
} }
@ -536,7 +604,10 @@ global $avideoLayout;
<li class="nav-item "> <li class="nav-item ">
<a class="nav-link " href="#" onclick="avideoModalIframeFull(webSiteRootURL + 'listCategories');return false;"> <a class="nav-link " href="#" onclick="avideoModalIframeFull(webSiteRootURL + 'listCategories');return false;">
<i class="fas fa-list"></i> <i class="fas fa-list"></i>
<?php echo __($advancedCustom->CategoryLabel); ?></a> <span class="menuLabel">
<?php echo __($advancedCustom->CategoryLabel); ?>
</span>
</a>
</li> </li>
<?php <?php
} }
@ -554,7 +625,9 @@ global $avideoLayout;
<a class="nav-link" href="#" onclick="A2HSInstall(); <a class="nav-link" href="#" onclick="A2HSInstall();
return false;"> return false;">
<i class="fas fa-arrow-alt-circle-down"></i> <i class="fas fa-arrow-alt-circle-down"></i>
<span class="menuLabel">
<?php echo __("Install"); ?> <?php echo __("Install"); ?>
</span>
</a> </a>
</li> </li>
<?php <?php
@ -565,7 +638,9 @@ global $avideoLayout;
<a class="nav-link" href="#" onclick="avideoModalIframeFull(webSiteRootURL + 'playLink'); <a class="nav-link" href="#" onclick="avideoModalIframeFull(webSiteRootURL + 'playLink');
return false;"> return false;">
<i class="fas fa-play-circle"></i> <i class="fas fa-play-circle"></i>
<span class="menuLabel">
<?php echo __("Play a Link"); ?> <?php echo __("Play a Link"); ?>
</span>
</a> </a>
</li> </li>
<?php <?php
@ -576,7 +651,9 @@ global $avideoLayout;
<a href="#" onclick="avideoModalIframeFull(webSiteRootURL + 'help'); <a href="#" onclick="avideoModalIframeFull(webSiteRootURL + 'help');
return false;"> return false;">
<i class="fa-solid fa-circle-question"></i> <i class="fa-solid fa-circle-question"></i>
<span class="menuLabel">
<?php echo __("Help"); ?> <?php echo __("Help"); ?>
</span>
</a> </a>
</li> </li>
<?php <?php
@ -588,7 +665,9 @@ global $avideoLayout;
<a href="#" onclick="avideoModalIframeFull(webSiteRootURL + 'about'); <a href="#" onclick="avideoModalIframeFull(webSiteRootURL + 'about');
return false;"> return false;">
<i class="fa-solid fa-circle-info"></i> <i class="fa-solid fa-circle-info"></i>
<span class="menuLabel">
<?php echo __("About"); ?> <?php echo __("About"); ?>
</span>
</a> </a>
</li> </li>
<?php <?php
@ -600,7 +679,9 @@ global $avideoLayout;
<a href="#" onclick="avideoModalIframeFull(webSiteRootURL + 'contact'); <a href="#" onclick="avideoModalIframeFull(webSiteRootURL + 'contact');
return false;"> return false;">
<i class="fa-solid fa-comment"></i> <i class="fa-solid fa-comment"></i>
<span class="menuLabel">
<?php echo __("Contact"); ?> <?php echo __("Contact"); ?>
</span>
</a> </a>
</li> </li>
<?php } <?php }
@ -608,3 +689,22 @@ global $avideoLayout;
</ul> </ul>
</div> </div>
</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>

View file

@ -72,9 +72,12 @@ if (!empty($videoSerie)) {
if ($count == $playlist_index) { if ($count == $playlist_index) {
$class .= " active"; $class .= " active";
$indicator = '<span class="fa fa-play text-danger"></span>'; $indicator = '<span class="fa fa-play text-danger"></span>';
} ?> }
$plURL = PlayLists::getURL($playlist_id, $count, $value["channelName"], $playlist->getName(), $value['clean_title']);
?>
<li class="<?php echo $class; ?>"> <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"> <div class="col-md-1 col-sm-1 col-xs-1">
<?php echo $indicator; ?> <?php echo $indicator; ?>
</div> </div>

View file

@ -71,7 +71,7 @@ if (!empty($evideo)) {
TimeLogEnd($timeLogNameMY, __LINE__, $TimeLogLimitMY); TimeLogEnd($timeLogNameMY, __LINE__, $TimeLogLimitMY);
if (empty($_GET['playlist_id']) && !empty($_GET['playlist_name'])) { if (empty($_GET['playlist_id']) && !empty($_GET['playlist_name'])) {
$_GET['playlist_id'] = $_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']; $_GET['playlist_id'] = $_GET['playlists_id'];
}/* }/*
else{ else{
@ -86,22 +86,22 @@ if (!empty($evideo)) {
$playListData = $plp->getPlayListData(); $playListData = $plp->getPlayListData();
//var_dump($_GET['playlist_id'], $_GET['playlists_tags_id'], $playListData, $messagesFromPlayList);exit; //var_dump($_GET['playlist_id'], $_GET['playlists_tags_id'], $playListData, $messagesFromPlayList);exit;
if (!$plp->canSee()) { if (!$plp->canSee()) {
forbiddenPage(_('You cannot see this playlist').' '.basename(__FILE__)); forbiddenPage(_('You cannot see this playlist') . ' ' . basename(__FILE__));
} }
$playListData = $plp->getPlayListData(); $playListData = $plp->getPlayListData();
//var_dump($playListData);exit; //var_dump($playListData);exit;
if (empty($playListData)) { if (empty($playListData)) {
if(empty($messagesFromPlayList)){ if (empty($messagesFromPlayList)) {
$messagesFromPlayList = array(); $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']); $notFoundMessage = PlayLists::getPlaylistNotFoundMessage($_GET['playlist_id']);
videoNotFound($notFoundMessage); videoNotFound($notFoundMessage);
} }
$video = $plp->getCurrentVideo(); $video = $plp->getCurrentVideo();
if(!empty($video)){ if (!empty($video)) {
$_getVideos_id = intval($video['id']); $_getVideos_id = intval($video['id']);
$playlist_index = $plp->getIndex(); $playlist_index = $plp->getIndex();
$videosPlayList = $plp->getVideos(); $videosPlayList = $plp->getVideos();
@ -190,7 +190,6 @@ if (!empty($evideo)) {
} }
TimeLogEnd($timeLogNameMY, __LINE__, $TimeLogLimitMY); TimeLogEnd($timeLogNameMY, __LINE__, $TimeLogLimitMY);
} }
$modeYouTubeTimeLog['Code part 2'] = microtime(true) - $modeYouTubeTime; $modeYouTubeTimeLog['Code part 2'] = microtime(true) - $modeYouTubeTime;
$modeYouTubeTime = microtime(true); $modeYouTubeTime = microtime(true);
if (!empty($video) && !empty($video['users_id'])) { if (!empty($video) && !empty($video['users_id'])) {
@ -260,35 +259,35 @@ if (!empty($evideo)) {
if (empty($_GET['videoName']) && !empty($video) && !empty($video['clean_title'])) { if (empty($_GET['videoName']) && !empty($video) && !empty($video['clean_title'])) {
$_GET['videoName'] = $video['clean_title']; $_GET['videoName'] = $video['clean_title'];
} }
if(!empty($video)){ if (!empty($video)) {
$v = Video::getVideo($video['id'], "", true, false, false, true); $v = Video::getVideo($video['id'], "", true, false, false, true);
}else if (!empty($_GET['videoName'])) { } else if (!empty($_GET['videoName'])) {
$v = Video::getVideoFromCleanTitle($_GET['videoName']); $v = Video::getVideoFromCleanTitle($_GET['videoName']);
} }
if (empty($v) && empty($videosPlayList[$playlist_index]['id'])) { if (empty($v) && empty($videosPlayList[$playlist_index]['id'])) {
if($_GET['playlist_id'] == 'favorite' || $_GET['playlist_id'] == 'watch-later'){ if ($_GET['playlist_id'] == 'favorite' || $_GET['playlist_id'] == 'watch-later') {
if($_GET['playlist_id'] == 'favorite'){ if ($_GET['playlist_id'] == 'favorite') {
$msg = __('Your Favorite playlist is waiting to be filled! Start exploring and add the videos you love the most.'); $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.'); $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); $url = addQueryStringParameter($global['webSiteRootURL'], 'msg', $msg);
header("location: {$url}"); header("location: {$url}");
exit; exit;
}else if(!empty($video['id'])){ } else if (!empty($video['id'])) {
$response = Video::whyUserCannotWatchVideo(User::getId(), @$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); videoNotFound($html);
}else{ } else {
AVideoPlugin::getModeYouTube($videos_id); AVideoPlugin::getModeYouTube($videos_id);
forbiddenPage('We could not load the video'); forbiddenPage('We could not load the video');
} }
} }
TimeLogEnd($timeLogNameMY, __LINE__, $TimeLogLimitMY); TimeLogEnd($timeLogNameMY, __LINE__, $TimeLogLimitMY);
} }
//_error_log('AVideoPlugin::getModeYouTube');
AVideoPlugin::getModeYouTube($videos_id); AVideoPlugin::getModeYouTube($videos_id);
//var_dump(__LINE__);exit;
TimeLogEnd($timeLogNameMY, __LINE__, $TimeLogLimitMY); TimeLogEnd($timeLogNameMY, __LINE__, $TimeLogLimitMY);
// video not found // video not found
@ -301,9 +300,9 @@ if (empty($video)) {
$vid->save(); $vid->save();
_error_log('Missing files recovered ' . $_GET['v']); _error_log('Missing files recovered ' . $_GET['v']);
} else { } else {
if(!User::isLogged()){ if (!User::isLogged()) {
gotToLoginAndComeBackHere(); gotToLoginAndComeBackHere();
}else{ } else {
$msg = 'ERROR 1: The video ID [' . $_GET['v'] . '] is not available: status=' . Video::$statusDesc[$vid->getStatus()]; $msg = 'ERROR 1: The video ID [' . $_GET['v'] . '] is not available: status=' . Video::$statusDesc[$vid->getStatus()];
videoNotFound($msg); videoNotFound($msg);
} }
@ -314,9 +313,9 @@ if (empty($video)) {
videoNotFound($msg); videoNotFound($msg);
exit; exit;
} else { } else {
if(!User::isLogged()){ if (!User::isLogged()) {
gotToLoginAndComeBackHere(); gotToLoginAndComeBackHere();
}else{ } else {
$msg = 'ERROR 2: The video ID [' . $_GET['v'] . '] is not available: status=' . Video::$statusDesc[$vid->getStatus()]; $msg = 'ERROR 2: The video ID [' . $_GET['v'] . '] is not available: status=' . Video::$statusDesc[$vid->getStatus()];
videoNotFound($msg); videoNotFound($msg);
} }
@ -352,35 +351,26 @@ if (!empty($video['users_id']) && User::hasBlockedUser($video['users_id'])) {
TimeLogEnd($timeLogNameMY, __LINE__, $TimeLogLimitMY); TimeLogEnd($timeLogNameMY, __LINE__, $TimeLogLimitMY);
global $nonCriticalCSS; global $nonCriticalCSS;
$_page = new Page(array($titleTag));
$_page->setExtraStyles(
array(
'node_modules/video.js/dist/video-js.min.css',
'plugin/Gallery/style.css'
)
);
?>
<?php
if (!empty($advancedCustomUser->showChannelBannerOnModeYoutube)) {
?> ?>
<!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;"> <div class="container" style="margin-bottom: 10px;">
<img src="<?php echo User::getBackground($video['users_id']); ?>" class="img img-responsive" /> <img src="<?php echo User::getBackground($video['users_id']); ?>" class="img img-responsive" />
</div> </div>
<?php <?php
} }
?> ?>
<!-- view modeYoutube.php --> <!-- view modeYoutube.php -->
<div class="container-fluid principalContainer avideoLoadPage" id="modeYoutubePrincipal" style="overflow: hidden;"> <div class="container-fluid principalContainer avideoLoadPage" id="modeYoutubePrincipal" style="overflow: hidden;">
<?php <?php
if (!empty($video)) { if (!empty($video)) {
if (empty($video['type'])) { if (empty($video['type'])) {
@ -389,7 +379,6 @@ global $nonCriticalCSS;
TimeLogEnd($timeLogNameMY, __LINE__, $TimeLogLimitMY); TimeLogEnd($timeLogNameMY, __LINE__, $TimeLogLimitMY);
require "{$global['systemRootPath']}view/modeYoutubeBundle.php"; require "{$global['systemRootPath']}view/modeYoutubeBundle.php";
TimeLogEnd($timeLogNameMY, __LINE__, $TimeLogLimitMY); TimeLogEnd($timeLogNameMY, __LINE__, $TimeLogLimitMY);
} else { } else {
?> ?>
@ -401,29 +390,23 @@ global $nonCriticalCSS;
<i class="fa-solid fa-video"></i> <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; ?>. <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> </div>
<?php }
?>
</div>
<?php <?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> </div>
<script>
var fading = false;
</script>
<?php
showCloseButton();
TimeLogEnd($timeLogNameMY, __LINE__, $TimeLogLimitMY);
?>
</body>
</html>
<?php <?php
include $global['systemRootPath'] . 'objects/include_end.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); TimeLogEnd($timeLogNameMY, __LINE__, $TimeLogLimitMY);
?> ?>
<?php
$_page->print();
?>