3
1
Back

(!$alt_text && !$title_text) { $new_element->appendChild($para_element); if ($alt_text && !$title_text){ $text_element = $doc->createElement("i", $title_text); } function get_xpath_dealie($link){ list($html, $content_type) = $this->get_content($link); $doc = NULL) { if (strpos($article["content"], "bonus panel!") !== FALSE) { // Dinosaur Comics Cleanup elseif (strpos($article['link'], 'cad-comic.com/cad/') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//div[@class='comicpage']//img[contains(@src, 'ENG_')]", $article); } Invisible Bread, Softer World (alt tags), Dinosaur Comics Cleanup // Dinosaur Comics Cleanup $extraimage = $xpath->query("//img[@class='extrapanelimage']")->item(0); $new_element = $doc->createElement("div"); $para_element = $doc->createElement("p"); $article['content'] = $img_tag . $article['content']; } // Awkward Zombie elseif (strpos($article['link'], 'dead-philosophers.com/?p') !== FALSE) { // Questionable Content (cleanup) elseif (strpos($article['link'], 'www.timothywinchester.com/2') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, '(//img[@id="main-comic"])', $article); } // Cyanide & Happiness elseif (strpos($article["link"], "explosm.net/comics") !== FALSE) { $article['content'] .= "
Alt: " . $img->getAttribute('title') . ""; } } // Least I Could Do (wtf image size? If (preg_match("@.*()@", $article['content'], $matches)) { // $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//div[@id='cc-comicbody']/img", $article); $article['content'] .= "

$orig_content

"; //also append the blarg post because that's small, interesting, //and sometimes.

New Pull Request