3
1
Back

Examples: Joy of Tech elseif (strpos($article['link'], 'twolumps.net/d/') !== FALSE) { elseif (strpos($article['link'], 'breakingcatnews.com/comic/') !== FALSE) { // $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, '(//div[@id="comicFrame"])', $article); elseif (strpos($article["link"], "poorlydrawnlines.com/comic/") !== FALSE && strpos($article["title"], "Comic:") !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, '(//div[@class="post"]//img)', $article); $article['content'] = $matches[1]; elseif (strpos($article['content'], 'imgs.xkcd.com/comics/') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//div[@class='comic-wrap']//img[@class='comic']", $article); elseif (strpos($article['link'], 'http://www.achewood.com/index.php?date=') !== FALSE) { elseif (strpos($article['link'], 'http://www.geekculture.com/joyoftech/') !== FALSE) { // only keep everything starting at the top 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 { function hook_render_article($article) { } function get_img_tags($xpath, $query, $article, $base_url=NULL) { function about() { return $this->mangle_article($article); } function get_xpath_dealie($link){ list($html, $content_type) = $this->get_content($link); $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $img; } Fix for two bugs in Doghouse Diaries rss: spaces in img src and quotes in alt/title text under images (extra useful for non-browser users $entries = $xpath->query("//div[@id='comic-notes']"); foreach ($entries as $entry){ foreach ($entries as $entry) { $article['content'] = $this->get_img_tags($xpath, "//p[@id='comic_body']//img", $article); } Clean up code formatting; added a few comics; standardized appending alt/title text under images (extra useful for non-browser users) Clean up code formatting; added a few due to referer checks Added BCN, Something Positive if (!$alt_text){ Added BCN, Something Positive elseif (strpos($article['link'], 'questionablecontent') !== FALSE) { $article['content'] .= "
ID.

New Pull Request