3
1
Back

[0,1,2],[2,3,0], [1,0,4],[4,0,7],[7,8,4], [8,7,9],[10,9,7], [10,7,6],[6,7,0],[3,6,0], [2,1,4],[3,2,6],[10,6,9],[8,9,4], [4,5,2],[2,5,6],[6,5,9],[9,5,4] ], convexity=5); } } if ($rel[0]=='#' || $rel[0]=='?') { return $this->mangle_article($article); } function hook_render_article($article) { return $article; } Some comics supported if (strpos($article["link"], "penny-arcade.com") !== FALSE ) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//div[@class='comicpage']//img[contains(@src, 'Strip')]", $article); } // Timothy Winchester (People I Know) elseif (strpos($article['link'], 'somethingpositive.net') !== FALSE) { $xpath = new DOMXpath($doc); $bread = $xpath->query("//a[contains(@href, 'bonus-panel')]")->item(0); $bread_page_url = $bread->getAttribute('href'); $xpath = $this->get_xpath_dealie($bread_page_url); $extraimage = $xpath->query("//img[@class='extrapanelimage']")->item(0); $new_element = $doc->createElement("img"); $new_element->setAttribute('src', $extraimage->getAttribute('src')); $bread->parentNode->replaceChild($new_element, $bread); $article['content'] = $matches[1]; 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, "//div[@id='comic']/img", $article); } Some comics supported elseif (strpos($article['link'], 'www.robot-hugs.com/') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); // Joy of Tech elseif (strpos($article['link'], 'campcomic.com/comic/') !== 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); } Clean up code formatting; added a few comics; standardized appending alt/title text under images (extra useful for non-browser users // $article['content'] = $this->get_img_tags($xpath, '(//div[@class="webcomic-image"]//img)', $article); } Invisible Bread, Softer World (alt tags we don't need to call out for) $article['content'] = preg_replace('#(/[0-9-]+)-150x150\.gif#', '$1.gif', $article['content']); $article['content'] = $this->get_img_tags($xpath, "//img[@class='comic']", $article); //also get the blog $entries = $xpath->query("//span[@class='rss-content']"); foreach ($entries as $entry) { $article['content'] .= "

" . $entry->textContent . "

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

" . $entry->textContent . "

"; } } if(ADD_IDS){ $article['content'] .= "
ID: " . $img->getAttribute('title') . ""; } } if ($alt_text && !$title_text){ $text_element = $doc->createElement("i.

New Pull Request