Labels Milestones
Back5a4e89eea63bf71c8fd68e1168f096dfb3459aa4 More cleanup // $host->add_hook($host::HOOK_ARTICLE_FILTER, $this); function hook_render_article_cdm($article) { return $rel; } if ($rel[0] == '#' || $rel[0] == '?') { return $article; } function get_img_tags($xpath, $query, &$article, $base_url=NULL) { $img_attributes_whitelist = array('src', 'alt', 'title'); $new_src = $this->rel2abs($orig_src, $article['link']); $entry->setAttribute('src', $new_src); $result_html .= $entry->ownerDocument->saveXML($entry); Added BCN, Something Positive elseif (strpos($article['link'], 'questionablecontent') !== FALSE) { //also append the blarg post because that's small, interesting, $entries = $xpath->query("//div[@id='signoff-wrapper']"); } //Sites that provide images and just need alt tags elseif (strpos($article['link'], 'https://web3isgoinggreat.com/single/') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//div[@class='singleImage']/img[@class='magicfields']", $article); $article['content'] = $this->get_img_tags($xpath, "//div[@id='comicbody']//img", $article); } // Scenes From A Multiverse (to get alt tags if both exist elseif (strpos($article['link'], 'dilbert.com/strip/') !== FALSE) { if (preg_match("@.*(
New Pull Request