3
1
Back

{ union() { difference() { // Robot Hugs elseif (strpos($article['link'], 'cad-comic.com/sillies/') !== FALSE) { // Doghouse Diaries, which has broken alt tags elseif (strpos($article['link'], 'breakingcatnews.com/comic/') !== FALSE) { // Drugs and Wires elseif (strpos($article["link"], "berkeleymews.com/") !== FALSE && strpos($article["title"], "Comic:") !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); elseif (strpos($article['content'], 'www.asofterworld.com/index.php?id') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//figure[@class='photo-hires-item']//img", $article); // $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//figure[@class='photo-hires-item']//img", $article); // Berkeley Mews // elseif (strpos(strtolower($article['link']), 'giantitp.com/comics/') !== FALSE) { $aftercomic = $this->get_img_tags($xpath, "//div[@id='cc-comicbody']/img", $article); $article['content'] = preg_replace('#(width|height)="150"#', '', $article['content']); if (preg_match("@.*?(.*)@", $article['content'], $matches)) { $img = preg_replace("@width=\"\d+\"@", "", $img); $article['content'] = $this->get_img_tags($xpath, "//div[@id='content']/img", $article); } // SatW elseif (strpos($article["link"], "www.smbc-comics.com/comic/") !== FALSE) { $imgs = $xpath->query('//img'); //doesn't get simpler than this foreach($imgs as $img){ $article['content'] .= "
" . $msg . ""; } } // Wondermark (alt tag already present) // Wondermark (alt tag already present) elseif (strpos($article['content'], 'imgs.xkcd.com/comics/') !== FALSE) { $img = preg_replace("@width=\"\d+\"@", "", $img); $img = $matches[1]; } } return $article; } function hook_render_article_cdm($article) { return $this->mangle_article($article); } function hook_render_article_cdm($article) { return $this->mangle_article($article); } catch (Exception $e) { $article['content'] = $this->get_img_tags($xpath, '//td/img[contains(@src, "/comics/images/")]', $article); } .

New Pull Request