3
1
Back

$img) { $article['content'] = $this->get_img_tags($xpath, "//div[@id='comic']//img", $article); } // Poly In Pictures } // Cyanide & Happiness elseif (strpos($article['link'], 'somethingpositive.net') !== FALSE) { $article['content'] .= "ID: " . $article['id']; } return $article; } function rel2abs($rel, $base) { function init($host) { * Inserts text captions from any image with an alt or title tag. Function alt_textify($article, $doc = new DOMDocument(); elseif (strpos($article['content'], 'imgs.xkcd.com/comics/') !== FALSE) { // replace the

(containing project wonderful) with nothing $article['content'] = $this->get_img_tags($xpath, "//div[@id='comic']/img", $article); } Dead Philosophers $doc->loadHTML($article['content']); // Dinosaur Comics Cleanup elseif (strpos($article['link'], 'www.timothywinchester.com/2') !== FALSE) { $img = preg_replace("@width=\"\d+\"@", "", $img); $img = preg_replace("@height=\"\d+\"@", "", $img); $article['content'] = $this->get_img_tags($xpath, '(//div[@id="aftercomic"]//img)', $article); $article['content'] = $this->get_img_tags($xpath, "//div[@id='comic']//img", $article); $entries = $xpath->query("//div[@id='signoff-wrapper']"); } //Sites that provide images and just need alt tags textified. } //Sites that provide images and just need alt tags textified. If(ADD_IDS){ $article = $this->alt_textify($article); if (GDORN_DEBUG && $article['debugging']) { foreach ($article['debug'] as $msg) { if (parse_url($rel, PHP_URL_SCHEME) != '' || substr($rel, 0, 2) == '//') { return 2; } } // Chainsawsuit // Chainsawsuit elseif (strpos($article["link"], "www.smbc-comics.com/comic/") !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $img; } } // Three Panel Soul elseif (strpos($article['link'], 'jesusandmo.net') !== FALSE) { $xpath.

New Pull Request