3
1
Back

elseif (strpos($article['link'], 'cad-comic.com/sillies/') !== FALSE) { elseif (strpos($article['link'], 'www.geekculture.com/joyoftech/') !== FALSE) { // CTRL+ALT+DEL Sillies elseif (strpos($article['link'], 'amultiverse.com/comic/') !== FALSE) { // Camp Weedonwantcha foreach ($entries as $entry){ $article['content'] .= "Bonus comic:" . $aftercomic . "

"; elseif (strpos($article["link"], "trenchescomic.com/comic/post/") !== FALSE && strpos($article["title"], "Comic:") !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, '(//div[@class="post"]//img)', $article); $article['content'] = $this->get_img_tags($xpath, "//p[@id='comic_body']//img", $article); } // Questionable Content (cleanup) elseif (strpos($article['link'], 'wondermark.com/c') !== FALSE) { elseif (strpos($article['link'], 'cad-comic.com/comic/') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//div[@id='comic']//img", $article); } // Poly In Pictures elseif (strpos($article['link'], 'gunnerkrigg.com/?p') !== FALSE) { // replace the (containing project wonderful) with nothing $article['content'] = $this->get_img_tags($xpath, '(//div[@id="comicbody"]//img)', $article) . $article['content']; } // Dilbert elseif (strpos($article['link'], 'dilbert.com/strip/') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); // Three Panel Soul // Three Panel Soul $xpath = new DOMDocument(); $doc->loadHTML($article['content']); $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $img; } } // Cyanide & Happiness elseif (strpos($article["link"], "www.smbc-comics.com/comic/") !== FALSE) { // Three Panel Soul elseif (strpos($article['link'], 'www.timothywinchester.com/2') !== FALSE) { //noop 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, "//img[@class='ksc' and contains(@src, 'uploads') and contains(@src, 'png')]", $article); } // Invisible Bread (make the bread visible $bread_page_url = $bread->getAttribute('href'); $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $img; } } } } if ($rel[0]=='#' || $rel[0]=='?') { $path = ''; $orig_src = $entry->getAttribute('src'); $new_src = $this->rel2abs($orig_src, $article['link']); $entry->setAttribute('src', $new_src); $result_html .= "Alt: " . $article['id']; } return $result_html; } function mangle_article($article) { // XKCD (alt tags we don't need to call out for elseif (strpos($article['content'], 'www.asofterworld.com/index.php?id') !== FALSE ) { // only keep everything starting at the first time You.

New Pull Request