diff --git a/plugin/ADs/ADs.php b/plugin/ADs/ADs.php
index aae710f6b..57e103bbd 100644
--- a/plugin/ADs/ADs.php
+++ b/plugin/ADs/ADs.php
@@ -1,153 +1,155 @@
Help";
$help = "";
return $txt . $help;
}
public function getName() {
return "ADs";
}
public function getUUID() {
return "ADs73225-3807-4167-ba81-0509dd280e06";
}
public function getPluginVersion() {
return "1.0";
}
public function getEmptyDataObject() {
global $global,$config;
$obj = new stdClass();
$adsense = $config->getAdsense();
$o = new stdClass();
$o->type = "textarea";
$o->value = empty($adsense)?"
":$adsense;;
$obj->leaderBoardBigVideo = $o;
$o = new stdClass();
$o->type = "textarea";
$o->value = empty($adsense)?"
":$adsense;
$obj->leaderBoardTop = $o;
$o = new stdClass();
$o->type = "textarea";
$o->value = empty($adsense)?"
":$adsense;
$obj->leaderBoardTop2 = $o;
$o = new stdClass();
$o->type = "textarea";
$o->value = empty($adsense)?"
":$adsense;
$obj->channelLeaderBoardTop = $o;
$o = new stdClass();
$o->type = "textarea";
$o->value = empty($adsense)?"
":$adsense;;
$obj->leaderBoardMiddle = $o;
/*
$o = new stdClass();
$o->type = "textarea";
$o->value = empty($adsense)?"
":$adsense;;
$obj->leaderBoardFooter = $o;
*
*/
$o = new stdClass();
$o->type = "textarea";
$o->value = empty($adsense)?"
":$adsense;;
$obj->sideRectangle = $o;
$o = new stdClass();
$o->type = "textarea";
$o->value = empty($adsense)?"
":$adsense;;
$obj->leaderBoardBigVideoMobile = $o;
$o = new stdClass();
$o->type = "textarea";
$o->value = empty($adsense)?"
":$adsense;;
$obj->leaderBoardTopMobile = $o;
$o = new stdClass();
$o->type = "textarea";
$o->value = empty($adsense)?"
":$adsense;;
$obj->leaderBoardTopMobile2 = $o;
$o = new stdClass();
$o->type = "textarea";
$o->value = empty($adsense)?"
":$adsense;
$obj->channelLeaderBoardTopMobile = $o;
$o = new stdClass();
$o->type = "textarea";
$o->value = empty($adsense)?"
":$adsense;;
$obj->leaderBoardMiddleMobile = $o;
/*
$o = new stdClass();
$o->type = "textarea";
$o->value = empty($adsense)?"
":$adsense;
$obj->leaderBoardFooterMobile = $o;
*
*/
$obj->tags3rdParty = "";
return $obj;
}
public function getHeadCode() {
+ $head = "";
if(!empty($_GET['abkw'])){
$abkw = preg_replace('/[^a-zA-Z0-9_ ,-]/', '',$_GET['abkw']);
- return "";
+ $head .= "";
+ return $head;
}
$obj = $this->getDataObject();
if(!empty($_GET['videoName'])){
if(!empty($obj->tags3rdParty)){
$v = Video::getVideoFromCleanTitle($_GET['videoName']);
if(!empty($v)){
$channelName = $v["channelName"];
$category = $v["category"];
- $tag = str_replace(array('{ChannelName}','{Category}'), array(addcslashes($channelName,"'"), addcslashes($category,"'")), $obj->tags3rdParty);
+ $head .= str_replace(array('{ChannelName}','{Category}'), array(addcslashes($channelName,"'"), addcslashes($category,"'")), $obj->tags3rdParty);
- return $tag;
+ return $head;
}
}
}
if(!empty($_GET['catName'])){
if(!empty($obj->tags3rdParty)){
$v = Category::getCategoryByName($_GET['catName']);
if(!empty($v)){
- $tag = str_replace(array(',','{ChannelName}','{Category}'), array('', '', addcslashes($v["name"],"'")), $obj->tags3rdParty);
- return $tag;
+ $head .= str_replace(array(',','{ChannelName}','{Category}'), array('', '', addcslashes($v["name"],"'")), $obj->tags3rdParty);
+ return $head;
}
}
}
if(!empty($_GET['channelName'])){
if(!empty($obj->tags3rdParty)){
- $tag = str_replace(array(',','{ChannelName}','{Category}'), array('', addcslashes($_GET['channelName'],"'"), ''), $obj->tags3rdParty);
- return $tag;
+ $head .= str_replace(array(',','{ChannelName}','{Category}'), array('', addcslashes($_GET['channelName'],"'"), ''), $obj->tags3rdParty);
+ return $head;
}
}
- return "";
+ return "{$head}";
}
static function giveGoogleATimeout($adCode){
return str_replace("(adsbygoogle = window.adsbygoogle || []).push({});", "clearTimeout(adsbygoogleTimeout); adsbygoogleTimeout = setTimeout(function () {(adsbygoogle = window.adsbygoogle || []).push({});},3000);", trim($adCode));
}
}
\ No newline at end of file