3
1
Back

* Most important: Keep it simple. Follow one pattern. Class _comics extends Plugin { function hook_render_article($article) { $article['content'] = $this->get_img_tags($xpath, "//div[@id='content']/img", $article); } elseif (strpos($title_text, $alt_text) !== False) { if (parse_url($rel, PHP_URL_SCHEME) != '' || substr($rel, 0, 2) == '//') { return $this->mangle_article($article); } function about() { return $base . $rel; } extract(parse_url($base)); $path = ''; foreach ($entries as $entry){ $article['content'] .= "
Alt: " . $img->getAttribute('title') . ""; } } } } // XKCD (alt tags we don't need to call out for) elseif (strpos($article['content'], 'www.asofterworld.com/index.php?id') !== FALSE && // SatW elseif (strpos($article["link"], "eatthattoast.com/comic/") !== FALSE ) { $xpath = $this->get_xpath_dealie($article['link']); // elseif (strpos($article["link"], "poorlydrawnlines.com/comic/") !== FALSE && strpos($article["title"], "Comic:") !== FALSE) { // Dinosaur Comics Cleanup elseif (strpos($article['link'], 'twolumps.net/d/') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//p[@id='comic_body']//img", $article); $article['content'] = $this->get_img_tags($xpath, "//div[@id='content']/img", $article); } // Poorly Drawn.

New Pull Request