3
1
Back

File return $article; } function rel2abs($rel, $base) { function about() { return $rel; } extract(parse_url($base)); $path = preg_replace('#/[^/]*$#', '', $path); if ($rel[0] == '#' || $rel[0] == '?') { return $base . $rel; } if (strpos($article['link'], 'eatthattoast.com/comic/') !== FALSE) { // $host->add_hook($host::HOOK_ARTICLE_FILTER, $this); // $host->add_hook($host::HOOK_ARTICLE_FILTER, $this); // Eat That Toast elseif (strpos($article["link"], "www.smbc-comics.com/comic/") !== FALSE) { $xpath = $this->get_xpath_dealie($bread_page_url); $extraimage = $xpath->query("//img[@class='extrapanelimage']")->item(0); //also get blog entry $entries = $xpath->query("//div[@id='blarg']/div[last()]"); foreach ($entries as $entry){ $orig_src = $entry->getAttribute('src'); $new_src = $this->rel2abs($orig_src, $article['link']); $entry->setAttribute('src', $new_src); $result_html .= $entry->ownerDocument->saveXML($entry); if (GDORN_DEBUG && $article['debugging']) { foreach ($article['debugging'] as $msg) { $article['content'] = $this->get_img_tags($xpath, "//div[@id='comic-img']//img", $article); } // Timothy Winchester (People I Know elseif (strpos($article['link'], 'www.timothywinchester.com/2') !== FALSE) { // there's an arrow shaped cutout in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT.

New Pull Request