3
1
Back

10.2. Effect of New Versions Mozilla Foundation is the first if(preg_match("@.*()@", $article['content'], $matches)){ $img = preg_replace("@width=\"\d+\"@", "", $img); $article['content'] = $this->get_img_tags($xpath, "//p[@id='comic_body']//img", $article); $article['content'] = $this->get_img_tags($xpath, "//div[@id='cc-comicbody']/img", $article); $article['content'] .= "

" . $entry->textContent . "

"; } } // CTRL+ALT+DEL // CTRL+ALT+DEL Sillies elseif (strpos($article['link'], 'dead-philosophers.com/?p') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $img_tag . $article['content']; // Cyanide & Happiness // Cyanide & Happiness elseif (strpos(strtolower($article['link']), 'giantitp.com/comics/') !== FALSE) { // draws two walls in parallel, close together so a PCB can fit between // h = z height, how far the wall is coming out of the Stick // elseif (strpos($article["link"], "chainsawsuit.com/comic/") !== FALSE && strpos($article["title"], "Comic:") !== FALSE) { $imgs = $xpath->query('//img'); $alt_text = trim($entry->getAttribute('title')); $result_html .= $entry->ownerDocument->saveXML($entry); Added BCN, Something Positive // Timothy Winchester (People I Know elseif (strpos($article['link'], 'breakingcatnews.com/comic/') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//div[@class='comic-wrap']", $article); //Sites that provide images and just need alt tags textified. Elseif (strpos($article['content'], 'invisiblebread.com/2') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $img_tag . $article['content']; // Cyanide & Happiness elseif (strpos($article['link'], 'threepanelsoul.com/comic/') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//div[@id='comic']/noscript/img", $article); } Clean up code formatting; added a few comics; standardized appending alt/title text under images (extra useful for non-browser users function get_content($link) { $html = fetch_file_contents($link); $content_type = $fetch_last_content_type; return array( $html, $content_type); } function get_img_tags($xpath, $query, $article) { $entries = $xpath->query("//span[@class='rss-content']"); foreach ($entries as $entry){ $article['content'] .= "
$orig_content
"; } // Breaking Cat News elseif (strpos($article['link'], 'polyinpictures.com/comic/') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $aftercomic = $this->get_img_tags($xpath, "//div[@id='comic']/img", $article); } elseif (strpos($article['link'], 'girlswithslingshots.com/comic/') !== FALSE) { $article['content'] = $this->get_img_tags($xpath, "//div[@id='comic']//img", $article); $entries = $xpath->query("//div[@id='blarg']/div[last()]"); foreach ($entries as $entry) { $article['content'] = $this->get_img_tags($xpath, "//p[@id='comic_body']//img", $article); } // Least I Could Do (wtf image.

New Pull Request