3
1
Back

Bread $article['content'] = preg_replace('#(/[0-9-]+)-150x150\.gif#', '$1.gif', $article['content']); $article['content'] = $this->get_img_tags($xpath, "//p[@id='comic_body']//img", $article); } function init($host) { /** * Use this if you feel like it, otherwise I'm just scratching my own itch here. * Most important: Keep it simple. Follow one pattern. Class _comics extends Plugin { 'Yet more stupid-simple comic-fetching.', ' '); ' ' ); } function mangle_article($article) { if (strpos($article["content"], "bonus panel!") !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); elseif (strpos($article["link"], "satwcomic.com/") !== FALSE) { // $xpath = $this->get_xpath_dealie($article['link']); // $article['content'] = $this->get_img_tags($xpath, '(//div[@id="comic"]//img)', $article); } // Joy of Tech elseif (strpos($article['link'], 'threepanelsoul.com/comic/') !== FALSE) { $article['content'] = $this->get_img_tags($xpath, "//div[@id='comic']/noscript/img", $article); $article['content'] = $this->get_img_tags($xpath, '(//div[@class="post"]//img)', $article); $article['content'] .= "" . $msg . ""; } } //noop elseif (strpos($article['link'], 'leasticoulddo.com/comic') !== FALSE) { $img = preg_replace("@height=\"\d+\"@", "", $img); $img = $matches[1]; $img = $matches[1]; $img = preg_replace("@height=\"\d+\"@", "", $img); $img = $matches[1]; } } function hook_render_article_cdm($article) { return array(0.1, 'Yet more stupid-simple comic-fetching.', ' '); } function get_img_tags($xpath, $query, &$article, $base_url=NULL) { function about() { return $base.$rel; } extract(parse_url($base)); $path = ''; } /* dirty absolute URL is ready! */ return $scheme.'://'.$abs; } /* OotS uses some kind of odd LFO. Known problems 900028d3cf Futura BT font files ... Delete.

New Pull Request