diff --git a/plugin/ADs/ADs.php b/plugin/ADs/ADs.php
index a337f5a21..273644153 100644
--- a/plugin/ADs/ADs.php
+++ b/plugin/ADs/ADs.php
@@ -1,119 +1,119 @@
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->leaderBoardTop = $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->leaderBoardBigVideo = $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->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->leaderBoardTopMobile = $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() {
+ if(!empty($_GET['abkw'])){
+ $abkw = preg_replace('/[^a-zA-Z0-9_ ,-]/', '',$_GET['abkw']);
+ return "";
+ }
if(!empty($_GET['videoName'])){
$obj = $this->getDataObject();
if(!empty($obj->tags3rdParty)){
$v = Video::getVideoFromCleanTitle($_GET['videoName']);
- if(!empty($v)){
- if(!empty($_GET['abkw'])){
- $abkw = preg_replace('/[^a-zA-Z0-9_ ,-]/', '',$_GET['abkw']);
- $tag = "";
- }else{
- $channelName = $v["channelName"];
- $category = $v["category"];
- $tag = str_replace(array('{ChannelName}','{Category}'), array(addcslashes($channelName,"'"), addcslashes($category,"'")), $obj->tags3rdParty);
- }
+ if(!empty($v)){
+ $channelName = $v["channelName"];
+ $category = $v["category"];
+ $tag = str_replace(array('{ChannelName}','{Category}'), array(addcslashes($channelName,"'"), addcslashes($category,"'")), $obj->tags3rdParty);
+
return $tag;
}
}
}else if(!empty($_GET['catName'])){
$obj = $this->getDataObject();
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;
}
}
}
return '';
}
public function getTags() {
return array('free');
}
}
\ No newline at end of file