3
1
Back

$base.$rel; if ($rel[0] == '#' || $rel[0] == '?') { return array(0.1, 'Yet more stupid-simple comic-fetching.', } function get_img_tags($xpath, $query, $article){ $entries = $xpath->query("//div[@id='signoff-wrapper']"); $rel = trim($rel); if (parse_url($rel, PHP_URL_SCHEME) != '' || substr($rel, 0, 2) == '//') { return $this->mangle_article($article); } catch (Exception $e) { $article['content'] = $this->get_img_tags($xpath, "//img[starts-with(@src, 'sp') and contains(@src, 'png')]", $article); } // Poly In Pictures elseif (strpos($article['link'], 'somethingpositive.net') !== FALSE) { $xpath = new DOMDocument(); $xpath = $this->get_xpath_dealie($bread_page_url); $extraimage = $xpath->query("//img[@class='extrapanelimage']")->item(0); $new_element = $doc->createElement("img"); $new_element->setAttribute('src', $extraimage->getAttribute('src')); $bread->parentNode->replaceChild($new_element, $bread); $article['content'] = $this->get_img_tags($xpath, "//div[@id='comic']//img", $article); } // Three Panel Soul 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); } Clean up code formatting; added a few comics; standardized appending alt/title text under images (extra useful for non-browser users Invisible Bread, Softer World (alt tags), Dinosaur Comics Cleanup $extraimage .

New Pull Request