3
1
Back

(http://sorcery101.net/ elseif (strpos($article["link"], "www.pilotside.us/comic/") !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//div[@class='comic-wrap']//img[@class='comic']", $article); // Drugs and Wires elseif (strpos($article["link"], "www.smbc-comics.com/comic/") !== FALSE) { // Chainsawsuit // Poorly Drawn Lines // Berkeley Mews // $img_tag = $this->get_img_tags($xpath, '(//div[@id="comic"]//img)', $article); // Timothy Winchester (People I Know foreach ($imgs as $img) { if (strpos($article["content"], "bonus panel!") !== FALSE) { elseif (strpos($article['content'], 'imgs.xkcd.com/comics/') !== FALSE) { $article['content'] = preg_replace("@@", '', $article['content']); } // Questionable Content (cleanup elseif (strpos($article['link'], 'girlswithslingshots.com/comic/') !== FALSE) { // Wondermark (alt tag already present foreach ($imgs as $img) { if (strpos($article["content"], "bonus panel!") !== FALSE) { $article['content'] .= "
$orig_content
"; } // XKCD (alt tags we don't need to call out for if(preg_match("@.*()@", $article['content'], $matches)){ function get_img_tags($xpath, $query, $article, $base_url=NULL) { function rel2abs($rel, $base) { if (parse_url($rel, PHP_URL_SCHEME) != '' || substr($rel, 0, 2) == '//') { return array( 0.1, 'Yet more stupid-simple comic-fetching.', } function mangle_article($article) { if (strpos($article["content"], "bonus panel!") !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $matches[1]; elseif (strpos($article['content'], 'www.asofterworld.com/index.php?id') !== FALSE) { $xpath = $this->get_xpath_dealie($bread_page_url); $extraimage = $xpath->query("//img[@class='extrapanelimage']")->item(0); $new_element = $doc->createElement("img"); $new_element->setAttribute('src', $extraimage->getAttribute('src')); $bread->parentNode->replaceChild($new_element, $bread); $article['content'] = $this->get_img_tags($xpath, "//div[@class='comic-wrap']//img[@class='comic']", $article); // Berkeley Mews elseif (strpos($article["link"], "explosm.net/comics") !== FALSE) { elseif (strpos($article['link'], 'www.geekculture.com/joyoftech/') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $img_tag . $article['content']; } // Scenes From A Multiverse (to get alt tags in feedburner (if there are quotes) elseif (strpos($article['content'], 'invisiblebread.com/2') !== FALSE) { $article['content'] .= "
$orig_content
"; // Awkward Zombie elseif (strpos($article['link'], 'jesusandmo.net') !== FALSE) { $doc.

New Pull Request