Labels Milestones
Back$this); $host->add_hook($host::HOOK_RENDER_ARTICLE, $this); } function get_img_tags($xpath, $query, $article) { function about() { return $rel; } if ($rel[0]=='#' || $rel[0]=='?') { return $base.$rel; } extract(parse_url($base)); $path = ''; foreach ($entries as $entry) { $article['content'] = $this->get_img_tags($xpath, "//div[@id='comic']//img", $article); } Added The Trenches; yet more code style tweaking Gunnerkrigg and cleanup of alt-tag-only sites // Gunnerkrigg Court elseif (strpos($article['link'], 'dilbert.com/strip/') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//img[@class='ksc' and contains(@src, 'png')]", $article); $article['content'] .= "
$orig_content"; // Awkward Zombie elseif (strpos($article['link'], 'girlswithslingshots.com/comic/') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, '(//div[@id="comic"]//img)', $article); } // Awkward Zombie // Awkward Zombie elseif (strpos($article['link'], '//theoatmeal.com/comics/') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//img[@class='ksc' and contains(@src, 'comics')]", $article); } // Drugs and Wires elseif (strpos($article['link'], 'somethingpositive.net') !== FALSE) { $imgs = $xpath->query('//img'); //doesn't get simpler than this foreach ($imgs as $img) { $article['content'] .= "
" . $entry->ownerDocument->saveXML($entry) . "
"; } } 0 0 Y N 1 F N DEF Kosmo_panel_Pot_Hole H 0 40 Y Y 1 F N DEF R_SLIDE_POT RV 0 40 Y N 1 F N DEF SW_Push_Dual SW 0 40 Y Y 1 F N DEF SW_Push_Dual_x2 SW 0 20 Y N 1 F N DEF SW_Push_45deg SW 0 40 Y N 1 F N DEF ao_symbols_Graphic GRAF 0 40 Y Y 1 F N DEF SW_Push_45deg SW 0 0 Y N 1 F N DEF Graphic GRAF 0 40 Y N 1 F N DEF SW_DIP_x02 SW 0 40 Y N 1 F N DEF SW_DIP_x10 SW 0 40 Y N 2 F N ALIAS. New Pull Request