Help"; return $txt.$help; } public function getName() { return "YouPHPFlix2"; } public function getUUID() { return "e3a568e6-ef61-4dcc-aad0-0109e9be8e36"; } public function getPluginVersion() { return "1.0"; } public function getEmptyDataObject() { global $global; $obj = new stdClass(); $obj->hidePrivateVideos = false; $obj->pageDots = true; $obj->Suggested = true; $obj->SuggestedAutoPlay = true; $obj->PlayList = true; $obj->PlayListAutoPlay = true; $obj->Channels = true; $obj->ChannelsAutoPlay = true; $obj->Trending = true; $obj->TrendingAutoPlay = true; $obj->DateAdded = true; $obj->DateAddedAutoPlay = true; $obj->MostPopular = true; $obj->MostPopularAutoPlay = true; $obj->MostWatched = true; $obj->MostWatchedAutoPlay = true; $obj->SortByName = false; $obj->SortByNameAutoPlay = true; $obj->Categories = true; $obj->CategoriesAutoPlay = true; $obj->maxVideos = 20; $obj->BigVideo = true; $obj->RemoveBigVideoDescription = false; $obj->BigVideoPlayIcon = true; $obj->BigVideoMarginBottom = "-350px"; $obj->backgroundRGB = "20,20,20"; $obj->landscapePosters = true; $obj->playVideoOnFullscreen = true; $obj->playVideoOnFullscreenOnIframe = true; $obj->youtubeModeOnFullscreen = false; $obj->paidOnlyLabelOverPoster = false; $obj->titleLabel = true; $obj->titleLabelOverPoster = false; $obj->titleLabelCSS = ""; $obj->hidePlayButtonIfCannotWatch = false; $obj->doNotShowSeriesInfoOnMainPage = false; return $obj; } public function getHelp(){ if(User::isAdmin()){ return "

YouPHPFlix options (admin)

Option-nameDefaultDescription
DefaultDesigncheckedThe original style, for each category, one row with the newest videos
DateAdded,MostPopular,MostWatched,SortByNamechecked,checked,checked,uncheckedMetacategories
LiteDesignunchecked All categories in one row
separateAudiouncheckedCreate a own row for audio
"; } return ""; } public function getFirstPage(){ global $global; return $global['systemRootPath'].'plugin/YouPHPFlix2/view/modeFlix.php'; } public function getHeadCode() { global $global, $isEmbed; $obj = $this->getDataObject(); $baseName = basename($_SERVER["SCRIPT_FILENAME"]); if($baseName == 'channel.php'){ return ""; } $css = ""; //$css .= "theme.".css\" rel=\"stylesheet\" type=\"text/css\"/>"; $css .= ""; if(!empty($obj->youtubeModeOnFullscreen) && canFullScreen()){ $isEmbed = 1; $css .= ''; $css .= ''; $css .= ''; } return $css; } static function getLinkToVideo($videos_id, $ignoreEmbed = false){ $obj = AVideoPlugin::getObjectData("YouPHPFlix2"); $link = Video::getLinkToVideo($videos_id); if(!empty($obj->playVideoOnFullscreen)){ if(!Video::isSerie($videos_id) && empty($ignoreEmbed)){ $link = parseVideos($link, 1, 0, 0, 0, 1); } } return $link; } public function getFooterCode() { $obj = $this->getDataObject(); global $global; $js = ''; if (!empty($obj->playVideoOnFullscreenOnIframe) && !isSerie()) { $js .= ''; $js .= ''; } else if (!empty($obj->playVideoOnFullscreen) && !isSerie()) { $js .= ''; $js .= ''; } else{ $js .= ''; } $js .= ''; return $js; } }