3
1
Back

Lines class _comics extends Plugin { function init($host) { // Eat That Toast bog-standard example elseif (strpos($article['link'], 'campcomic.com/comic/') !== FALSE) { elseif (strpos($article['link'], 'alicegrove.com') !== FALSE) { // replace the

(containing project wonderful) with nothing $article['content'] = $this->get_img_tags($xpath, '//p[@class="Maintext"]//img[contains(@src, "joyimages")]', $article); } // Joy of Tech // Joy of Tech elseif (strpos($article['link'], 'jesusandmo.net') !== FALSE) { $doc = new DOMDocument(); $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//div[@id='comic']//img", $article); } Clean up code formatting; added a few comics; standardized appending alt/title text under images (extra useful for non-browser users) function about() { return $article; } /* replace '//' or '/./' or '/foo/../' with '/' */ $re = array('#(/\.?/)#', '#/(?!\.\.)[^/]+/\.\./#'); for($n=1; $n>0; $abs=preg_replace($re, '/', $abs, -1, $n)) { } module make_surface(filename, h) { } function get_img_tags($xpath, $query, &$article, $base_url=NULL) { $img_attributes_whitelist = array('src', 'alt', 'title'); $new_src = $this->rel2abs($orig_src, $article['link']); $entry->setAttribute('src', $new_src); $result_html .= $entry->ownerDocument->saveXML($entry); if (GDORN_DEBUG && $article['debugging']) { foreach ($article['debugging'] as $msg) { $article['content'] .= "
Alt: $alt_text
"; } } return $article; } /* absolute URL is ready! */ return $scheme.'://'.$abs; } function rel2abs($rel, $base) { function rel2abs($rel, $base) { if (strpos($article["content"], "bonus panel!") !== FALSE) { Clean up code formatting; added a few more 'simple' Unseen Servant Binary files /dev/null and b/3D Printing/Panels/image.png differ From 900028d3cfd83c8e79e6eea5e382790306fbb1e8 Mon Sep 17.

New Pull Request