Labels Milestones
BackQuick and dirty content rewriting engine with code already written for about a dozen webcomics. Examples: Joy of Tech elseif (strpos($article['link'], 'somethingpositive.net') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, '//td/img[contains(@src, "/comics/images/")]', $article); } // Chainsawsuit // Chainsawsuit // Chainsawsuit elseif (strpos($article["link"], "drugsandwires.fail/dnwcomic/") !== FALSE) { // XKCD (alt tags we don't need to call out for) elseif (strpos($article['content'], 'imgs.xkcd.com/comics/') !== FALSE) { elseif (strpos($article['link'], 'www.timothywinchester.com/2') !== FALSE) { elseif (strpos($article['link'], 'http://www.achewood.com/index.php?date=') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, '(//div[@id="comic"]//img)', $article) . $article['content']; } Added BCN, Something Positive } if (strpos($article['link'], 'eatthattoast.com/comic/') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//img[starts-with(@src, 'sp') and contains(@src, 'png')]", $article); } Dead Philosophers // Dead Philosophers elseif (strpos($article['link'], 'questionablecontent') !== FALSE) { // Wondermark (alt tag already present foreach($imgs as $img){ if ($img->getAttribute('title')) { $article['content'] .= "
Alt: " . $img->getAttribute('title') . ""; } } // Dilbert elseif (strpos($article['link'], 'dead-philosophers.com/?p') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//div[@id='comic']//img", $article); } // CTRL+ALT+DEL // CTRL+ALT+DEL elseif (strpos($article['link'], 'http://www.achewood.com/index.php?date=') !== FALSE) { $article['content'] .= "
" . $entry->textContent . "
"; } } //Sites that provide images and just need alt tags if (preg_match("@.*(- Vertex -1.726257e+000 4.991016e+000 2.494118e+001 facet normal 0.0982303.
- -4.010566e-01 facet normal 0.643697 -0.528271 0.553701 facet.
- -0.382459 -0.447822 0.808195 vertex 5.58228 1.18228 19.1916.
- -1.489001e-15 -5.217420e-15 1.000000e+00 facet normal.