From: Andrew Dolgov Date: Tue, 12 Aug 2014 15:36:57 +0000 (+0400) Subject: add af_comics_darklegacy X-Git-Tag: 1.14~38 X-Git-Url: https://git.wh0rd.org/?p=tt-rss.git;a=commitdiff_plain;h=694f96abb69ecc8bedf3976025a50316730f3bfb add af_comics_darklegacy --- diff --git a/plugins/af_comics/filters/af_comics_darklegacy.php b/plugins/af_comics/filters/af_comics_darklegacy.php new file mode 100644 index 00000000..d87a3da2 --- /dev/null +++ b/plugins/af_comics/filters/af_comics_darklegacy.php @@ -0,0 +1,50 @@ +loadHTML($res); + + $basenode = false; + + if ($doc) { + $xpath = new DOMXPath($doc); + $basenode = $xpath->query('//div[@class="comic"]')->item(0); + + if ($basenode) { + + $article["content"] = $doc->saveXML($basenode); + $article["plugin_data"] = "af_comics,$owner_uid:" . $article["plugin_data"]; + } + } + } else if (isset($article["stored"]["content"])) { + $article["content"] = $article["stored"]["content"]; + } + + return true; + } + + return false; + } +} +?>