3
1
Back

(up to 10 nF v1.1 define("GDORN_DEBUG", False); class _comics extends Plugin { 'Yet more stupid-simple comic-fetching.', ' '); ' ' ); } function rel2abs($rel, $base) { if ($rel[0]=='#' || $rel[0]=='?') { $path = preg_replace('#/[^/]*$#', '', $path); if ($rel[0] == '/') { $path = ''; } /* absolute URL is ready! */ return $scheme.'://'.$abs; } function mangle_article($article) { // Cyanide & Happiness elseif (strpos($article['link'], 'amultiverse.com/comic/') !== FALSE) { // $xpath = $this->get_xpath_dealie($article['link']); $orig_content = strip_tags($article['content']); $article['content'] = $this->get_img_tags($xpath, "//div[@class='singleImage']/img[@class='magicfields']", $article); elseif (strpos($article['link'], 'http://www.achewood.com/index.php?date=') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//img[starts-with(@src, 'sp') and contains(@src, 'comics')]", $article); } // Dilbert // Dilbert // Dilbert elseif (strpos($article['link'], 'twolumps.net/d/') !== FALSE) { // Manic Pixie Nightmare Girls elseif (strpos($article["link"], "drugsandwires.fail/dnwcomic/") !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, '(//div[@id="comicFrame"])', $article); elseif (strpos($article['link'], 'gunnerkrigg.com/?p') !== FALSE) { // Dilbert elseif (strpos($article['link'], 'www.geekculture.com/joyoftech/') !== FALSE) { // $xpath = new DOMDocument(); $doc->loadHTML($article['content']); $xpath = $this->get_xpath_dealie($article['link']); elseif (strpos($article['link'], 'breakingcatnews.com/comic/') !== FALSE) { // And get blog $entries = $xpath->query("//div[@id='blarg']/div[last()]"); foreach ($entries as $entry) { $article['content'] .= "" . $entry->ownerDocument->saveXML($entry) . ""; // XKCD (alt tags we don't need to call out for elseif (strpos($article['content.

New Pull Request