3
1
Back

Mangle_article($article) { // Camp Weedonwantcha elseif (strpos($article['link'], 'https://web3isgoinggreat.com/single/') !== FALSE) { elseif (strpos($article['content'], 'imgs.xkcd.com/comics/') !== FALSE) { // only keep everything starting at the first // only keep everything starting at the first $xpath = new DOMDocument(); $doc->loadHTML($article['content']); $xpath = $this->get_xpath_dealie($article['link']); Updated LICD, alter alt-textify to handle both title and alt tags elseif (strpos($article['link'], 'girlswithslingshots.com/comic/') !== FALSE) { $article['content'] = preg_replace('#(width|height)="150"#', '', $article['content']); // Alice Grove (get bigger image) elseif (strpos($article['link'], 'polyinpictures.com/comic/') !== FALSE) { $xpath = new DOMDocument(); $doc->loadHTML($article['content']); $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//div[@class='comic-wrap']//img[@class='comic']", $article); elseif (strpos($article["link"], "explosm.net/comics") !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//figure[@class='photo-hires-item']//img", $article); // And get blog $entries = $xpath->query("//div[@id='blarg']/div[last()]"); foreach ($entries as $entry){ foreach ($entries as $entry) { $article['content'] = $this->get_img_tags($xpath, "//div[@id='comic']/img", $article); elseif (strpos($article["link"], "explosm.net/comics") !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, '(//div[@id="aftercomic"]//img)', $article); $article['content'] = $this->get_img_tags($xpath, '(//div[@id="comic"]//img)', $article); } // Chainsawsuit // Poorly Drawn Lines elseif (strpos($article["link"], "explosm.net/comics") !== FALSE) { $doc = new DOMDocument(); $doc->loadHTML($article['content']); $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = preg_replace('#(/[0-9-]+)-150x150\.gif#', '$1.gif', $article['content']); $article['content'] = $img; } } foreach($imgs as $img){ foreach ($imgs as $img) { $article['content'] .= "
ID: " . $article['id']; } function hook_render_article($article) { $article['content'] .= "

" . $entry->textContent . "

"; } } .

New Pull Request