function hook_render_article($article) {
$tags = array_map("trim", explode(", ", $this->host->get($this, "tags")));
+ $a_tags = array_map("trim", explode(", ", $article["tag_cache"]));
- if (count(array_intersect($tags, $article["tags"])) > 0) {
+ if (count(array_intersect($tags, $a_tags)) > 0) {
$article["content"] = "<div class='nswf wrapper'><button onclick=\"nsfwShow(this)\">".__("Not work safe (click to toggle)")."</button>
<div class='nswf content' style='display : none'>".$article["content"]."</div></div>";
}
function hook_render_article_cdm($article) {
$tags = array_map("trim", explode(", ", $this->host->get($this, "tags")));
+ $a_tags = array_map("trim", explode(", ", $article["tag_cache"]));
- if (count(array_intersect($tags, $article["tags"])) > 0) {
+ if (count(array_intersect($tags, $a_tags)) > 0) {
$article["content"] = "<div class='nswf wrapper'><button onclick=\"nsfwShow(this)\">".__("Not work safe (click to toggle)")."</button>
<div class='nswf content' style='display : none'>".$article["content"]."</div></div>";
}
}
function save() {
- $tags = explode(",", db_escape_string( $_POST["tags"]));
+ $tags = explode(",", db_escape_string($_POST["tags"]));
$tags = array_map("trim", $tags);
$tags = array_map("mb_strtolower", $tags);
$tags = join(", ", $tags);
echo __("Configuration saved.");
}
+ function api_version() {
+ return 2;
+ }
+
}
?>