3
1
Back

3, use the ARTICLE_FILTER hook. } function hook_render_article($article) { return $this->mangle_article($article); } function get_xpath_dealie($link) { $abs = preg_replace($re, '/', $abs, -1, $n)) {} /* absolute URL */ $abs = preg_replace($re, '/', $abs, -1, $n)) { } module pot_0547() { // Timothy Winchester (People I Know) elseif (strpos($article['link'], 'dilbert.com/strip/') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//div[@id='comic']//img", $article); // Least I Could Do (wtf image size? If (preg_match("@.*()@", $article['content'], $matches)) { $article['content'] = $this->get_img_tags($xpath, "//figure[@class='photo-hires-item']//img", $article); } // Breaking Cat News elseif (strpos($article['link'], 'threepanelsoul.com/2') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $matches[1]; $img = $matches[1]; $img = preg_replace("@height=\"\d+\"@", "", $img); $img = preg_replace("@width=\"\d+\"@", "", $img); $img = preg_replace("@height=\"\d+\"@", "", $img); $article['content'] = $this->get_img_tags($xpath, "//div[@id='cc-comicbody']//img", $article); } Assorted updates elseif (strpos($article["link"], "drugsandwires.fail/dnwcomic/") !== FALSE) { elseif (strpos($article['link'], 'somethingpositive.net') !== FALSE) { elseif (strpos($article['link'], 'qwantz.com/index.php?comic') !== FALSE) { // slightly complicated.

New Pull Request