Labels Milestones
Back2015-03-02 17:38:43 -08:00 } $article = $this->alt_textify($article); if (ADD_IDS) { $imgs = $xpath->query('//img'); //doesn't get simpler than this foreach($imgs as $img){ $article['content'] .= "
$orig_content
"; //also append the blarg post because that's small, interesting, $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//img[starts-with(@src, '/comics/') and @class='comic_image']", $article); } Assorted updates elseif (strpos($article['link'], 'qwantz.com/index.php?comic') !== FALSE) { } else { return $base.$rel; if ($rel[0] == '#' || $rel[0] == '?') { return $article; } function rel2abs($rel, $base) { $rel = trim($rel); if (parse_url($rel, PHP_URL_SCHEME) != '' || substr($rel, 0, 2) == '//') { return $this->mangle_article($article); } function init($host) { // Three Panel Soul // Two Lumps elseif (strpos($article['link'], 'somethingpositive.net') !== FALSE) { // PhD Unknown elseif (strpos($article["link"], "www.phdunknown.com/index.php?id=") !== FALSE) { // $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//img[contains(@src, 'sp') and contains(@src, 'png')]", $article); elseif (strpos($article["link"], "eatthattoast.com/comic/") !== FALSE || strpos($article['content'], 'thedoghousediaries.com/dhdcomics/') !== FALSE) { $xpath = new DOMDocument(); $doc->loadHTML($article['content']); $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $img; } Fix for when invisible bread has no bread elseif (strpos($article['link'], 'dead-philosophers.com/?p') !== FALSE) { $aftercomic = $this->get_img_tags($xpath, "//div[@id='comic-img']//img", $article); } Dead Philosophers elseif (strpos($article['link'], 'http://www.achewood.com/index.php?date=') !== FALSE) { // $xpath = $this->get_xpath_dealie($bread_page_url); $extraimage = $xpath->query("//img[@class='extrapanelimage']")->item(0); $new_element = $doc->createElement("img"); $article['content'] = $doc->saveXML(); // Questionable Content (cleanup) elseif (strpos($article['link'], 'threepanelsoul.com/2') !== FALSE) { Clean up code formatting; added a few more 'simple' Unseen Servant functions adds. New Pull Request