3
1
Back

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("@.*(get_img_tags($xpath, '(//img[@id="main-comic"])', $article); } // Three Panel Soul elseif (strpos($article['link'], 'gunnerkrigg.com/?p') !== FALSE) { $article['content'] = $this->get_img_tags($xpath, "//img[@class='ksc' and contains(@src, 'png')]", $article); } // Something Positive Some comics supported elseif (strpos($article['link'], 'somethingpositive.net') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $orig_content = strip_tags($article['content']); $article['content'] = $this->get_img_tags($xpath, "//div[@class='comic-wrap']//img[@class='comic']", $article); // Scenes From A Multiverse (to get alt tags textified. } //Sites that provide images and just need alt tags elseif (strpos($article['link'], 'cad-comic.com/cad/') !== FALSE) { $doc = new DOMXpath($doc); $imgs = $xpath->query('//img'); //doesn't get simpler than this foreach ($imgs as $img) { if ($title_text == $article['title'] || strpos($article['title'], $alt_text) !== false){ } elseif (strpos($alt_text, $title_text) !== False) { if ($img->getAttribute('title')) { $article['content'] .= "

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

"; } } function rel2abs($rel, $base) { if (parse_url($rel, PHP_URL_SCHEME) != '' || substr($rel, 0, 2) == '//') { return $this->mangle_article($article); } function hook_render_article_cdm($article) { function about() { return $this->mangle_article($article); } function rel2abs($rel, $base $path = preg_replace('#/[^/]*$#', '', $path); /* replace '//' or '/./' or '/foo/../' with '/' */ for($n=1; $n>0; $abs=preg_replace($re, '/', $abs, -1, $n)) {} /* absolute URL */ $abs = preg_replace($re, .

New Pull Request