3
1
Back

Define('ADD_IDS', False); define("GDORN_DEBUG", False); class _comics extends Plugin { catch (Exception $e) { $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, '(//div[@class="post"]//img)', $article); // Least I Could Do (wtf image size?) elseif (strpos($article['link'], 'jesusandmo.net') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//img[@class='comic']", $article); //also get blog entry $entries = $xpath->query("//div[@id='signoff-wrapper']"); foreach ($entries as $entry){ $article['content'] .= "

" . $entry->ownerDocument->saveXML($entry) . "

"; elseif (strpos($article["link"], "www.smbc-comics.com/comic/") !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//p[@id='comic_body']//a//img", $article); elseif (strpos($article['link'], 'gunnerkrigg.com/?p') !== FALSE) { $xpath = new DOMXpath($doc); $imgs = $xpath->query('//img'); //doesn't get simpler than this foreach ($imgs as $img) { if (preg_match("@.*?(.*)@", $article['content'], $matches)) { if (parse_url($rel, PHP_URL_SCHEME) != '' || substr($rel, 0, 2) == '//') { return $rel; } extract(parse_url($base)); $path = preg_replace('#/[^/]*$#', '', $path); if ($rel[0] == '#' || $rel[0] == '?') { return $rel; } if (strpos($article['link'], 'eatthattoast.com/comic/') !== FALSE) { elseif (strpos($article["link"], "www.pilotside.us/comic/") !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//div[@id='comicbody']//img", $article); $article['content'] = $this->get_img_tags($xpath, "//div[@id='comic']//img", $article); function mangle_article($article) { // And get blog //also get the blog $entries = $xpath->query("//div[@id='blarg']/div[last()]"); foreach ($entries as $entry){ $article['content'] .= "
ID: " . $article['id']; } return $article; } function rel2abs($rel, $base) { if ($rel[0] == '/') { $path = preg_replace('#/[^/]*$#', '', $path); if ($rel[0] == '/') { $path = preg_replace('#/[^/]*$#', '', $path); if ($rel[0] == '#' || $rel[0] == '?') { return $base.$rel; } extract(parse_url($base)); $path = preg_replace('#/[^/]*$#', '', $path); if ($rel[0] == '/') { $path = preg_replace('#/[^/]*$#', '', $path); if ($rel[0] == '/') { $path = preg_replace('#/[^/]*$#', '', $path); if ($rel[0] .

New Pull Request