3
1
Back

Philosophers 2015-02-25 15:05:54 -08:00 // Eat That Toast elseif (strpos($article["link"], "www.smbc-comics.com/comic/") !== FALSE) { $xpath = new DOMXpath($doc); $imgs = $xpath->query('//img'); //doesn't get simpler than this // only keep everything starting at the center, then to point at the first if (preg_match("@.*()@", $article['content'], $matches)) { $article['content'] .= $aftercomic; $article['content'] .= "
Error processing via _comics plugin!
" . $e->getMessage(); function mangle_article($article) { // Drugs and Wires elseif (strpos($article['link'], 'qwantz.com/index.php?comic') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); // Girls with Slingshots 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="comicbody"]//img)', $article) . $article['content']; elseif (strpos($article["link"], "trenchescomic.com/comic/post/") !== FALSE ) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//div[@id='comic']/img", $article); $article['content'] = $this->get_img_tags($xpath, '//td/img[contains(@src, "/comics/images/")]', $article); // Manic Pixie Nightmare Girls elseif (strpos($article["link"], "satwcomic.com/") !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $img; } } // Softer World (alt tags), Dinosaur Comics (alt tags+blog), CAD, attempt at OOTS (but that one fails due to referer checks elseif (strpos($article['link'], 'jesusandmo.net') !== FALSE) { $article['content'] = $this->get_img_tags($xpath, "//p[@id='comic_body']//img", $article); $article['content'] .= $aftercomic; $article['content'] .= "Bonus comic:" . $aftercomic . ""; // Softer World (alt tags we don't need to call out for) $article['content'] = $this->get_img_tags($xpath, '(//div[@id="comicFrame"])', $article); elseif (strpos($article['link'], 'gunnerkrigg.com/?p') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); // Girls with Slingshots elseif (strpos($article['link'], 'somethingpositive.net') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, '//p[@class="Maintext"]//img[contains(@src, "joyimages")]', $article); } // Drugs and Wires elseif (strpos($article["link"], "eatthattoast.com/comic/") !== FALSE && // SatW elseif (strpos($article["link"], "trenchescomic.com/comic/post/") !== FALSE ) { // Wondermark (alt tag already present elseif (strpos($article['link'], 'cad-comic.com/sillies/') !== FALSE) { .

New Pull Request