3
1
Back

9f9f6acf76f746b4755da71c07bb656091774052 Mon Sep 17 00:00:00 2001 Subject: [PATCH] Updated LICD, alter alt-textify to handle both title and alt tags textified. If(ADD_IDS){ $article = $this->alt_textify($article); if (ADD_IDS) { $imgs = $xpath->query('//img'); $alt_text = trim($img->getAttribute('alt')); if (!$alt_text || $alt_text == $article['title'] || strpos($article['title'], $alt_text) !== False) { if (strpos($article['link'], 'eatthattoast.com/comic/') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//img[@class='comic']", $article); //also get blog $entries = $xpath->query("//div[@id='blarg']/div[last()]"); foreach ($entries as $entry) { $article['content'] .= "
ID: " . $img->getAttribute('title') . ""; } } // Joy of Tech // Joy of Tech $xpath = $this->get_xpath_dealie($article['link']); $img_tag = $this->get_img_tags($xpath, "//img[starts-with(@src, '/comics/') and @class='comic_image']", $article); // $article['content'] = $this->get_img_tags($xpath, "//div[@id='cc-comicbody']//img", $article); } // Breaking Cat News elseif (strpos($article['link'], 'somethingpositive.net') !== FALSE) { //no-op function rel2abs($rel, $base $path = preg_replace('#/[^/]*$#', '', $path); /* replace '//' or '/./' or '/foo/../' with '/' */ $re = array('#(/\.?/)#', '#/(?!\.\.)[^/]+/\.\./#'); for($n=1; $n>0; $abs=preg_replace($re, '/', $abs, -1, $n)) { } /* dirty absolute URL */ $abs = preg_replace($re, '/', $abs, -1, $n)) {} /* absolute URL is ready! */ return $scheme . '://' .

New Pull Request