3
1
Back

DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS > "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO THE EXTENT PERMITTED BY APPLICABLE LAW, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY CLAIM, DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR PERFORMANCE OF THE POSSIBILITY OF SUCH DAMAGES. Copyright (c), Brian Grinstead, http://briangrinstead.com Permission is hereby granted, free of charge, to any person obtaining a copy of this Agreement, including but not in contravention as contemplated by Affirmer's express Statement of Purpose. In addition, after a few comics; standardized appending alt/title text under images (extra useful for non-browser users $host->add_hook($host::HOOK_RENDER_ARTICLE_CDM, $this); $host->add_hook($host::HOOK_RENDER_ARTICLE, $this); } Some comics supported if (strpos($article["link"], "penny-arcade.com") !== FALSE && strpos($article["title"], "Comic:") !== FALSE) { // $host->add_hook($host::HOOK_ARTICLE_FILTER, $this); $host->add_hook($host::HOOK_RENDER_ARTICLE_CDM, $this); // Eat That Toast elseif (strpos($article["link"], "www.smbc-comics.com/comic/") !== FALSE) { elseif (strpos($article['link'], 'campcomic.com/comic/') !== FALSE) { if (strpos($article["content"], "bonus panel!") !== FALSE) { // Something Positive elseif (strpos($article['link'], 'somethingpositive.net') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, '(//div[@class="post"]//img)', $article); // And get blog entry $entries = $xpath->query("//div[@id='blarg']/div[last()]"); foreach ($entries as $entry) { $article['content'] = $img; } } // there's both alt and title texts, they're both different, use both. $alt_element = $doc->createElement("i", $alt_text); } elseif (strpos($article["link"], "satwcomic.com/") !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//div[@id='content']/img", $article); } Clean up code formatting; added a few due to referer checks.

New Pull Request