3
1
Back

False){ // there's both alt and title texts, they're both different, use both. $title_element = $doc->createElement("i", $alt_text); $para_element->appendChild($alt_element); $para_element->appendChild($doc->createElement("br")); $title_element = $doc->createElement("i", $title_text); $para_element->appendChild($title_element); } $img->parentNode->replaceChild($new_element, $img); } function mangle_article($article) { // Girls with Slingshots // Girls with Slingshots elseif (strpos($article['link'], 'somethingpositive.net') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//div[@id='comic']/img", $article); elseif (strpos($article['content'], 'thedoghousediaries.com/dhdcomics/') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $img_tag = $this->get_img_tags($xpath, "//div[@id='content']/img", $article); } // Least I Could Do (wtf image size?) // Least I Could Do (wtf image size? Elseif (strpos($article['link'], 'http://www.achewood.com/index.php?date=') !== FALSE) { $article['content'] = $this->get_img_tags($xpath, "//div[@id='comic']//img", $article); } // CTRL+ALT+DEL elseif (strpos($article['link'], 'twolumps.net/d/') !== FALSE) { $article['content'] = $this->get_img_tags($xpath, "//p[@id='comic_body']//img", $article); $article['content'] .= "
Alt: $alt_text
"; } } // Awkward Zombie $article['content'] .= "

" . $entry->textContent . "

"; } } Invisible Bread, Softer World (alt tags), Dinosaur Comics Cleanup $entries = $xpath->query("//div[@id='blarg']/div[last()]"); foreach ($entries as $entry){ foreach ($entries as $entry) { $article['content'] = $this->get_img_tags($xpath, "//div[@id='comic']/img", $article); $article['content'] = $this->get_img_tags($xpath, '(//div[@id="comic"]//img)', $article); $article['content'] = $this->get_img_tags($xpath, '(//div[@id="comic"]//img)', $article) . $article['content']; elseif (strpos($article["link"], "trenchescomic.com/comic/post/") !== FALSE ) { // Girls with Slingshots // Girls with Slingshots elseif (strpos($article['link'], 'breakingcatnews.com/comic/') !== FALSE) { // color([1,0,0]) // linear_extrude(thickness+1) // text(string, size, halign=halign, font=font.

New Pull Request