3
1
Back

{ $path = ''; function get_xpath_dealie($link) { } /* dirty absolute URL is ready! */ return $scheme . '://' . $abs; if (preg_match("@.*(get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//div[@id='cc-comicbody']//img", $article); } Clean up code formatting; added a few comics; standardized appending alt/title text under images (extra useful for non-browser users Invisible Bread, Softer World (alt tags), Dinosaur Comics Cleanup elseif (strpos($article['content'], 'wondermark.com/c') !== FALSE) { elseif (strpos($article['link'], 'campcomic.com/comic/') !== FALSE) { $xpath = new DOMXpath($doc); $imgs = $xpath->query('//img'); //doesn't get simpler than this foreach($imgs as $img){ foreach ($imgs as $img) { $article['content'] .= "

" . $entry->textContent . "

"; } } // Gunnerkrigg Court elseif (strpos($article['link'], 'http://www.achewood.com/index.php?date=') !== FALSE) { elseif (strpos($article['link'], 'campcomic.com/comic/') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, '//td/img[contains(@src, "/comics/images/")]', $article); // $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $doc->saveHTML(); elseif (strpos($article['link'], 'cad-comic.com/sillies/') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, '//td/img[contains(@src, "/comics/images/")]', $article); // Doghouse Diaries, which has broken alt tags textified. If(ADD_IDS){ $article = $this->alt_textify($article); if (ADD_IDS) { $article['content'] = $this->get_img_tags($xpath, "//div[@id='comic']//img", $article); $entries = $xpath->query("//span[@class='rss-content']"); foreach ($entries as $entry){ foreach ($entries as $entry){ $article['content'] .= "" . $entry->ownerDocument->saveXML($entry) . "

"; } } // CTRL+ALT+DEL Sillies // CTRL+ALT+DEL elseif (strpos($article['link'], 'questionablecontent') !== FALSE) { elseif (strpos($article['content'], 'www.asofterworld.com/index.php?id') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//div[@id='comic']//img", $article); } // Timothy Winchester (People I Know elseif (strpos($article['link'], 'cad-comic.com/cad/') !== FALSE) { // round shaft hole cylinder(r=shaft_radius,h=shaft_height, $fn=shaft_smoothness); if(shaft_is_flatted == true } } //Sites that provide images and just need alt tags textified. $doc->loadHTML($article['content']); //no-op $imgs = $xpath->query('//img'); //doesn't get simpler than this // for inset labels, translating to this height controls label.

New Pull Request