3
1
Back

Define('ADD_IDS', False); define("GDORN_DEBUG", False); class _comics extends Plugin { function about() { return $this->mangle_article($article); } catch (Exception $e) { $article['content'] = $this->get_img_tags($xpath, "//img[@class='ksc' and contains(@src, 'comics')]", $article); // Scenes From A Multiverse (to get alt tags elseif (strpos($article['link'], 'girlswithslingshots.com/comic/') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = preg_replace("@@", '', $article['content']); if (preg_match("@.*?(.*)@", $article['content'], $matches)) { $img = $matches[1]; $img = preg_replace("@width=\"\d+\"@", "", $img); $article['content'] .= "

" . $entry->textContent . "

"; } } function get_xpath_dealie($link){ list($html, $content_type) = $this->get_content($link); $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, '(//div[@id="comic"]//img)', $article); } Invisible Bread, Softer World (alt tags), Dinosaur Comics Cleanup elseif (strpos($article['content'], 'wondermark.com/c') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//p[@id='comic_body']//img", $article); } // Poorly Drawn Lines // Berkeley Mews elseif (strpos($article["link"], "explosm.net/comics") !== FALSE) { // PhD Unknown elseif (strpos($article["link"], "www.smbc-comics.com/comic/") !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); // elseif (strpos(strtolower($article['link']), 'giantitp.com/comics/') !== FALSE) { //also get the blog //also get the blog //also get blog $entries = $xpath->query("//div[@class='entry']"); if (preg_match("@.*(.*)@", $article['content'], $matches)) { $img = preg_replace("@height=\"\d+\"@", "", $img); $img = preg_replace("@height=\"\d+\"@", "", $img); $article['content'] = $this->get_img_tags($xpath, '(//div[@class="post"]//img)', $article); $article['content'] = $this->get_img_tags($xpath, '(//img[@id="main-comic"])', $article); } // Invisible Bread (make the bread visible elseif (strpos($article['content'], 'imgs.xkcd.com/comics/') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//img[starts-with(@src, 'sp') and contains(@src, 'png')]", $article); } // CTRL+ALT+DEL // CTRL+ALT+DEL Sillies elseif.

New Pull Request