]> git.wh0rd.org - tt-rss.git/blob - plugins/af_comics/filters/af_comics_twp.php
plugins: remove obsolete plugin_data/stored stuff
[tt-rss.git] / plugins / af_comics / filters / af_comics_twp.php
1 <?php
2 class Af_Comics_Twp extends Af_ComicFilter {
3
4 function supported() {
5 return array("Three Word Phrase");
6 }
7
8 function process(&$article) {
9
10 if (strpos($article["link"], "threewordphrase.com") !== FALSE) {
11
12 $doc = new DOMDocument();
13 @$doc->loadHTML(fetch_file_contents($article["link"]));
14
15 $basenode = false;
16
17 if ($doc) {
18 $xpath = new DOMXpath($doc);
19
20 $basenode = $xpath->query("//td/center/img")->item(0);
21
22 if ($basenode) {
23 $article["content"] = $doc->saveXML($basenode);
24 }
25 }
26
27 return true;
28 }
29
30 return false;
31 }
32 }
33 ?>