Labels Milestones
BackDiaries rss: spaces in img src and quotes in alt/title text under images (extra useful for non-browser users Added The Trenches; yet more code style tweaking // The Oatmeal $entries = $xpath->query("//span[@class='rss-content']"); foreach ($entries as $entry) { $article['content'] = $this->get_img_tags($xpath, '(//div[@id="comicFrame"])', $article); elseif (strpos($article["link"], "www.smbc-comics.com/comic/") !== FALSE) { if (!$alt_text || $alt_text == $article['title'] || strpos($article['title'], $title_text) !== False) { if (strpos($article["content"], "bonus panel!") !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $matches[1]; } } //Sites that provide images and just need alt tags textified. //Sites that provide images and just need alt tags elseif (strpos($article['link'], 'questionablecontent') !== FALSE) { // Poly In Pictures elseif (strpos($article['link'], 'twolumps.net/d/') !== FALSE) { $xpath = new DOMXpath($doc); $imgs = $xpath->query('//img'); $alt_text = trim($entry->getAttribute('title')); $result_html .= "
Alt: " . $article['id']; $article = $this->alt_textify($article); $entries = $xpath->query("//div[@id='comic-notes']"); foreach ($entries as $entry){ $article['content'] .= "
$orig_content
"; //also append the blarg post because that's small, interesting, $entries = $xpath->query("//div[@id='blarg']/div[last()]"); foreach ($entries as $entry) { $article['content'] = $this->get_img_tags($xpath, "//img[@class='ksc' and contains(@src, 'png')]", $article); } // CTRL+ALT+DEL Sillies elseif (strpos($article['link'], 'threepanelsoul.com/2') !== FALSE) { // only keep everything starting at the first