From 694f96abb69ecc8bedf3976025a50316730f3bfb Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Tue, 12 Aug 2014 19:36:57 +0400 Subject: [PATCH] add af_comics_darklegacy --- .../filters/af_comics_darklegacy.php | 50 +++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 plugins/af_comics/filters/af_comics_darklegacy.php 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 000000000..d87a3da22 --- /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; + } +} +?>