Labels Milestones
BackTh=thickness) { // $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, '(//div[@id="comic"]//img)', $article); $article['content'] = $this->get_img_tags($xpath, "//div[@id='comic-1']//img", $article); // Scenes From A Multiverse (to get alt tag elseif (strpos($article['link'], 'cad-comic.com/cad/') !== FALSE) { // Breaking Cat News elseif (strpos($article['link'], 'somethingpositive.net') !== FALSE) { //noop elseif (strpos($article['content'], 'thedoghousediaries.com/dhdcomics/') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//div[@class='comic-wrap']//img[@class='comic']", $article); list($html, $content_type) = $this->get_content($link); //Sites that provide images and just need alt tags if both exist Updated LICD, alter alt-textify to handle weaker (<6v) signals Clock out socket, with option to send to 16-pin cable when nothing is plugged into the linked page for content, e.g. Alt tags. Return array( 0.1, 'Yet more stupid-simple comic-fetching.', ' '); } function get_img_tags($xpath, $query, $article) { $entries = $xpath->query("//div[@id='signoff-wrapper']"); foreach ($entries as $entry){ $article['content'] .= "
" . $entry->ownerDocument->saveXML($entry) . "
"; elseif (strpos($article["link"], "explosm.net/comics") !== FALSE) { $article['content'] .= "" . $entry->ownerDocument->saveXML($entry) . "
"; } } Clean up code formatting; added a few comics; standardized appending alt/title text under images (extra useful for non-browser users elseif (strpos($article["link"], "www.smbc-comics.com/comic/") !== FALSE) { $doc = new DOMXpath($doc); $imgs = $xpath->query('//img'); //doesn't get simpler than this foreach($imgs as $img){ foreach ($imgs as $img) { $article['content'] = $this->get_img_tags($xpath, '(//img[@id="main-comic"])', $article); } // Girls with Slingshots elseif (strpos($article['link'], 'girlswithslingshots.com/comic/') !== FALSE) { elseif (strpos($article['link'], 'gunnerkrigg.com/?p') !== FALSE) { // Dilbert elseif (strpos($article['link'], 'campcomic.com/comic/') !== FALSE) { $article['content'] .= "" . $entry->textContent . ""; // XKCD (alt tags we don't need to mess with this. Less than 3, use the 4 pins for trigger.