3
1
Back

Text elseif (strpos($article['link'], 'dilbert.com/strip/') !== FALSE) { if ($img->getAttribute('title')) { $article['content'] = $this->get_img_tags($xpath, "//div[@class='comic-wrap']//img[@class='comic']", $article); } // Two Lumps elseif (strpos($article['link'], 'dilbert.com/strip/') !== FALSE) { $doc = new DOMDocument(); $doc->loadHTML($article['content']); $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//div[@id='comic']//img", $article); } // PhD Unknown elseif (strpos($article["link"], "satwcomic.com/") !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//div[@id='comic-1']//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 api_version() { return array(0.1, 'Yet more stupid-simple comic-fetching.', } function get_img_tags($xpath, $query, $article){ /* dirty absolute URL is ready! */ } /* absolute URL is ready! */ elseif (strpos(strtolower($article['link']), 'giantitp.com/comics/') !== FALSE) { $xpath.

New Pull Request