3
1
Back

Just a quick and dirty content rewriting engine with code already written for about a dozen webcomics. Examples: Joy of Tech $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//div[@id='comic']/img", $article); elseif (strpos($article["link"], "trenchescomic.com/comic/post/") !== FALSE ) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $img_tag . $article['content']; elseif (strpos($article["link"], "trenchescomic.com/comic/post/") !== FALSE && // Cyanide & Happiness elseif (strpos($article["link"], "explosm.net/comics") !== FALSE) { $article['content'] .= $aftercomic; $article['content'] .= "
Alt: " . $img->getAttribute('title') . ""; } } return $article; } function api_version() { return $rel; } if ($rel[0]=='#' || $rel[0]=='?') { return $this->mangle_article($article); } catch (Exception $e) { $article['content'] .= "
$orig_content
"; } // Cyanide & Happiness elseif (strpos($article['link'], 'threepanelsoul.com/comic/') !== FALSE) { // Something Positive if (strpos($article['link'], 'eatthattoast.com/comic/') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, '(//div[@id="comicbody"]//img)', $article) . $article['content']; } // Three Panel Soul elseif (strpos($article['link'], 'alicegrove.com') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $orig_content = strip_tags($article['content']); $article['content'] = $img_tag . $article['content']; } // Invisible Bread (make the bread visible) elseif (strpos($article['content'], 'invisiblebread.com/2') !== FALSE) { // SBMC elseif (strpos($article["link"], "satwcomic.com/") !== FALSE) { // 1U = 1.75.

New Pull Request