]> git.wh0rd.org - tt-rss.git/blobdiff - plugins/af_comics/init.php
Updated af_comics GoComics handling to support comics with numbers and use the main...
[tt-rss.git] / plugins / af_comics / init.php
index 09e9033794875c1f7ce3b60b58c24ebcb08809df..54054399ef63271af6a76c2466b1f80daa64f882 100644 (file)
@@ -65,7 +65,7 @@ class Af_Comics extends Plugin {
                }
                print "</ul>";
 
-               print "<p>".__('GoComics requires a specific URL to workaround their lack of feed support: <code>http://feeds.feedburner.com/uclick/<em>comic_name</em></code> (e.g. <code>http://www.gocomics.com/garfield</code> uses <code>http://feeds.feedburner.com/uclick/garfield</code>).')."</p>";
+               print "<p>".__("To subscribe to GoComics use the comic's regular web page as the feed URL (e.g. for the <em>Garfield</em> comic use <code>http://www.gocomics.com/garfield</code>).")."</p>";
 
                print "<p>".__('Drop any updated filters into <code>filters.local</code> in plugin directory.')."</p>";
 
@@ -89,7 +89,7 @@ class Af_Comics extends Plugin {
                if ($auth_login || $auth_pass)
                        return $feed_data;
 
-               if (preg_match('#^https?://feeds.feedburner.com/uclick/([-a-z]+)#', $fetch_url, $comic)) {
+               if (preg_match('#^https?://(?:feeds\.feedburner\.com/uclick|www\.gocomics\.com)/([-a-z0-9]+)$#i', $fetch_url, $comic)) {
                        $site_url = 'http://www.gocomics.com/' . $comic[1];
 
                        $article_link = $site_url . date('/Y/m/d');
@@ -127,7 +127,7 @@ class Af_Comics extends Plugin {
                                                $tpl->setVariable('ARTICLE_LINK', $article_link, true);
                                                $tpl->setVariable('ARTICLE_TITLE', date('l, F d, Y'), true);
                                                $tpl->setVariable('ARTICLE_EXCERPT', '', true);
-                                               $tpl->setVariable('ARTICLE_CONTENT', $doc->saveXML($node), true);
+                                               $tpl->setVariable('ARTICLE_CONTENT', $doc->saveHTML($node), true);
 
                                                $tpl->setVariable('ARTICLE_AUTHOR', '', true);
                                                $tpl->setVariable('ARTICLE_SOURCE_LINK', $site_url, true);
@@ -153,4 +153,4 @@ class Af_Comics extends Plugin {
                return 2;
        }
 
-}
\ No newline at end of file
+}