3
1
Back

It, otherwise I'm just scratching my own itch here. * Most important: Keep it simple. Follow one pattern. Class _comics extends Plugin { 'Yet more stupid-simple comic-fetching.', } function hook_render_article_cdm($article) { function rel2abs($rel, $base) { if (preg_match("@.*()@", $article['content'], $matches)) { $img = $matches[1]; } } // Camp Weedonwantcha elseif (strpos($article['link'], 'girlswithslingshots.com/comic/') !== FALSE) { $xpath = new DOMDocument(); $doc->loadHTML($article['content']); $xpath = $this->get_xpath_dealie($bread_page_url); $extraimage = $xpath->query("//img[@class='extrapanelimage']")->item(0); //also get blog elseif (strpos($article['link'], 'http://www.geekculture.com/joyoftech/') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//div[@id='comic']/img", $article); $article['content'] = $img_tag . $article['content']; // Cyanide & Happiness elseif (strpos(strtolower($article['link']), 'giantitp.com/comics/') !== FALSE) { elseif (strpos($article['content'], 'www.asofterworld.com/index.php?id') !== 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); } // Least I Could Do (wtf image size?) elseif (strpos($article['link'], 'leasticoulddo.com/comic') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//div[@class='comicpage']//img[contains(@src, 'Strip')]", $article); $article['content'] .= "

" . $entry->textContent . "

New Pull Request