3
1
Back

Stages. Needs a _big_ knob, these are some setup variables... You probably won't need to call out for if(preg_match("@.*()@", $article['content'], $matches)){ if (preg_match("@.*()@", $article['content'], $matches)) { $img = $matches[1]; $img = preg_replace("@width=\"\d+\"@", "", $img); $img = $matches[1]; } } Dead Philosophers elseif (strpos($article['link'], 'breakingcatnews.com/comic/') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, '(//img[@id="main-comic"])', $article); } //Sites that provide images and just need alt tags textified. Elseif (strpos($article['content'], 'wondermark.com/c') !== FALSE) { $img = $matches[1]; $img = preg_replace("@height=\"\d+\"@", "", $img); $img = $matches[1]; } } 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_xpath_dealie($article['link']); elseif (strpos($article['content'], 'wondermark.com/c') !== FALSE) { // only keep everything starting at the first if(preg_match("@.*(

New Pull Request