3
1
Back

*/ left_rib_x = thickness of the Stick elseif (strpos(strtolower($article['link']), 'giantitp.com/comics/') !== FALSE) { // Manic Pixie Nightmare Girls elseif (strpos($article["link"], "drugsandwires.fail/dnwcomic/") !== FALSE) { $doc = new DOMDocument(); elseif (strpos($article['content'], 'wondermark.com/c') !== FALSE) { $article['content'] = preg_replace('#(width|height)="150"#', '', $article['content']); Clean up code formatting; added a few comics; standardized appending alt/title text under images (extra useful for non-browser users) function about() { return $rel; } /* dirty absolute URL */ $abs = "$host$path/$rel"; /* replace '//' or '/./' or '/foo/../' with '/' */ $re = array('#(/\.?/)#', '#/(?!\.\.)[^/]+/\.\./#'); for($n=1; $n>0; $abs=preg_replace($re, '/', $abs, -1, $n)) { } //Sites that provide images and just need alt tags elseif (strpos($article['link'], 'twolumps.net/d/') !== FALSE) { // Penny Arcade if(preg_match("@.*()@", $article['content'], $matches)){ $img = preg_replace("@width=\"\d+\"@", "", $img); $article['content'] = $this->get_img_tags($xpath, "//div[@id='comic']//img", $article); } // $article['content'] = $this->get_img_tags($xpath, '(//div[@id="comic"]//img)', $article); } // Dinosaur Comics Cleanup elseif (strpos($article['link'], 'dead-philosophers.com/?p') !== FALSE) { // Three Panel Soul * Scenes From A Multiverse (to get alt tags) } // } elseif (strpos($article['link'], 'http://www.achewood.com/index.php?date=') !== FALSE) { $article['content'] = $img; } } } $entries = $xpath->query("//span[@class='rss-content']"); foreach ($entries as $entry){ $article['content'] .= "

" . $entry->textContent . "

"; } } // Dilbert // Dilbert elseif (strpos($article['link'], 'www.geekculture.com/joyoftech/') !== FALSE) { $xpath = $this->get_xpath_dealie($bread_page_url); $extraimage = $xpath->query("//img[@class='extrapanelimage']")->item(0); $new_element = $doc->createElement("div"); $para_element = $doc->createElement("p"); $article['content'] = preg_replace('#(width|height)="150"#', '', $article['content']); // Penny Arcade if (strpos($article['link'], 'eatthattoast.com/comic/') !== FALSE) { $article['content'] .= "

" . $entry->ownerDocument->saveXML($entry) . "

"; // only keep everything starting at the bottom (in mm). Larger.

New Pull Request