Help"; return $txt . $help; } public function getName() { return "CustomizeAdvanced"; } public function getUUID() { return "55a4fa56-8a30-48d4-a0fb-8aa6b3f69033"; } public function getPluginVersion() { return "1.0"; } public function getEmptyDataObject() { global $global; $obj = new stdClass(); $obj->logoMenuBarURL = ""; $obj->encoderNetwork = "https://network.avideo.com/"; $obj->useEncoderNetworkRecomendation = false; $obj->doNotShowEncoderNetwork = true; $obj->doNotShowUploadButton = false; $obj->uploadButtonDropdownIcon = "fas fa-video"; $obj->uploadButtonDropdownText = ""; $obj->encoderNetworkLabel = ""; $obj->doNotShowUploadMP4Button = true; $obj->disablePDFUpload = false; $obj->disableImageUpload = false; $obj->disableZipUpload = true; $obj->disableMP4Upload = false; $obj->disableMP3Upload = false; $obj->uploadMP4ButtonLabel = ""; $obj->doNotShowImportMP4Button = true; $obj->importMP4ButtonLabel = ""; $obj->doNotShowEncoderButton = false; $obj->encoderButtonLabel = ""; $obj->doNotShowEmbedButton = false; $obj->embedBackgroundColor = "white"; $obj->embedButtonLabel = ""; $obj->embedCodeTemplate = '
'; $obj->embedCodeTemplateObject = '
'; $obj->htmlCodeTemplate = '{title}'; $obj->BBCodeTemplate = '[url={permaLink}][img]{imgSRC}[/img]{title}[/url]'; $obj->doNotShowEncoderHLS = false; $obj->doNotShowEncoderResolutionLow = false; $obj->doNotShowEncoderResolutionSD = false; $obj->doNotShowEncoderResolutionHD = false; $obj->openEncoderInIFrame = false; $obj->showOnlyEncoderAutomaticResolutions = true; $obj->doNotShowEncoderAutomaticHLS = false; $obj->doNotShowEncoderAutomaticMP4 = false; $obj->doNotShowEncoderAutomaticWebm = false; $obj->doNotShowEncoderAutomaticAudio = false; $obj->saveOriginalVideoResolution = false; self::addDataObjectHelper('saveOriginalVideoResolution', 'Do not save original video', 'This option will make your encoder at the end trancode the video into the original format resolution'); $obj->doNotShowExtractAudio = false; $obj->doNotShowCreateVideoSpectrum = false; $obj->doNotShowLeftMenuAudioAndVideoButtons = false; $obj->doNotShowWebsiteOnContactForm = false; $obj->doNotUseXsendFile = false; $obj->makeVideosInactiveAfterEncode = false; $obj->makeVideosUnlistedAfterEncode = false; $obj->usePermalinks = false; $obj->useVideoIDOnSEOLinks = true; $obj->disableAnimatedGif = false; $obj->removeBrowserChannelLinkFromMenu = false; $obj->EnableMinifyJS = false; $obj->disableShareAndPlaylist = false; $obj->disableShareOnly = false; $obj->disableEmailSharing = false; $obj->splitBulkEmailSend = 50; $obj->disableComments = false; $obj->commentsMaxLength = 200; $obj->commentsNoIndex = false; $obj->disableYoutubePlayerIntegration = false; $obj->utf8Encode = false; $obj->utf8Decode = false; $o = new stdClass(); $o->type = "textarea"; $o->value = ""; $obj->menuBarHTMLCode = $o; $o->type = "textarea"; $o->value = ""; $obj->underMenuBarHTMLCode = $o; $o->type = "textarea"; $o->value = ""; $obj->footerHTMLCode = $o; $obj->signInOnRight = true; $obj->signInOnLeft = true; $obj->forceCategory = false; $obj->showCategoryTopImages = true; $obj->autoPlayAjax = false; $plugins = Plugin::getAllEnabled(); //import external plugins configuration options foreach ($plugins as $value) { $p = AVideoPlugin::loadPlugin($value['dirName']); if (is_object($p)) { $foreginObjects = $p->getCustomizeAdvancedOptions(); if ($foreginObjects) { foreach ($foreginObjects as $optionName => $defaultValue) $obj->{$optionName} = $defaultValue; } } } $obj->disablePlayLink = false; $obj->disableHelpLeftMenu = false; $obj->disableAboutLeftMenu = false; $obj->disableContactLeftMenu = false; $obj->disableNavbar = false; $obj->disableNavBarInsideIframe = true; $obj->autoHideNavbar = true; $obj->autoHideNavbarInSeconds = 0; $obj->videosCDN = ""; $obj->useFFMPEGToGenerateThumbs = false; $obj->thumbsWidthPortrait = 170; $obj->thumbsHeightPortrait = 250; $obj->thumbsWidthLandscape = 640; $obj->thumbsHeightLandscape = 360; $obj->usePreloadLowResolutionImages = false; $obj->showImageDownloadOption = false; $obj->doNotDisplayViews = false; $obj->doNotDisplayLikes = false; $obj->doNotDisplayCategoryLeftMenu = false; $obj->doNotDisplayCategory = false; $obj->doNotDisplayGroupsTags = false; $obj->doNotDisplayPluginsTags = false; $obj->showNotRatedLabel = false; $obj->showShareMenuOpenByDefault = false; $obj->askRRatingConfirmationBeforePlay_G = false; $obj->askRRatingConfirmationBeforePlay_PG = false; $obj->askRRatingConfirmationBeforePlay_PG13 = false; $obj->askRRatingConfirmationBeforePlay_R = false; $obj->askRRatingConfirmationBeforePlay_NC17 = true; $obj->askRRatingConfirmationBeforePlay_MA = true; $obj->filterRRating = false; $obj->AsyncJobs = false; $obj->doNotShowLeftHomeButton = false; $obj->doNotShowLeftTrendingButton = false; $obj->CategoryLabel = "Categories"; $obj->ShowAllVideosOnCategory = false; $obj->hideCategoryVideosCount = false; //ver 7.1 $obj->paidOnlyUsersTellWhatVideoIs = false; $obj->paidOnlyShowLabels = false; $obj->paidOnlyLabel = "Premium"; $obj->paidOnlyFreeLabel = "Free"; $obj->removeSubscribeButton = false; $obj->removeThumbsUpAndDown = false; $o = new stdClass(); $o->type = "textarea"; $o->value = ""; $obj->videoNotFoundText = $o; $obj->siteMapRowsLimit = 100; $obj->siteMapUTF8Fix = false; $obj->showPrivateVideosOnSitemap = false; $obj->enableOldPassHashCheck = true; $obj->disableHTMLDescription = false; $obj->disableVideoSwap = false; $obj->makeSwapVideosOnlyForAdmin = false; $obj->disableCopyEmbed = false; $obj->disableDownloadVideosList = false; $obj->videosManegerRowCount = "[10, 25, 50, -1]"; //An Array of Integer which will be shown in the dropdown box to choose the row count. Default value is [10, 25, 50, -1]. -1 means all. When passing an Integer value the dropdown box will disapear. $obj->videosListRowCount = "[10, 20, 30, 40, 50]"; //An Array of Integer which will be shown in the dropdown box to choose the row count. Default value is [10, 25, 50, -1]. -1 means all. When passing an Integer value the dropdown box will disapear. $parse = parse_url($global['webSiteRootURL']); $domain = str_replace(".", "", $parse['host']); $obj->twitter_site = "@{$domain}"; $obj->twitter_player = true; $obj->twitter_summary_large_image = false; $obj->footerStyle = "position: fixed;bottom: 0;width: 100%;"; $obj->disableVideoTags = false; $obj->doNotAllowEncoderOverwriteStatus = false; $obj->doNotAllowUpdateVideoId = false; $obj->makeVideosIDHarderToGuess = false; self::addDataObjectHelper('makeVideosIDHarderToGuess', 'Make the videos ID harder to guess', 'This will change the videos_id on the URL to a crypted value. this crypt user your $global[salt] (configuration.php), so make sure you keep it save in case you need to restore your site, otherwise all the shared links will be lost'); $o = new stdClass(); $o->type = DateTimeZone::listIdentifiers(DateTimeZone::ALL); $o->value = 0; $obj->timeZone = $o; $obj->keywords = "AVideo, videos, live, movies"; return $obj; } public function getHelp() { if (User::isAdmin()) { return "

CustomizeAdvanced (admin)

" . $this->getDescription() . "

"; } return ""; } public function getModeYouTube($videos_id) { global $global, $config; $obj = $this->getDataObject(); $video = Video::getVideo($videos_id, "viewable", true); if (!empty($video['rrating']) && empty($_GET['rrating'])) { $suffix = strtoupper(str_replace("-", "", $video['rrating'])); eval("\$show = \$obj->askRRatingConfirmationBeforePlay_$suffix;"); if (!empty($show)) { include "{$global['systemRootPath']}plugin/CustomizeAdvanced/confirmRating.php"; exit; } } } public function getEmbed($videos_id) { return $this->getModeYouTube($videos_id); } public function getFooterCode() { global $global; $obj = $this->getDataObject(); $content = ''; if ($obj->autoHideNavbar && !isEmbed()) { $content .= ''; $content .= ''; } if ($obj->autoHideNavbarInSeconds && !isEmbed()) { $content .= ''; } return $content; } public function getHTMLMenuRight() { global $global; $obj = $this->getDataObject(); if ($obj->filterRRating) { include $global['systemRootPath'] . 'plugin/CustomizeAdvanced/menuRight.php'; } } public function getHTMLMenuLeft() { global $global; $obj = $this->getDataObject(); if ($obj->filterRRating) { include $global['systemRootPath'] . 'plugin/CustomizeAdvanced/menuLeft.php'; } } public static function getVideoWhereClause() { $sql = ""; $obj = AVideoPlugin::getObjectData("CustomizeAdvanced"); if ($obj->filterRRating && isset($_GET['rrating'])) { if ($_GET['rrating'] === "0") { $sql .= " AND v.rrating = ''"; } else if (in_array($_GET['rrating'], Video::$rratingOptions)) { $sql .= " AND v.rrating = '{$_GET['rrating']}'"; } } return $sql; } public function getVideosManagerListButton() { $btn = ""; if (User::isAdmin()) { $btn = ''; $btn .= ''; } return $btn; } public function getHeadCode() { global $global; $obj = $this->getDataObject(); $baseName = basename($_SERVER['REQUEST_URI']); $js = ""; if(empty($obj->autoPlayAjax)){ $js .= ""; }else{ $js .= ""; } if ($baseName === 'mvideos') { $js .= ""; $js .= ""; } return $js; } }