3
1
Back

$this); } function get_img_tags($xpath, $query, $article, $base_url=NULL) { /* absolute URL */ $abs = "$host$path/$rel"; function get_content($link) { * Use this if you don't want the ring. // The Trenches elseif (strpos($article["link"], "satwcomic.com/") !== FALSE) { $xpath = new DOMDocument(); $doc->loadHTML($article['content']); $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, '(//div[@id="main"]//img)', $article); } // Poorly Drawn Lines elseif (strpos($article["link"], "eatthattoast.com/comic/") !== FALSE ) { $xpath = $this->get_xpath_dealie($article['link']); } elseif ($title_text && !$alt_text){ $text_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); } Clean up code formatting; added a few comics; standardized appending alt/title text under images (extra useful for non-browser users) function about() { return 2; } } //Sites that provide images and just need alt tags textified. Elseif (strpos($article['content'], 'imgs.xkcd.com/comics/') !== FALSE.

New Pull Request