Labels Milestones
Back* Most important: Keep it simple. Follow one pattern. Class _comics extends Plugin { catch (Exception $e) { $article['content'] .= "
Alt: " . $article['id']; } return $article; } function rel2abs($rel, $base) { if (strpos($article['link'], 'eatthattoast.com/comic/') !== FALSE) { $imgs = $xpath->query('//img'); //doesn't get simpler than this foreach ($imgs as $img) { $article['content'] = $img_tag . $article['content']; } // Girls with Slingshots elseif (strpos($article['link'], 'leasticoulddo.com/comic') !== FALSE) { elseif (strpos($article['link'], 'www.robot-hugs.com/') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//div[@id='cc-comicbody']/img", $article); } Some comics supported elseif (strpos($article['link'], 'threepanelsoul.com/2') !== FALSE) { elseif (strpos($article['content'], 'wondermark.com/c') !== FALSE) { elseif (strpos($article['link'], 'awkwardzombie.com/index.php?comic') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $img; } Fix for component clearance, panel thickness from printer realities bugfix/10hp More layout updates ttrss-plugin- _comics/init.php 342 lines if (strpos($article["link"], "penny-arcade.com") !== FALSE || strpos($article['content'], 'thedoghousediaries.com/dhdcomics/') !== 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); } // } // Invisible Bread (make the bread visible) // Invisible Bread (make the bread visible elseif (strpos($article['content'], 'wondermark.com/c') !== FALSE) { // Wondermark (alt tag elseif (strpos($article['link'], 'leasticoulddo.com/comic') !== FALSE) { // Drugs and Wires drugs & wires, pilotside elseif (strpos($article["link"], "poorlydrawnlines.com/comic/") !== FALSE && strpos($article["title"], "Comic:") !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, '(//div[@id="comic"]//img)', $article) . $article['content']; } // SatW elseif (strpos($article["link"], "explosm.net/comics") !== FALSE) { // Wondermark (alt tag already present) elseif (strpos($article['content'], 'imgs.xkcd.com/comics/') !== FALSE) { $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'] = $this->get_img_tags($xpath, '(//div[@id="comic"]//img)', $article) . $article['content']; $article['content'] = $this->get_img_tags($xpath, "//div[@id='comic-1']//img", $article); // $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//div[@id='comic']/noscript/img", $article); $article['content'] .= "
Error processing via _comics plugin!
" . $e->getMessage(); function mangle_article($article) { // XKCD (alt tags we don't need to call out for foreach ($imgs as $img) { if (!$title_text || $title_text == $article['title'] || strpos($article['title'], $alt_text) !== false.