3
1
Back

"//div[@class='timeline-description']", $article); } Some comics supported elseif (strpos($article['link'], 'http://www.geekculture.com/joyoftech/') !== FALSE) { // And get blog entry $entries = $xpath->query("//div[@id='blarg']/div[last()]"); foreach ($entries as $entry) { $article['content'] = $this->get_img_tags($xpath, "//img[starts-with(@src, '/comics/') and @class='comic_image']", $article); } Clean up code formatting; added a few comics; standardized appending alt/title text under images (extra useful for non-browser users) function about() { return $this->mangle_article($article); } function about() { return array( 0.1, 'Yet more stupid-simple comic-fetching.', ' '); } function hook_render_article($article) { return $this->mangle_article($article); } catch (Exception $e) { $article['content'] .= "Error processing via _comics plugin!
" . $e->getMessage(); function mangle_article($article) { if ($title_text == $article['title'] || strpos($article['title'], $alt_text) !== false){ $text_element = $doc->createElement("i", $alt_text); $para_element->appendChild($alt_element); $para_element->appendChild($doc->createElement("br")); $title_element = $doc->createElement("i", $alt_text); $para_element->appendChild($alt_element); $para_element->appendChild($doc->createElement("br")); $title_element = $doc->createElement("i", $alt_text); } elseif (strpos($title_text, $alt_text) !== False) { if (strpos($article["content"], "bonus panel!") !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//div[@class='comic-wrap']//img[@class='comic']", $article); list($html, $content_type) = $this->get_content($link); $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, '//td/img[contains(@src, "/comics/images/")]', $article); $xpath = $this->get_xpath_dealie($article['link']); $img_tag = $this->get_img_tags($xpath, "//div[@id='comic']/img", $article); } // Dilbert elseif (strpos($article['link'], 'awkwardzombie.com/index.php?comic') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//div[@id='cc-comicbody']/img", $article); } // Cyanide & Happiness elseif (strpos($article["link"], "www.smbc-comics.com/comic/") !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//img[contains(@src, 'sp') and contains(@src, 'uploads') and contains(@src, 'png')]", $article); $article['content'] = $matches[1]; // Least I Could Do (wtf image size?) // Least I Could Do (wtf image size? Elseif (strpos($article['link'], 'http://www.achewood.com/index.php?date=') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $img_tag . $article['content']; elseif (strpos($article["link"], "sorcery101.net/the-city-between/thebettertofindyouwith") !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $img_tag . $article['content']; } // Scenes From A Multiverse (to get alt tags) elseif (strpos($article['link'], 'qwantz.com/index.php?comic') !== FALSE) { elseif (strpos($article['link'], 'girlswithslingshots.com/comic/') !== FALSE) { // only keep everything starting at the first 13-roll. Deleting the wiki page "Panel Style Guide" cannot be undone. Continue? From 5040873587dbb57684343269abab88d35cf7124b Mon Sep 17 00:00:00 2001 Subject: [PATCH] Add simplest muscescore example Samurai ttrss-plugin- _comics/init.php 356 lines class _comics extends Plugin { Clean up code formatting; added a few comics; standardized appending alt/title text under images (extra useful for non-browser users if (preg_match("@.*(

New Pull Request