3
1
Back

Layout ttrss-plugin- _comics/init.php 483 lines From a3d4f2b82eccdd8d29ef9e5db4743697c1bc34dd Mon Sep 17 00:00:00 2001 Subject: [PATCH] edits README.md file again edits README.md file 4f6e9e0984 Updated LICD, alter alt-textify to handle both title and alt tags textified. } //Sites that provide images and just need alt tags textified. Elseif (strpos($article['content'], 'wondermark.com/c') !== FALSE) { $doc = new DOMXpath($doc); $bread = $xpath->query("//a[contains(@href, 'bonus-panel')]")->item(0); $bread_page_url = $bread->getAttribute('href'); $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//div[@id='cc-comicbody']//img", $article); } // Dinosaur Comics (alt tags+blog), CAD, attempt at OOTS (but that one fails due to referer checks Added BCN, Something Positive elseif (strpos($article['link'], 'girlswithslingshots.com/comic/') !== FALSE) { elseif (strpos($article['link'], 'www.timothywinchester.com/2') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, '(//div[@class="container"]//center//img)', $article); } // Dead Philosophers elseif (strpos($article['link'], 'cad-comic.com/cad/') !== FALSE) { // Breaking Cat News $entries = $xpath->query("//div[@id='comic-notes']"); foreach ($entries as $entry){ $article['content'] .= "
Alt: $alt_text
"; } } Pain Train alt tag, Alice Grove (get bigger image) // Alice Grove bigger img elseif (strpos($article['link'], 'cad-comic.com/cad/') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); elseif (strpos($article['link'], 'dilbert.com/strip/') !== FALSE) { $img = preg_replace("@width=\"\d+\"@", "", $img); $article['content'] .= "
Alt: " . $article['id']; $article = $this->alt_textify($article); if (GDORN_DEBUG && $article['debug']) { foreach ($article['debug'] as $msg) { if (strpos($article["content"], "bonus panel!") !== FALSE) { //noop $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $img; } } //Sites that provide images and just need alt tags textified. Function rel2abs($rel, $base $path = preg_replace('#/[^/]*$#', '', $path); if ($rel[0] == '#' || $rel[0] == '?') { return $this->mangle_article($article); } function get_xpath_dealie($link) { $abs = "$host$path/$rel"; function rel2abs($rel, $base) { Fix for when invisible bread has no bread function rel2abs($rel, $base) { if (strpos($article["content"], "bonus panel!") !== FALSE) { // CTRL+ALT+DEL // CTRL+ALT+DEL Sillies // CTRL+ALT+DEL Sillies elseif (strpos($article['link'], 'http://www.achewood.com/index.php?date=') !== FALSE) { $article['content'] = $this->get_img_tags($xpath, '(//div[@id="comic"]//img)', $article); } // Questionable Content (cleanup elseif (strpos($article['link'], 'somethingpositive.net') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, '//td/img[contains(@src, "/comics/images/")]', $article); $article['content'] .= "

New Pull Request