3
1
Back

'Yet more stupid-simple comic-fetching.', ' '); } function hook_render_article_cdm($article) { return $this->mangle_article($article); } function hook_render_article($article) { try { return $rel; } extract(parse_url($base)); $path = preg_replace('#/[^/]*$#', '', $path); if ($rel[0] == '/') { $path = preg_replace('#/[^/]*$#', '', $path); if ($rel[0] == '/') { $path = ''; function get_xpath_dealie($link) { $abs = "$host$path/$rel"; /* replace '//' or '/./' or '/foo/../' with '/' */ $re = array('#(/\.?/)#', '#/(?!\.\.)[^/]+/\.\./#'); for($n=1; $n>0; $abs=preg_replace($re, '/', $abs, -1, $n)) {} /* absolute URL is ready! */ elseif (strpos(strtolower($article['link']), 'giantitp.com/comics/') !== FALSE) { //also get blog $entries = $xpath->query("//div[@id='blarg']/div[last()]"); foreach ($entries as $entry) { $article['content'] = $img_tag . $article['content']; } // Pain Train (to get alt tags in feedburner (if there are quotes elseif (strpos($article['content'], 'www.asofterworld.com/index.php?id') !== FALSE) { elseif (strpos($article["link"], "satwcomic.com/") !== FALSE) { $doc = new DOMXpath($doc); $bread = $xpath->query("//a[contains(@href, 'bonus-panel')]")->item(0); $bread_page_url = $bread->getAttribute('href'); $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//div[@id='comic']/img", $article); $article['content'] .

New Pull Request