3
1
Back

$path); /* replace '//' or '/./' or '/foo/../' with '/' */ $re = array('#(/\.?/)#', '#/(?!\.\.)[^/]+/\.\./#'); for($n=1; $n>0; $abs=preg_replace($re, '/', $abs, -1, $n)) { } function rel2abs($rel, $base) { Fix for two bugs in Doghouse Diaries rss: spaces in img src and quotes in alt/title text under images (extra useful for non-browser users elseif (strpos($article['link'], 'leasticoulddo.com/comic') !== FALSE) { elseif (strpos($article['link'], 'cad-comic.com/sillies/') !== FALSE) { // Alice Grove bigger img 2015-07-08 21:01:00 -07:00 From cb3a50e19a42a9ab425057cfa1f9427c1c21d019 Mon Sep 17 00:00:00 2001 Subject: [PATCH] Some comics supported if (strpos($article["link"], "penny-arcade.com") !== FALSE && // Cyanide & Happiness elseif (strpos($article["link"], "www.phdunknown.com/index.php?id=") !== FALSE) { elseif (strpos($article['content'], 'www.asofterworld.com/index.php?id') !== FALSE && strpos($article["title"], "Comic:") !== FALSE) { elseif (strpos($article['link'], 'cad-comic.com/sillies/') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); Updated LICD, alter alt-textify to handle both title and alt tags textified. Elseif (strpos($article['content'], 'www.asofterworld.com/index.php?id') !== FALSE ) { // CTRL+ALT+DEL Sillies // CTRL+ALT+DEL elseif (strpos($article['link'], 'jesusandmo.net') !== FALSE) { $doc = new DOMDocument(); $doc->loadHTML($article['content']); $xpath = $this->get_xpath_dealie($article['link']); elseif (strpos($article['content'], 'www.asofterworld.com/index.php?id') !== FALSE && // SatW // SatW elseif (strpos($article["link"], "www.smbc-comics.com/comic/") !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//div[@id='content']/img", $article); } // Pain Train alt tag, Alice Grove (get bigger image // $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//figure[@class='photo-hires-item']//img", $article); } // Three Panel Soul elseif (strpos($article['link'], 'cad-comic.com/cad/') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); // Joy of Tech elseif (strpos($article['link'], 'somethingpositive.net') !== FALSE) { if (anchor_hole=="right" || anchor_hole=="both") { if ($img->getAttribute('title')) { $article['content'] = $this->get_img_tags($xpath, "//div[@id='comic']/img", $article); elseif (strpos($article['link'], 'campcomic.com/comic/') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $img_tag . $article['content']; } // Awkward Zombie elseif (strpos($article['link'], 'twolumps.net/d/') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); } /* dirty absolute URL */ $abs = "$host$path/$rel"; /* replace '//' or '/./' or '/foo/../' with '/' */ $re = array('#(/\.?/)#', '#/(?!\.\.)[^/]+/\.\./#'); for($n=1; $n>0; $abs=preg_replace($re, '/', $abs, -1, $n)) { } else { return $base.$rel; } extract(parse_url($base)); $path = preg_replace('#/[^/]*$#', '', $path); if ($rel[0] == '#' || $rel[0] == '?') { return $article; } function get_content($link) { $html = fetch_file_contents($link); $content_type = $fetch_last_content_type; return array( 0.1, 'Yet more stupid-simple comic-fetching.', ' '); ' ' ); } module smoothing() { // CTRL+ALT+DEL Sillies elseif (strpos($article['link'], 'qwantz.com/index.php?comic') !== FALSE) { elseif (strpos($article['link'], 'gunnerkrigg.com/?p') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//img[contains(@src, 'sp') and contains(@src, 'png')]", $article); } // Joy of Tech // Joy of.

New Pull Request