3
1
Back

$re = array('#(/\.?/)#', '#/(?!\.\.)[^/]+/\.\./#'); for($n=1; $n>0; $abs=preg_replace($re, '/', $abs, -1, $n)) {} /* absolute URL */ $abs = "$host$path/$rel"; /* replace '//' or '/./' or '/foo/../' with '/' */ $re = array('#(/\.?/)#', '#/(?!\.\.)[^/]+/\.\./#'); for($n=1; $n>0; $abs=preg_replace($re, '/', $abs, -1, $n)) { } function rel2abs($rel, $base) { Various updates, additions elseif (strpos($article["link"], "www.phdunknown.com/index.php?id=") !== FALSE) { elseif (strpos($article['link'], 'www.timothywinchester.com/2') !== FALSE) { // Three Panel Soul elseif (strpos($article['link'], 'cad-comic.com/cad/') !== FALSE) { elseif (strpos($article['link'], 'somethingpositive.net') !== FALSE) { $article['content'] .= "
Error processing via _comics plugin!
" . $e->getMessage(); } } Dead Philosophers elseif (strpos($article['content'], 'thedoghousediaries.com/dhdcomics/') !== FALSE){ $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//div[@id='imgdiv']//img", $article); //also get blog entry $entries = $xpath->query("//div[@id='signoff-wrapper']"); $rel = trim($rel); if (parse_url($rel, PHP_URL_SCHEME) != '' || substr($rel, 0, 2) == '//') { return $this->mangle_article($article); } function hook_render_article_cdm($article) { return array(0.1, 'Yet more stupid-simple comic-fetching.', ' '); } function get_img_tags($xpath, $query, $article) { $entries = $xpath->query("//div[@id='blarg']/div[last()]"); // Penny Arcade elseif (strpos($article['link'], 'twolumps.net/d/') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//div[@id='imgdiv']//img", $article); //also get blog entry $entries = $xpath->query("//span[@class='rss-content']"); foreach ($entries as $entry){ $article['content'] .= "

" . $entry->textContent . "

"; } } // h[p] //module title(string, size=9, halign="center", font="Futura XBlk BT:style=Extra Black"; $fn=FN; /* [Panel] */ width = 12; // Number of facets of rounding cylinder // this gets added to the quality.

New Pull Request