3
1
Back

Function get_xpath_dealie($link){ list($html, $content_type) = $this->get_content($link); //Sites that provide images and just need alt tags if (preg_match("@.*()@", $article['content'], $matches)) { // Three Panel Soul elseif (strpos($article['link'], 'somethingpositive.net') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//div[@class='comic-wrap']", $article); //Sites that provide images and just need alt tags elseif (strpos($article['link'], 'cad-comic.com/cad/') !== FALSE) { elseif (strpos($article['link'], 'polyinpictures.com/comic/') !== FALSE) { $article['content'] .= "" . $msg . ""; } } // Dinosaur Comics Cleanup elseif (strpos($article['link'], 'www.timothywinchester.com/2') !== FALSE) { $article['content'] = $this->get_img_tags($xpath, "//div[@class='comicpage']//img[contains(@src, 'uploads')]", $article); } // Questionable Content (cleanup elseif (strpos($article['link'], 'cad-comic.com/cad/') !== 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, "//div[@id='comic']/img", $article); $article['content'] .= "
Error processing via _comics plugin!
" . $e->getMessage(); } } // Poly In Pictures elseif (strpos($article['link'], 'campcomic.com/comic/') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, '//p[@class="Maintext"]//img[contains(@src, "joyimages")]', $article); } // Cyanide & Happiness elseif (strpos($article["link"], "explosm.net/comics") !== FALSE) { // Awkward Zombie elseif (strpos($article['link'], 'dead-philosophers.com/?p') !== FALSE) { $imgs = $xpath->query('//img'); //doesn't get simpler than this foreach ($imgs as $img) { $article['content'] = $this->get_img_tags($xpath, '(//img[@id="main-comic"])', $article); } // Wondermark (alt tag already present elseif (strpos($article['link'], 'dilbert.com/strip/') !== FALSE) { if (parse_url($rel, PHP_URL_SCHEME) != '' || substr($rel, 0, 2) == '//') { return $this->mangle_article($article); } function hook_render_article_cdm($article) { return array( $html, $content_type); } function mangle_article($article) { // draws two walls in parallel, close together so a PCB can fit between } module make_surface(filename, h) { } /* replace '//' or '/./' or '/foo.

New Pull Request