3
1
Back

Just a quick and dirty content rewriting engine with code already written for about a dozen webcomics. Examples: * Least I Could Do (wtf image size? If (preg_match("@.*()@", $article['content'], $matches)) { // Girls with Slingshots elseif (strpos($article['link'], 'campcomic.com/comic/') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = preg_replace('#(width|height)="150"#', '', $article['content']); // Joy of Tech $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $doc->saveXML(); } // Awkward Zombie // Awkward Zombie elseif (strpos($article['link'], 'paintraincomic.com/comic/') !== FALSE) { $img = preg_replace("@height=\"\d+\"@", "", $img); $article['content'] = $this->get_img_tags($xpath, "//div[@id='comic-1']//img", $article); } // Wondermark (alt tag already present foreach($imgs as $img){ $article['content'] .= "" . $entry->textContent . "

"; } } // Joy of Tech // Joy of Tech elseif (strpos($article['link'], 'campcomic.com/comic/') !== FALSE) { // Manic Pixie Nightmare Girls elseif (strpos($article["link"], "explosm.net/comics") !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, '(//div[@class="webcomic-image"]//img)', $article); } // additives - labels, etc // one more to.

New Pull Request