3
1
Back

Title texts, they're both different, use both. $alt_element = $doc->createElement("i", $title_text); $para_element->appendChild($title_element); } $img->parentNode->replaceChild($new_element, $img); } function api_version() { return array(0.1, return array( $html, $content_type ); } function mangle_article($article) { if (strpos($article["content"], "bonus panel!") !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = preg_replace("@@", '', $article['content']); Clean up code formatting; added a few comics; standardized appending alt/title text under images (extra useful for non-browser users) Clean up code formatting; added a few comics; standardized appending alt/title text under images (extra useful for non-browser users $host->add_hook($host::HOOK_RENDER_ARTICLE_CDM, $this); $host->add_hook($host::HOOK_RENDER_ARTICLE, $this); } Some comics supported elseif (strpos($article['link'], 'cad-comic.com/cad/') !== FALSE) { //also get blog entry $article['content'] .= "
Alt: " . $img->getAttribute('title') . ""; // only keep everything starting at the first $xpath = $this->get_xpath_dealie($article['link']); $orig_content = strip_tags($article['content']); $article['content'] = $this->get_img_tags($xpath, '(//div[@id="comic"]//img)', $article); $article['content'] = $matches[1]; } } //Sites that provide images and just need alt tags textified. } $article = $this->alt_textify($article); if (GDORN_DEBUG && $article['debugging']) { foreach ($article['debugging'] as $msg) { $article['content'] .= "
$orig_content
"; } // PhD Unknown elseif (strpos($article["link"], "explosm.net/comics") !== FALSE) { $article['content'] .= "
" . $msg . ""; } } Dead Philosophers Added BCN, Something Positive // Something Positive } if ($rel[0]=='#' || $rel[0]=='?') { return $this->mangle_article($article); } function rel2abs($rel, $base) { if (preg_match("@.*()@", $article['content'], $matches)) { } else { return 2; } } // CTRL+ALT+DEL Sillies elseif (strpos($article['link'], 'http://www.geekculture.com/joyoftech/') !== FALSE) { $article['content'] = $this->get_img_tags($xpath, "//div[@class='comicpage']//img[contains(@src, 'uploads')]", $article); elseif (strpos($article['link'], 'qwantz.com/index.php?comic') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//div[@id='comic']//img", $article); } // Make sure bottom ends at z=0 © 2012 Steve.

New Pull Request