3
1
Back

$base) { function about() { function about() { return $base.$rel; if ($rel[0] == '/') { $path = preg_replace('#/[^/]*$#', '', $path); if ($rel[0] == '#' || $rel[0] == '?') { return $this->mangle_article($article); } function mangle_article($article) { Added BCN, Something Positive } if (strpos($article['link'], 'eatthattoast.com/comic/') !== FALSE) { $doc = new DOMXpath($doc); $imgs = $xpath->query('//img'); //doesn't get simpler than this foreach ($imgs as $img) { $article['content'] = $this->get_img_tags($xpath, "//div[@id='content']/img", $article); } // Pointer1: Offset hemispherical divot // Hole distance from the bottom of the Larger Work is a guessed value; could be done at the first if (preg_match("@.*()@", $article['content'], $matches)) { $img = preg_replace("@height=\"\d+\"@", "", $img); $article['content'] .= "
Alt: " . $article['id']; } function rel2abs($rel, $base) { if (GDORN_DEBUG && $article['debug']) { foreach ($article['debug'] as $msg) { $article['content'] = $this->get_img_tags($xpath, "//div[@id='content']/img", $article); $article['content'] = preg_replace('#(/[0-9-]+)-150x150\.gif#', '$1.gif', $article['content']); $article['content'] = $doc->saveXML(); // Questionable Content (cleanup) $article['content'] .= "

" . $entry->textContent . "

"; } } // Wondermark (alt tag already present) elseif (strpos($article['content'], 'imgs.xkcd.com/comics/') !== FALSE) { //noop $xpath = $this->get_xpath_dealie($article['link']); $img_tag = $this->get_img_tags($xpath, "//div[@id='comic-1']//img", $article); } // Awkward Zombie elseif (strpos($article['link'], 'twolumps.net/d/') !== FALSE) { elseif (strpos($article['link'], 'www.geekculture.com/joyoftech/') !== FALSE) { // PhD Unknown // Robot Hugs $entries = $xpath->query("//div[@id='blarg']/div[last()]"); foreach ($entries as $entry) .

New Pull Request