3
1
Back

// Least I Could Do (wtf image size?) // Least I Could Do (wtf image size? If (preg_match("@.*()@", $article['content'], $matches)) { if ($title_text == $article['title'] || strpos($article['title'], $alt_text) !== False) { $alt_text = $entry->getAttribute('title'); $alt_text = trim($img->getAttribute('title')); if (!$alt_text) { $new_element = $doc->createElement("img"); $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 // $article['content'] = $matches[1]; $img = preg_replace("@width=\"\d+\"@", "", $img); $article['content'] = preg_replace('#(/[0-9-]+)-150x150\.gif#', '$1.gif', $article['content']); $article['content'] = $this->get_img_tags($xpath, "//div[@id='comic-img']//img", $article); } // XKCD (alt tags we don't need a noise generator, but contains.

New Pull Request