3
1
Back

= $xpath->query('//img'); //doesn't get simpler than this foreach($imgs as $img){ $article['content'] .= "
Alt: " . $article['id']; } return $article; } function api_version() { return $this->mangle_article($article); } function mangle_article($article) { // Awkward Zombie $orig_content = strip_tags($article['content']); $article['content'] = $this->get_img_tags($xpath, '(//div[@id="comic"]//img)', $article); } // Eat That Toast elseif (strpos($article["link"], "www.smbc-comics.com/comic/") !== FALSE) { elseif (strpos($article['link'], 'somethingpositive.net') !== FALSE) { // Scenes From A Multiverse (to get alt tags) 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="post"]//img)', $article); $article['content'] .= "

$orig_content

"; //also append the blarg post because that's small, interesting, //and sometimes necessary for old fogeys like me to get what game it's about $entries = $xpath->query("//div[@id='signoff-wrapper']"); foreach ($entries as $entry) { $article['content'] .= "
Alt: " . $img->getAttribute('title') . ""; Invisible Bread, Softer World (alt tags we don't.

New Pull Request