3
1
Back

NULL) { foreach ($imgs as $img) { if (preg_match("@.*?(.*)@", $article['content'], $matches)) { } function rel2abs($rel, $base) { Fix for two bugs in Doghouse Diaries rss: spaces in img src and quotes in alt/title text under images (extra useful for non-browser users if (preg_match("@.*(textContent . "

"; $article['content'] .= "

" . $entry->ownerDocument->saveXML($entry) . "

"; } } Invisible Bread, Softer World (alt tags we don't need to call out for elseif (strpos($article['content'], 'invisiblebread.com/2') !== FALSE) { $article['content'] .= "

" . $entry->textContent . ""; if (ADD_IDS) { $new_element->appendChild($para_element); if ($alt_text == $title_text){ } elseif (strpos($article['link'], 'cad-comic.com/sillies/') !== FALSE) { if ($title_text == $article['title'] || strpos($article['title'], $alt_text) !== false){ // there's both alt and title texts, they're both different, use both. } elseif (strpos($title_text, $alt_text) !== false){ } elseif ($alt_text == $article['title'] || strpos($article['title'], $alt_text) !== false){ // there's both alt and title texts, they're both different, use both. $title_element = $doc->createElement("i", $title_text); $para_element->appendChild($title_element); } Clean up code formatting; added a few comics; standardized appending alt/title text under images (extra useful for non-browser users elseif (strpos($article['content'], 'imgs.xkcd.com/comics/') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); // Three Panel Soul elseif (strpos($article['link'], 'www.geekculture.com/joyoftech/') !== FALSE) { elseif (strpos($article['link'], 'somethingpositive.net') !== FALSE) { elseif (strpos($article['link'], 'cad-comic.com/sillies/') !== FALSE) { // Questionable Content (cleanup) // Questionable Content (cleanup) // Questionable Content (cleanup elseif (strpos($article['content'], 'www.asofterworld.com/index.php?id') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//img[starts-with(@src, 'sp') and contains(@src, 'png')]", $article.

New Pull Request