3
1
Back

(!$alt_text) { $new_element = $doc->createElement("div"); $para_element = $doc->createElement("p"); $article['content'] = preg_replace('#(width|height)="150"#', '', $article['content']); if (preg_match("@.*?(.*)@", $article['content'], $matches)) { $img = preg_replace("@height=\"\d+\"@", "", $img); $article['content'] = $img_tag . $article['content']; } // Poly In Pictures elseif (strpos($article['link'], 'www.timothywinchester.com/2') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = preg_replace("@@", '', $article['content']); if (preg_match("@.*?(.*)@", $article['content'], $matches)) { $img = $matches[1]; $article['content'] = $img; } } // Scenes From A Multiverse (to get alt tags if both exist Updated LICD, alter alt-textify to handle both title and alt tags textified. Elseif (strpos($article['content'], 'imgs.xkcd.com/comics/') !== FALSE) { $xpath = new DOMDocument(); $doc->loadHTML($article['content']); $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//div[@id='content']/img", $article); } // Awkward Zombie elseif (strpos($article['link'], 'alicegrove.com') !== FALSE) { //also append.

New Pull Request