3
1
Back

Improve on this one, Number of faces on the first if (preg_match("@.*()@", $article['content'], $matches)) { $article['content'] .= "

Bonus comic:
" . $aftercomic . "

"; // only keep everything starting at the first if(preg_match("@.*()@", $article['content'], $matches)){ $img = $matches[1]; $img = preg_replace("@width=\"\d+\"@", "", $img); $article['content'] = $this->get_img_tags($xpath, "//img[starts-with(@src, '/comics/') and @class='comic_image']", $article); } // SatW elseif (strpos($article["link"], "explosm.net/comics") !== FALSE) { // Timothy Winchester (People I Know elseif (strpos($article['link'], 'amultiverse.com/comic/') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $aftercomic = $this->get_img_tags($xpath, "//div[@class='comicpage']//img[contains(@src, 'ENG_')]", $article); } Assorted updates elseif (strpos($article['link'], 'amultiverse.com/comic/') !== FALSE) { // slider pot slit module make_step(bottom_element="switch") { // $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//div[@id='comic']//img", $article); } // Three Panel Soul elseif (strpos($article['link'], 'awkwardzombie.com/index.php?comic') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//div[@id='comic']//img", $article); } // Softer World (alt tags), Dinosaur Comics Cleanup elseif (strpos($article['content'], 'invisiblebread.com/2') !== FALSE) { // Poorly Drawn Lines // Berkeley Mews // $img_tag = $this->get_img_tags($xpath, '//td/img[contains(@src, "/comics/images/")]', $article); // Berkeley Mews // $img_tag = $this->get_img_tags($xpath, '(//div[@class="webcomic-image"]//img)', $article); } achewood, gwss fix, fix for when invisiblebread has no bread function rel2abs($rel, $base) { if (!$alt_text || strpos($article['title'], $title_text) !== false){ $text_element = $doc->createElement("i", $title_text); } elseif ($title_text && !$alt_text){ $text_element = $doc->createElement("i", $title_text); $para_element->appendChild($title_element); } $img->parentNode->replaceChild($new_element, $img); } function get_xpath_dealie($link){ list($html, $content_type) = $this->get_content($link); $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//div[@id='comic']//img", $article); function mangle_article($article) .

New Pull Request