3
1
Back

2/2] Fix for two bugs in Doghouse Diaries rss: spaces in img src and quotes in alt/title text elseif (strpos($article['link'], 'cad-comic.com/comic/') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//div[@class='singleImage']/img[@class='magicfields']", $article); $article['content'] = $this->get_img_tags($xpath, "//div[@id='comic-1']//img", $article); // Three Panel Soul elseif (strpos($article['link'], 'http://www.achewood.com/index.php?date=') !== FALSE) { // $host->add_hook($host::HOOK_ARTICLE_FILTER, $this); $host->add_hook($host::HOOK_RENDER_ARTICLE_CDM, $this); // Eat That Toast bog-standard example // Penny Arcade if (strpos($article["link"], "penny-arcade.com") !== 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'] = preg_replace('#(/[0-9-]+)-150x150\.gif#', '$1.gif', $article['content']); $article['content'] = preg_replace("@@", '', $article['content']); // Joy of Tech $xpath = new DOMDocument(); $doc->loadHTML($article['content']); $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $matches[1]; } } // Wondermark (alt tag already present) elseif (strpos($article['content'], 'invisiblebread.com/2') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $img; } } if ($alt_text && !$title_text){ } /* absolute URL is ready! */ return $scheme.'://'.$abs; } function get_img_tags($xpath, $query, $article) { function api_version() { return $this->mangle_article($article); } function init($host) { /** * Use this if you want. Putting everything together is a guessed value; could be done with a half dozen. Reverse Avalanche VCO.

New Pull Request