3
1
Back

"http://vgcats.com/comics/"); // Invisible Bread (make the bread visible elseif (strpos($article['content'], 'invisiblebread.com/2') !== FALSE) { $doc = new DOMDocument(); $doc->loadHTML($article['content']); $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $img_tag . $article['content']; $article['content'] = $this->get_img_tags($xpath, '(//div[@class="webcomic-image"]//img)', $article); } /* replace '//' or '/./' or '/foo/../' with '/' */ $re = array('#(/\.?/)#', '#/(?!\.\.)[^/]+/\.\./#'); for($n=1; $n>0; $abs=preg_replace($re, '/', $abs, -1, $n)) { } else { return $this->mangle_article($article); } function hook_render_article_cdm($article) { return $this->mangle_article($article); } function get_img_tags($xpath, $query, $article){ $entries = $xpath->query("//div[@id='blarg']/div[last()]"); foreach ($entries as $entry){ $article['content'] .= "Bonus comic:" . $aftercomic . "

"; } } // Scenes From A Multiverse (to get alt tags elseif (strpos($article['link'], 'dead-philosophers.com/?p') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); // Girls with Slingshots elseif (strpos($article['link'], 'dead-philosophers.com/?p') !== FALSE) { // Achewood (alt tag) elseif (strpos($article['link'], 'threepanelsoul.com/2') !== FALSE) { // Something Positive elseif (strpos($article['link'], 'threepanelsoul.com/2') !== FALSE) { // Something Positive elseif (strpos($article['link'], 'questionablecontent') !== FALSE) { // SBMC elseif (strpos($article["link"], "chainsawsuit.com/comic/") !== FALSE ) { $xpath = $this->get_xpath_dealie($article['link']); $aftercomic = $this->get_img_tags($xpath, "//div//img[contains(@src, 'images') and contains(@src, 'jpg')]", $article, "http://vgcats.com/comics/"); // Invisible Bread (make the bread visible) elseif (strpos($article['content'], 'invisiblebread.com/2') !== FALSE) { // only keep everything starting at the first } // Timothy Winchester (People I Know elseif (strpos($article['link'], 'http://www.achewood.com/index.php?date=') !== FALSE) { // Timothy Winchester (People I Know foreach ($imgs as $img) { $article['content'] .= "
" . $msg . ""; if (ADD_IDS) { $article['content'] = $this->get_img_tags($xpath, "//div[@id='comic']/img", $article); } // Wondermark (alt tag already present elseif (strpos($article['content'], 'wondermark.com/c') !== FALSE) { elseif (strpos($article['link'], 'somethingpositive.net') !== FALSE) { $article['content'] = $this->get_img_tags($xpath, '(//div[@id="comic"]//img)', $article) . $article['content']; elseif (strpos($article["link"], "berkeleymews.com/") !== FALSE ) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, '//td/img[contains(@src, "/comics/images/")]', $article); $xpath = new DOMXpath($doc); $imgs = $xpath->query('//img'); //doesn't get simpler than this } //No matches //No matches //No matches if ($img->getAttribute('title')) { // PhD Unknown elseif (strpos($article["link"], "drugsandwires.fail/dnwcomic/") !== FALSE) { $xpath = new DOMXpath($doc); elseif (strpos($article['link'], 'http://www.achewood.com/index.php?date=') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//div[@id='cc-comicbody']//img", $article); } // SBMC elseif (strpos($article["link"], "manicpixienightmaregirls.com/") !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $img; if (preg_match("@.*()@", $article['content'], $matches)) { $img = preg_replace("@width=\"\d+\"@", "", $img); $img .

New Pull Request