3
1
Back

$img) { From b4b4641770af206fdb9aac874d2d59b9ecc400d1 Mon Sep 17 00:00:00 2001 Subject: [PATCH] jesus and mo, maintenance Fixes for CAD and sorcery101 Updated LICD, alter alt-textify to handle both title and alt tags foreach($imgs as $img){ // Questionable Content (cleanup) elseif (strpos($article['link'], 'dead-philosophers.com/?p') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//div[@id='comic']//img", $article); } // Scenes From A Multiverse (to get alt tags) elseif (strpos($article['link'], 'breakingcatnews.com/comic/') !== FALSE) { strpos($article["title"], "Comic:") !== FALSE) { elseif (strpos($article['content'], 'invisiblebread.com/2') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, '//p[@class="Maintext"]//img[contains(@src, "joyimages")]', $article); } // Camp Weedonwantcha elseif (strpos($article['link'], 'somethingpositive.net') !== FALSE) { $doc = new DOMDocument(); elseif (strpos($article['content'], 'www.asofterworld.com/index.php?id') !== FALSE ) { // only keep everything starting at the first if(preg_match("@.*()@", $article['content'], $matches)){ if (preg_match("@.*(get_xpath_dealie($article['link']); // $article['content'] = $this->get_img_tags($xpath, "//div[@class='comicpage']//img[contains(@src, 'ENG_')]", $article); $article['content'] = $this->get_img_tags($xpath, '(//img[@id="main-comic"])', $article); } */ // $host->add_hook($host::HOOK_ARTICLE_FILTER, $this); $host->add_hook($host::HOOK_RENDER_ARTICLE_CDM, $this); $host->add_hook($host::HOOK_RENDER_ARTICLE, $this); } function get_xpath_dealie($link){ list($html, $content_type) = $this->get_content($link); $doc = new DOMDocument(); $doc->loadHTML($article['content']); $xpath = $this->get_xpath_dealie($article['link']); // elseif (strpos(strtolower($article['link']), 'giantitp.com/comics/') !== FALSE) .

New Pull Request