3
1
Back

D="m -4.7244126,1.1417373 v 0.07874" d="m -2.5196841,2.5590618 h -0.07874" d="m -0.59055042,2.521019 v 0.07874" d="M 2.992121,8.8569411 H 2.913381" It's really just a quick and dirty content rewriting engine with code already written for about a dozen webcomics. Examples: Joy of Tech $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, '(//div[@class="post"]//img)', $article); // Three Panel Soul elseif (strpos($article['link'], 'threepanelsoul.com/2') !== FALSE) { // only keep everything starting at the first if(preg_match("@.*()@", $article['content'], $matches)){ if (preg_match("@.*()@", $article['content'], $matches)) { $article['content'] .= "

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

"; } } // Dinosaur Comics Cleanup $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'] = $this->get_img_tags($xpath, '(//div[@id="aftercomic"]//img)', $article); $article['content'] = $this->get_img_tags($xpath, "//div[@id='imgdiv']//img", $article); //also get blog entry $entries = $xpath->query("//div[@id='blarg']/div[last()]"); foreach ($entries as $entry) { $article['content'] .= "

" . $entry->textContent . "

"; } } return $article; } function hook_render_article_cdm($article) { return 2; } } Clean up code formatting; added a few comics; standardized appending alt/title text under images (extra useful for non-browser users /* absolute URL is ready! */ return $scheme.'://'.$abs; } function get_img_tags($xpath, $query, $article){ $entries = $xpath->query("//span[@class='rss-content']"); foreach ($entries as $entry) { $article['content'] .= "
ID: " . $article['id']; } return $article.

New Pull Request