diff --git a/plugin/CustomizeAdvanced/CustomizeAdvanced.php b/plugin/CustomizeAdvanced/CustomizeAdvanced.php index 6acdd9a9d..340e53449 100644 --- a/plugin/CustomizeAdvanced/CustomizeAdvanced.php +++ b/plugin/CustomizeAdvanced/CustomizeAdvanced.php @@ -1,169 +1,170 @@ 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 = $global['webSiteRootURL']; $obj->encoderNetwork = "https://network.youphptube.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->uploadMP4ButtonLabel = ""; $obj->doNotShowImportMP4Button = true; $obj->importMP4ButtonLabel = ""; $obj->doNotShowEncoderButton = false; $obj->encoderButtonLabel = ""; $obj->doNotShowEmbedButton = false; $obj->embedBackgroundColor = "white"; $obj->embedButtonLabel = ""; $obj->doNotShowEncoderHLS = false; $obj->doNotShowEncoderResolutionLow = false; $obj->doNotShowEncoderResolutionSD = false; $obj->doNotShowEncoderResolutionHD = false; $obj->doNotShowLeftMenuAudioAndVideoButtons = false; $obj->doNotShowWebsiteOnContactForm = false; $obj->doNotUseXsendFile = false; $obj->makeVideosInactiveAfterEncode = false; $obj->usePermalinks = false; $obj->disableAnimatedGif = false; $obj->removeBrowserChannelLinkFromMenu = false; $obj->EnableWavesurfer = false; $obj->EnableMinifyJS = false; $obj->disableShareAndPlaylist = false; + $obj->disableComments = false; $obj->commentsMaxLength = 200; $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->autoPlayAjax= false; $plugins = Plugin::getAllEnabled(); //import external plugins configuration options foreach ($plugins as $value) { $p = YouPHPTubePlugin::loadPlugin($value['dirName']); if (is_object($p)) { $foreginObjects=$p->getCustomizeAdvancedOptions(); if($foreginObjects) { foreach($foreginObjects as $optionName => $defaultValue) $obj->{$optionName}=$defaultValue; } } } $obj->disableHelpLeftMenu= false; $obj->disableAboutLeftMenu= false; $obj->disableContactLeftMenu= false; $obj->disableNavbar= false; $obj->videosCDN = ""; $obj->useFFMPEGToGenerateThumbs = 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->askRRatingConfirmationBeforePlay_G = false; $obj->askRRatingConfirmationBeforePlay_PG = false; $obj->askRRatingConfirmationBeforePlay_PG13 = false; $obj->askRRatingConfirmationBeforePlay_R = false; $obj->askRRatingConfirmationBeforePlay_NC17 = true; $obj->askRRatingConfirmationBeforePlay_MA = true; $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->enableOldPassHashCheck = true; $obj->disableHTMLDescription = false; return $obj; } public function getHelp(){ if(User::isAdmin()){ return "

CustomizeAdvanced (admin)

".$this->getDescription()."

EnableWavesurferEnables the visualisation for audio. This will always download full audio first, so with big audio-files, you might better disable it.
commentsMaxLengthMaximum lenght for comments in videos
disableYoutubePlayerIntegration Disables the integrating of youtube-videos and just embed them.
EnableMinifyJSMinify your JS. Clear videos/cache after changing this option.
"; } return ""; } public function getTags() { return array('free', 'customization', 'buttons', 'resolutions'); } 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; } } } } diff --git a/view/modeYoutubeBottom.php b/view/modeYoutubeBottom.php index 30fd9dd80..2982af13c 100644 --- a/view/modeYoutubeBottom.php +++ b/view/modeYoutubeBottom.php @@ -1,396 +1,402 @@ {$name} " . User::getEmailVerifiedIcon($video['users_id']) . ""; $subscribe = Subscribe::getButton($video['users_id']); $video['creator'] = '
' . $name . '
' . $subscribe . '
' . humanTiming(strtotime($video['videoCreation'])) . '
'; $source = Video::getSourceFile($video['filename']); if (($video['type'] !== "audio") && ($video['type'] !== "linkAudio") && !empty($source['url'])) { $img = $source['url']; $data = getimgsize($source['path']); $imgw = $data[0]; $imgh = $data[1]; } else if ($video['type'] == "audio") { $img = "{$global['webSiteRootURL']}view/img/audio_wave.jpg"; } $type = 'video'; if ($video['type'] === 'pdf') { $type = 'pdf'; } $images = Video::getImageFromFilename($video['filename'], $type); $poster = $images->poster; if (!empty($images->posterPortrait) && basename($images->posterPortrait) !== 'notfound_portrait.jpg' && basename($images->posterPortrait) !== 'pdf_portrait.png' && basename($images->posterPortrait) !== 'article_portrait.png') { $img = $images->posterPortrait; $data = getimgsize($source['path']); $imgw = $data[0]; $imgh = $data[1]; } } ?>
<?php echo str_replace('" class="img img-responsive rotate" height="130" itemprop="thumbnail" /> - " />

"> label === __("Group")) { ?> text; ?>

doNotDisplayViews)) { ?>
disableShareAndPlaylist)) { ?> removeThumbsUpAndDown)) { ?> " id="dislikeBtn" data-toggle="tooltip" title="" > " id="likeBtn" data-toggle="tooltip" title="" >
:
:
:
disableHTMLDescription)?$video['description']:nl2br(textToLink(htmlentities($video['description']))); ?>
-
- -
\ No newline at end of file +disableComments)){ + ?> +
+ +
+ \ No newline at end of file