diff --git a/view/include/head.php b/view/include/head.php index d0d939d07..90e4f1dd3 100644 --- a/view/include/head.php +++ b/view/include/head.php @@ -1,188 +1,190 @@ getId()); } $custom = array(); -if (file_exists($extraPluginFile) && AVideoPlugin::isEnabled("c4fe1b83-8f5a-4d1b-b912-172c608bf9e3")) { +$customizePluginDescription = ''; +if (file_exists($extraPluginFile) && AVideoPlugin::isEnabledByName("Customize")) { require_once $extraPluginFile; $ec = new ExtraConfig(); - $custom[] = $ec->getDescription(); + $customizePluginDescription = $ec->getDescription(); + $custom[] = $customizePluginDescription; } if (!empty($poster)) { $subTitle = str_replace(array('"', "\n", "\r"), array("", "", ""), strip_tags($video['description'])); $custom = array(); $custom[] = $subTitle; if(!empty($video["category"])){ $custom[] = $video["category"]; } } if (!empty($_GET['catName'])) { $category = Category::getCategoryByName($_GET['catName']); $description = str_replace(array('"', "\n", "\r"), array("", "", ""), strip_tags($category['description'])); $custom = array(); $custom[] = $description; $custom[] = $category['name']; } foreach ($custom as $key => $value) { if(empty($value)){ unset($custom[$key]); } } if(!empty($metaDescription)){ $metaDescription = implode(" - ", $custom)." - {$metaDescription}"; }else{ $metaDescription = implode(" - ", $custom); } // for SEO to not rise an error of duplicated title or description of same pages with and without last slash $metaDescription .= getSEOComplement(array("addAutoPrefix" => false)); $theme = getCurrentTheme(); if(empty($config)){ $config = new Configuration(); } ?> keywords)); ?>"> showCustomCSS) && file_exists($filename)){ echo ''; }else{ if($theme !== "default"){ echo ""; } if(empty($customizePlugin->showCustomCSS)){ echo ""; } if(!file_exists($filename)){ echo ""; } echo ''; } $cssFiles = array(); $cssFiles[] = "view/css/main.css"; $cssFiles = array_merge($cssFiles, AVideoPlugin::getCSSFiles()); $cssURL = combineFiles($cssFiles, "css"); ?> getDisable_analytics()) { ?> getHead(); echo $head; if (!empty($video)) { if (!empty($video['users_id'])) { $userAnalytics = new User($video['users_id']); echo $userAnalytics->getAnalytics(); unset($userAnalytics); } } ogSite(); ?> \ No newline at end of file diff --git a/view/include/navbar.php b/view/include/navbar.php index 0922ec14e..9fe7e8fd5 100644 --- a/view/include/navbar.php +++ b/view/include/navbar.php @@ -1,1403 +1,1409 @@ " class="btn btn-default" style="position: absolute; right: 10px; top: 5px;"> body{padding-top:0;}'; } echo ''; return ''; } if (!empty($advancedCustomUser->keepViewerOnChannel)) { if (!empty($_GET['channelName'])) { _session_start(); $_SESSION['channelName'] = $_GET['channelName']; } if (!empty($_GET['leaveChannel'])) { _session_start(); unset($_SESSION['channelName']); } } session_write_close(); global $includeDefaultNavBar, $global, $config, $advancedCustom, $advancedCustomUser; if (!isset($global['systemRootPath'])) { require_once '../videos/configuration.php'; } require_once $global['systemRootPath'] . 'objects/user.php'; require_once $global['systemRootPath'] . 'objects/category.php'; $_GET['parentsOnly'] = "1"; if (empty($_SESSION['language'])) { $lang = $config->getLanguage(); if(empty($lang)){ $lang = 'us_EN'; } } else { $lang = $_SESSION['language']; } $thisScriptFile = pathinfo($_SERVER["SCRIPT_FILENAME"]); if (empty($sidebarStyle)) { $sidebarStyle = "display: none;"; } $includeDefaultNavBar = true; AVideoPlugin::navBar(); if (!$includeDefaultNavBar) { return false; } if(!empty($_GET['avideoIframe'])){ // comes from avideoModalIframe(url) javascript ?> {$customizePluginDescription}"; +}else +if(!empty($metaDescription)){ + echo "

{$metaDescription}

"; +} if (!User::isLogged() && !empty($advancedCustomUser->userMustBeLoggedIn) && !empty($advancedCustomUser->userMustBeLoggedInCloseButtonURL)) { ?> userMustBeLoggedIn) && empty($advancedCustom->disableNavbar)) || $thisScriptFile["basename"] === "signUp.php" || $thisScriptFile["basename"] === "userRecoverPass.php") || User::isLogged()) { $updateFiles = getUpdatesFilesArray(); ?> underMenuBarHTMLCode->value)) { echo $advancedCustom->underMenuBarHTMLCode->value; } } else if ($thisScriptFile["basename"] !== 'user.php' && empty($advancedCustom->disableNavbar)) { } echo '', AVideoPlugin::navBarAfter(), ''; unset($_GET['parentsOnly']); ?>