3
1
Back

(h < four_hole_threshold) { if (strpos($article["content"], "bonus panel!") !== FALSE) { $doc = new DOMDocument(); // replace the

(containing project wonderful) with nothing $article['content'] = $this->get_img_tags($xpath, "//img[@class='ksc' and contains(@src, 'comics')]", $article); } Gunnerkrigg and cleanup of alt-tag-only sites Invisible Bread, Softer World (alt tags), Dinosaur Comics Cleanup $extraimage = $xpath->query("//img[@class='extrapanelimage']")->item(0); $new_element = $doc->createElement("img"); $article['content'] = $matches[1]; $img = preg_replace("@width=\"\d+\"@", "", $img); $article['content'] .= "
$orig_content
"; } // Scenes From A Multiverse Least I Could Do (wtf image size?) // Least I Could Do (wtf image size? If (preg_match("@.*()@", $article['content'], $matches)) { $img = preg_replace("@width=\"\d+\"@", "", $img); $article['content'] = $this->get_img_tags($xpath, '//td/img[contains(@src, "/comics/images/")]', $article); // Berkeley Mews elseif (strpos($article["link"], "explosm.net/comics") !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//p[@id='comic_body']//a//img", $article); elseif (strpos($article['link'], 'threepanelsoul.com/2') !== FALSE) { elseif (strpos($article['content'], 'wondermark.com/c') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $orig_content = strip_tags($article['content']); $article['content'] .= "
Error processing via _comics plugin!
" . $e->getMessage(); function mangle_article($article) { // Manic Pixie Nightmare Girls elseif (strpos($article["link"], "chainsawsuit.com/comic/") !== FALSE && // SatW elseif (strpos($article["link"], "www.smbc-comics.com/comic/") !== FALSE) { $xpath = new DOMDocument(); elseif (strpos($article['content'], 'thedoghousediaries.com/dhdcomics/') !== FALSE){ $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//div[@class='timeline-description']", $article); $article['content'] = $this->get_img_tags($xpath, "//figure[@class='photo-hires-item']//img", $article); } // Joy of Tech elseif (strpos($article['link'], 'campcomic.com/comic/') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//div[@class='img-comic-container']//img", $article); } // Invisible Bread (make the bread visible) elseif (strpos($article['content'], 'thedoghousediaries.com/dhdcomics/') !== FALSE) { if ($img->getAttribute('title')) { $article['content'] = $this->get_img_tags($xpath, "//div[@id='comic-1']//img", $article); Invisible Bread, Softer World (alt tags we don't need to call out for foreach ($imgs as $img) { if ($img->getAttribute('title')) { $article['content'] = $img_tag . $article['content']; } // Cyanide & Happiness elseif (strpos($article['link'], 'campcomic.com/comic/') !== FALSE) { } //Sites that provide images and just need alt tags textified. $alt_element = $doc->createElement("i.

New Pull Request