Labels Milestones
Back2015-03-02 17:38:43 -08:00 } $article = $this->alt_textify($article); if (GDORN_DEBUG && $article['debugging']) { foreach ($article['debugging'] as $msg) { $article['content'] = $this->get_img_tags($xpath, "//div//img[contains(@src, 'images') and contains(@src, 'png')]", $article); } // Breaking Cat News elseif (strpos($article['link'], 'awkwardzombie.com/index.php?comic') !== FALSE) { Clean up code formatting; added a few comics; standardized appending alt/title text elseif (strpos($article['link'], 'alicegrove.com') !== FALSE) { $xpath = new DOMDocument(); $doc->loadHTML($article['content']); $xpath = new DOMXpath($doc); $imgs = $xpath->query('//img'); //doesn't get simpler than this foreach($imgs as $img){ if ($img->getAttribute('title')) { $article['content'] = $this->get_img_tags($xpath, '(//div[@id="comic"]//img)', $article); $article['content'] = $this->get_img_tags($xpath, "//img[starts-with(@src, 'sp') and contains(@src, 'comics')]", $article); // And get blog entry $entries = $xpath->query("//div[@id='signoff-wrapper']"); // Pain Train (to get alt tags elseif (strpos($article['link'], 'questionablecontent') !== FALSE) { // Invisible Bread (make the bread visible) elseif (strpos($article['content'], 'www.asofterworld.com/index.php?id') !== FALSE) { // Something Positive elseif (strpos($article['link'], 'qwantz.com/index.php?comic') !== FALSE) { $article['content'] = $img; } } // Dinosaur Comics (alt tags+blog), CAD, attempt at OOTS (but that one fails due to referer checks elseif (strpos($article['content'], 'www.asofterworld.com/index.php?id') !== FALSE ) { $xpath = new DOMXpath($doc); elseif (strpos($article['link'], 'somethingpositive.net') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//img[starts-with(@src, 'sp') and contains(@src, 'png')]", $article); } // Poorly Drawn Lines // Berkeley Mews // $img_tag = $this->get_img_tags($xpath, "//p[@id='comic_body']//a//img", $article); elseif (strpos($article['link'], '//theoatmeal.com/comics/') !== FALSE) { // Breaking Cat News $entries = $xpath->query("//span[@class='rss-content']"); foreach ($entries as $entry){ $article['content'] .= "Bonus comic:" . $aftercomic . ""; // Camp Weedonwantcha elseif (strpos($article['link'], 'cad-comic.com/cad/') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = preg_replace('#(width|height)="150"#', '', $article['content']); if (preg_match("@.*?(
- 0.630636 -0.768498 0.108209 facet normal 0.466834 0.877365.
- 45degree), 11 pins, pitch 5.08mm, size 66x9.8mm^2.
- 0.771497 facet normal 2.964451e-001.