diff --git a/plugin/AD_Server/Objects/VastCampaignsLogs.php b/plugin/AD_Server/Objects/VastCampaignsLogs.php old mode 100755 new mode 100644 diff --git a/plugin/AdsForJesus/AdsForJesus.php b/plugin/AdsForJesus/AdsForJesus.php new file mode 100644 index 000000000..e07b16079 --- /dev/null +++ b/plugin/AdsForJesus/AdsForJesus.php @@ -0,0 +1,133 @@ +This will give your users the greatest wisdom of all, as well as invaluable value. "; + $help = "
4JesusTV"; + return $txt . $help; + } + + public function getName() { + return "AdsForJesus"; + } + + public function getUUID() { + return "AdsForJesus-43a9-479b-994a-5430dc22958c"; + } + + public function getEmptyDataObject() { + $obj = new stdClass(); + $obj->start = true; + $obj->mid25Percent = true; + $obj->mid50Percent = true; + $obj->mid75Percent = true; + $obj->end = true; + + return $obj; + } + + public function getHeadCode() { + $js = ''; + $css = ''; + //if (!empty($_GET['videoName']) || !empty($_GET['u'])) { + if (!empty($_GET['videoName'])) { + if (empty($_GET['u'])) { + $video = Video::getVideoFromCleanTitle($_GET['videoName']); + $showAds = YouPHPTubePlugin::showAds($video['id']); + if (!$showAds) { + return ""; + } + } + global $global; + $css .= ''; + $css .= ''; + } + return $js . $css; + } + + public function getFooterCode() { + $js = ''; + //if (!empty($_GET['videoName']) || !empty($_GET['u'])) { + if (!empty($_GET['videoName'])) { + if (empty($_GET['u'])) { + $video = Video::getVideoFromCleanTitle($_GET['videoName']); + $showAds = YouPHPTubePlugin::showAds($video['id']); + if (!$showAds) { + return ""; + } + } else { + $video['duration'] = "01:00:00"; + $_GET['videoName'] = "Live-" . uniqid(); + } + global $global; + + $video_length = parseDurationToSeconds($video['duration']); + $obj = $this->getDataObject(); + + $js .= ''; + $js .= ' + '; + + $js .= ""; + $js .= " + "; + } + return $js; + } + +} diff --git a/view/update.php b/view/update.php old mode 100755 new mode 100644