3
1
Back

} Regarding the board that will be thinner than this foreach($imgs as $img){ $article['content'] .= $aftercomic; $article['content'] .= "

" . $entry->ownerDocument->saveXML($entry) . "

"; } } function rel2abs($rel, $base) { if (strpos($article["content"], "bonus panel!") !== FALSE) { // Dilbert elseif (strpos($article['link'], 'dead-philosophers.com/?p') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//div[@id='comic-img']//img", $article); // $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, '//p[@class="Maintext"]//img[contains(@src, "joyimages")]', $article); } // $article['content'] = $this->get_img_tags($xpath, "//div[@id='comic']/noscript/img", $article); } // Chainsawsuit // Chainsawsuit elseif (strpos($article["link"], "explosm.net/comics") !== FALSE) { // $img_tag = $this->get_img_tags($xpath, "//p[@id='comic_body']//a//img", $article); elseif (strpos($article['link'], 'cad-comic.com/comic/') !== FALSE) { $article['content'] = $this->get_img_tags($xpath, "//div[@id='content']/img", $article); } elseif (strpos($alt_text, $title_text) !== false){ // there's both alt and title texts, they're both different, use both. $alt_element = $doc->createElement("i", $title_text); } function rel2abs($rel, $base) { if (strpos($article["content"], "bonus panel!") !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//div[@id='comic']//img", $article); } // Three Panel Soul * Scenes From A Multiverse (to get alt tags) elseif (strpos($article['link'], 'questionablecontent') !== 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 if (preg_match("@.*(get_img_tags($xpath, '(//div[@id="aftercomic"]//img)', $article); $article['content'] .= "

" . $entry->textContent . "

"; } } // CTRL+ALT+DEL elseif (strpos($article['link'], 'alicegrove.com') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, '(//img[@id="main-comic"])', $article); } // Joy of Tech elseif (strpos($article['link'], 'campcomic.com/comic/') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//div[@id='content']/img", $article); } // XKCD (alt tags we don't need.

New Pull Request