Labels Milestones
BackPattern. Class _comics extends Plugin { function about() { return $article; } function rel2abs($rel, $base) { if (parse_url($rel, PHP_URL_SCHEME) != '' || substr($rel, 0, 2) == '//') { return $base.$rel; } extract(parse_url($base)); $path = preg_replace('#/[^/]*$#', '', $path); if ($rel[0] == '#' || $rel[0] == '?') { return $base.$rel; } extract(parse_url($base)); $path = preg_replace('#/[^/]*$#', '', $path); if ($rel[0] == '/') { $path = ''; } /* dirty absolute URL is ready! */ } function hook_render_article($article) { try { return $rel; } if (strpos($article['link'], 'eatthattoast.com/comic/') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//div[@id='comic']//img", $article); } // SatW // SatW elseif (strpos($article["link"], "drugsandwires.fail/dnwcomic/") !== FALSE) { $xpath = new DOMDocument(); // replace the