diff --git a/plugin/ADs/ADs.php b/plugin/ADs/ADs.php
index f2658f1f5..8ea0f3a04 100644
--- a/plugin/ADs/ADs.php
+++ b/plugin/ADs/ADs.php
@@ -1,159 +1,159 @@
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']);
$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"];
$head .= str_replace(array('{ChannelName}','{Category}'), array(addcslashes($channelName,"'"), addcslashes($category,"'")), $obj->tags3rdParty);
return $head;
}
}
}
if(!empty($_GET['catName'])){
if(!empty($obj->tags3rdParty)){
$v = Category::getCategoryByName($_GET['catName']);
if(!empty($v)){
$head .= str_replace(array(',','{ChannelName}','{Category}'), array('', '', addcslashes($v["name"],"'")), $obj->tags3rdParty);
return $head;
}
}
}
if(!empty($_GET['channelName'])){
if(!empty($obj->tags3rdParty)){
$head .= str_replace(array(',','{ChannelName}','{Category}'), array('', addcslashes($_GET['channelName'],"'"), ''), $obj->tags3rdParty);
return $head;
}
}
return "{$head}";
}
static function giveGoogleATimeout($adCode){
if(preg_match("/adsbygoogle/i", $adCode)){
$adCode = str_replace("(adsbygoogle = window.adsbygoogle || []).push({});", "clearTimeout(adsbygoogleTimeout); adsbygoogleTimeout = setTimeout(function () {(adsbygoogle = window.adsbygoogle || []).push({});},3000);", trim($adCode));
- $adCode = "{$adCode}
";
+ $adCode = "
{$adCode}
";
}
return $adCode;
}
}
\ No newline at end of file