3
1
Back

Differ // The Oatmeal $entries = $xpath->query("//span[@class='rss-content']"); foreach ($entries as $entry){ $article['content'] .= "

" . $entry->textContent . "

"; $article['content'] .= "Error processing via _comics plugin!" . $e->getMessage(); if (strpos($article["link"], "penny-arcade.com") !== FALSE && strpos($article["title"], "Comic:") !== FALSE) { $article['content'] .= "

" . $entry->ownerDocument->saveXML($entry) . "

"; } } function get_content($link) { $html = fetch_file_contents($link); $content_type = $fetch_last_content_type; return array( $html, $content_type ); } function hook_render_article($article) { return array(0.1, return array( 0.1, 'Yet more stupid-simple comic-fetching.', } 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 { catch (Exception $e) { $article['content'] = $this->get_img_tags($xpath, "//img[starts-with(@src, 'sp') and contains(@src, 'comics')]", $article); } .

New Pull Request