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

@ -16,12 +16,15 @@ 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;
} }
@ -36,16 +39,25 @@ if (!isset($themeSwitcherAdded)) {
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; ?>);
@ -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

@ -19,9 +19,9 @@ $url = addQueryStringParameter($url, 'qrcode', 1);
</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?
@ -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);

View file

@ -5,7 +5,9 @@ if (User::isLogged()) {
<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>

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,14 +37,16 @@ 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',
'plugin/Gallery/style.css'
)
);
?> ?>
<style> <style>
.galleryVideo .panel { .galleryVideo .panel {
@ -56,17 +58,6 @@ PlayLists::loadScripts();
padding: 5px; padding: 5px;
} }
</style> </style>
<?php
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"> <div class="container-fluid gallery">
<?php <?php
$channelName = @$_GET['channelName']; $channelName = @$_GET['channelName'];
@ -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 = '';
@ -522,8 +512,5 @@ 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

@ -2,10 +2,61 @@
@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 */
} }
} }
#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 { #buttonMyNavbar {
display: none; display: none;
} }
@ -14,22 +65,27 @@
#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,6 +102,7 @@
margin-left: -5px; margin-left: -5px;
margin-right: -5px; margin-right: -5px;
} }
#filterDropdown.show .dropdown-menu { #filterDropdown.show .dropdown-menu {
display: block; display: block;
} }
@ -82,17 +139,22 @@
#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;
} }
@ -103,14 +165,19 @@
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;
} }
@ -125,7 +192,8 @@
right: 5px; right: 5px;
} }
#buttonMyNavbar, #searchNavItem{ #buttonMyNavbar,
#searchNavItem {
display: block; display: block;
} }
@ -155,10 +223,12 @@
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;
} }
@ -171,33 +241,44 @@
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,6 +287,7 @@
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;
} }
@ -213,6 +295,7 @@ li.navsub-toggle a + ul {
.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;
} }
@ -222,9 +305,14 @@ li.navsub-toggle a + ul {
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

@ -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'])) {
@ -286,9 +285,9 @@ if (!empty($evideo)) {
} }
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
@ -352,25 +351,16 @@ if (!empty($video['users_id']) && User::hasBlockedUser($video['users_id'])) {
TimeLogEnd($timeLogNameMY, __LINE__, $TimeLogLimitMY); TimeLogEnd($timeLogNameMY, __LINE__, $TimeLogLimitMY);
global $nonCriticalCSS; global $nonCriticalCSS;
?>
<!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']; ?>"> $_page = new Page(array($titleTag));
$_page->setExtraStyles(
array(
'node_modules/video.js/dist/video-js.min.css',
'plugin/Gallery/style.css'
)
);
?>
<?php <?php
TimeLogEnd($timeLogNameMY, __LINE__, $TimeLogLimitMY);
include $global['systemRootPath'] . 'view/include/navbar.php';
TimeLogEnd($timeLogNameMY, __LINE__, $TimeLogLimitMY);
if (!empty($advancedCustomUser->showChannelBannerOnModeYoutube)) { if (!empty($advancedCustomUser->showChannelBannerOnModeYoutube)) {
?> ?>
<div class="container" style="margin-bottom: 10px;"> <div class="container" style="margin-bottom: 10px;">
@ -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 } <?php
}
?> ?>
</div> </div>
<?php <?php
include $global['systemRootPath'] . 'view/include/video.min.js.php'; include $global['systemRootPath'] . 'view/include/video.min.js.php';
echo AVideoPlugin::afterVideoJS(); echo AVideoPlugin::afterVideoJS();
include $global['systemRootPath'] . 'view/include/footer.php';
TimeLogEnd($timeLogNameMY, __LINE__, $TimeLogLimitMY); 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> <script>
var fading = false; var fading = false;
</script> </script>
<?php <?php
showCloseButton(); showCloseButton();
TimeLogEnd($timeLogNameMY, __LINE__, $TimeLogLimitMY); TimeLogEnd($timeLogNameMY, __LINE__, $TimeLogLimitMY);
?> ?>
</body>
</html>
<?php <?php
include $global['systemRootPath'] . 'objects/include_end.php'; $_page->print();
TimeLogEnd($timeLogNameMY, __LINE__, $TimeLogLimitMY);
?> ?>