Labels Milestones
Back$orig_content = strip_tags($article['content']); $article['content'] .= "
Alt: " . $img->getAttribute('title') . ""; } } Clean up code formatting; added a few comics; standardized appending alt/title text under images (extra useful for non-browser users) Clean up code formatting; added a few comics; standardized appending alt/title text under images (extra useful for non-browser users function get_content($link) { * Inserts text captions from any image with an alt or title tag. Function alt_textify($article, $doc = new DOMDocument(); $doc->loadHTML($article['content']); $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, "//img[@class='ksc' and contains(@src, 'comics')]", $article); } // Poly In Pictures elseif (strpos($article['link'], 'amultiverse.com/comic/') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); // Joy of Tech $xpath = $this->get_xpath_dealie($article['link']); // Joy of Tech elseif (strpos($article['link'], 'girlswithslingshots.com/comic/') !== FALSE) { // Awkward Zombie elseif (strpos($article['link'], 'http://www.achewood.com/index.php?date=') !== FALSE) { // only keep everything starting at the first if(preg_match("@.*(
New Pull Request