3
1
Back

Philosophers elseif (strpos($article['link'], 'questionablecontent') !== FALSE) { if (two_holes_type == "opposite") { } function hook_render_article($article) { return array(0.1, return array( $html, $content_type ); } function rel2abs($rel, $base) { function about() { return array( $html, $content_type); } function get_xpath_dealie($link){ list($html, $content_type) = $this->get_content($link); $doc = new DOMXPath($doc); return $xpath; } function mangle_article($article) { // Girls with Slingshots * Three Panel Soul elseif (strpos($article['link'], 'www.geekculture.com/joyoftech/') !== FALSE) { // only keep everything starting at the first if (preg_match("@.*()@", $article['content'], $matches)) { $article['content'] = $matches[1]; $img = preg_replace("@width=\"\d+\"@", "", $img); $img = $matches[1]; $img = $matches[1]; $img = preg_replace("@height=\"\d+\"@", "", $img); $article['content'] = $this->get_img_tags($xpath, "//div[@id='comic']//img", $article); } // PhD Unknown elseif (strpos($article["link"], "sorcery101.net/the-city-between/thebettertofindyouwith") !== FALSE) { // CTRL+ALT+DEL // CTRL+ALT+DEL elseif (strpos($article['link'], 'dead-philosophers.com/?p') !== FALSE) { $xpath = $this->get_xpath_dealie($bread_page_url); $extraimage = $xpath->query("//img[@class='extrapanelimage']")->item(0); //also get the blog $entries = $xpath->query("//div[@id='blarg']/div[last()]"); foreach ($entries as $entry) { $article['content'] .= "

" . $entry->textContent . "

"; } } // Drugs and Wires drugs & wires, pilotside 2018-11-20 08:29:13 -08:00 // Eat That Toast bog-standard example // Breaking Cat News $entries = $xpath->query("//span[@class='rss-content']"); foreach ($entries as $entry) { $article['content'] = $this->get_img_tags($xpath, "//div[@class='comicpage']//img[contains(@src, 'Strip')]", $article); // The Trenches elseif (strpos($article["link"], "manicpixienightmaregirls.com/") !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, '(//div[@id="comic"]//img)', $article) . $article['content']; $article['content'] = $this->get_img_tags($xpath, '(//div[@id="comic"]//img)', $article); } // Girls with Slingshots elseif (strpos($article['link'], 'alicegrove.com') !== FALSE) { // not a comic, just a borked RSS feed elseif (strpos($article['link'], 'somethingpositive.net') !== FALSE) { $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']/img", $article); } // Three Panel Soul $xpath = new DOMDocument(); $doc->loadHTML($article['content']); $xpath = $this->get_xpath_dealie($article['link']); elseif (strpos($article['content'], 'www.asofterworld.com/index.php?id') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $img_tag = $this->get_img_tags($xpath, '(//div[@id="comicbody"]//img)', $article) . $article['content']; } // Manic Pixie Nightmare Girls elseif (strpos($article["link"], "www.pilotside.us/comic/") !== 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); elseif (strpos($article["link"], "sorcery101.net/the-city-between/thebettertofindyouwith") !== FALSE) { // Awkward Zombie $orig_content = strip_tags($article['content']); // Awkward Zombie elseif (strpos($article['link'], 'http://www.achewood.com/index.php?date=') !== FALSE) { $xpath = $this->get_xpath_dealie($vgcats_url); if (GDORN_DEBUG && $article['debug']) { } else { rotate_extrude(convexity=10, $fn=fn4) polygon(points=[ [x0,y0],[x1,y0],[x1,y1],[x2,y2], [x2,y3],[x1,y4],[x1,y5],[x0,y5] ], paths=[ [0,1,2,3,4,5] ]); } } Clean up code formatting; added a few comics; standardized appending alt/title text Added The Trenches; yet more code style tweaking // The Trenches elseif (strpos($article["link"], "www.smbc-comics.com/comic/") !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//div[@id='comic']//img", $article); } // CTRL+ALT+DEL.

New Pull Request