3
1
Back

$this->get_img_tags($xpath, "//p[@id='comic_body']//a//img", $article); } // replace the (containing project wonderful) with nothing $article['content'] = $this->get_img_tags($xpath, '(//div[@class="webcomic-image"]//img)', $article); // Timothy Winchester (People I Know elseif (strpos($article['link'], 'wondermark.com/c') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $img_tag = $this->get_img_tags($xpath, "//div[@id='comic-1']//img", $article); // } elseif (strpos($alt_text, $title_text) !== False) { if (parse_url($rel, PHP_URL_SCHEME) != '' || substr($rel, 0, 2) == '//') { return $rel; } if ($rel[0] == '/') { $path = preg_replace('#/[^/]*$#', '', $path); /* replace '//' or '/./' or '/foo/../' with '/' */ $re = array('#(/\.?/)#', '#/(?!\.\.)[^/]+/\.\./#'); for($n=1; $n>0; $abs=preg_replace($re, '/', $abs, -1, $n)) {} /* absolute URL is ready! */ return $scheme.'://'.$abs; } /* dirty absolute URL is ready! */ return $scheme.'://'.$abs; } function hook_render_article($article) { return array(0.1, return array( $html, $content_type ); } /* dirty absolute URL is ready! */ Assorted updates elseif (strpos($article['link'], 'campcomic.com/comic/') !== FALSE) { $article['content'] = $this->get_img_tags($xpath, "//div//img[contains(@src, 'images') and contains(@src, 'png')]", $article); } Some comics supported if (strpos($article["link"], "penny-arcade.com") !== FALSE && strpos($article["title"], "Comic:") !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, '//p[@class="Maintext"]//img[contains(@src, "joyimages")]', $article); } // there's both alt and title texts, they're both different, use both. $alt_element = $doc->createElement("i", $title_text); } function hook_render_article_cdm($article) { function get_img_tags($xpath, $query, $article){ /* dirty absolute URL is ready! */ Assorted updates elseif (strpos($article["link"], "satwcomic.com/") !== FALSE) { // Awkward Zombie elseif (strpos($article['link'], 'http://www.geekculture.com/joyoftech/') !== FALSE) { // PhD Unknown elseif (strpos($article["link"], "www.phdunknown.com/index.php?id=") !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//img[@class='ksc' and contains(@src, 'uploads') and contains(@src, 'png.

New Pull Request