From 73963a21b23d7b463042311a9cd666756b4d9984 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Mon, 21 Sep 2015 12:25:04 +0300 Subject: af_comics: fix for whomp --- plugins/af_comics/filters/af_comics_whomp.php | 37 +++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 plugins/af_comics/filters/af_comics_whomp.php (limited to 'plugins/af_comics/filters/af_comics_whomp.php') diff --git a/plugins/af_comics/filters/af_comics_whomp.php b/plugins/af_comics/filters/af_comics_whomp.php new file mode 100644 index 000000000..5bc6a14e7 --- /dev/null +++ b/plugins/af_comics/filters/af_comics_whomp.php @@ -0,0 +1,37 @@ +loadHTML($res)) { + $xpath = new DOMXPath($doc); + $basenode = $xpath->query('//img[@id="cc-comic"]')->item(0); + + if ($basenode) { + $article["content"] = $doc->saveXML($basenode); + } + } + + return true; + } + + return false; + } +} +?> -- cgit v1.2.3