-
[分享]使用Grazr製作線上RSS閱讀器
[URL="http://my-net.tw/weblog/read.php?124"]http://my-net.tw/weblog/read.php?124[/URL]
這和一般RSS閱讀器大同小異,比較特殊就是可以嵌入到網頁裡,
和Newsgator的相較之下,真的就只是一個RSS閱讀器,[separator]
因為沒辦法讓各個RSS單篇文章依照時間顯示,
只能依照分類和網站的RSS個別顯示,所以不適合拿來做聯播。
先到[url=http://www.grazr.com]Grazr[/url]首頁,點選Get Grazr For Your Page,
輸入設定你的OPML或RSS所在位址、欄位的高度和寬度、字型和字體大小,
設定完畢之後先點選See how it looks,可以看到輸出顯示結果,再點選Get the code/install,
可取得JS代碼,再複製到你要顯示的網頁裡。
[img]http://i1.tinypic.com/xd9xue.jpg[/img]
上面提到除了可以匯入單個RSS,也可以匯入OPML,各大RSS閱讀器大部份都可以輸出OPML,
亦可手動建立。在此建立一個簡單的OPML格式範例供大家參考:
[code]
<?xml version="1.0" encoding="utf-8"?>
<opml version="1.1">
<head>
<title>Feed Subscriptions</title>
<dateModified>Sun, 06 Jan 2002 18:19:34 GMT</dateModified>
</head>
<body>
<outline text="[Information]">
<outline text="Solidot" title="Solidot" type="rss" xmlUrl="[URL="http://feeds.feedburner.com/solidot"]http://feeds.feedburner.com/solidot[/URL]" htmlUrl="<A href="http://solidot.org"/">http://solidot.org"/>
<outline text="Vixual 網路視野" title="Vixual 網路視野" type="rss" xmlUrl="[URL="http://www.vixual.net/wikka/wikka.php?wakka=MainPage/rss2.xml"]http://www.vixual.net/wikka/wikka.php?wakka=MainPage/rss2.xml[/URL]" htmlUrl="<A href="http://www.vixual.net/wikka/wikka.php?wakka=MainPage"/">http://www.vixual.net/wikka/wikka.php?wakka=MainPage"/>
</outline>
<outline text="[Life]">
<outline text="我的世界.我的天" title="我的世界.我的天" type="rss" xmlUrl="[URL="http://feeds.feedburner.com/besthand"]http://feeds.feedburner.com/besthand[/URL]" htmlUrl="<A href="http://blog.onlyone.idv.tw"/">http://blog.onlyone.idv.tw"/>
<outline text="半透明天使" title="半透明天使" type="rss" xmlUrl="[URL="http://www.enovaweb.com/blog/feed.php"]http://www.enovaweb.com/blog/feed.php[/URL]" htmlUrl="<A href="http://www.enovaweb.com/blog"/">http://www.enovaweb.com/blog"/>
</outline>
</body>
</opml>
[/code]
outline text="[Life]"
為分類名稱
xmlUrl="[URL="http://feeds.feedburner.com/besthand"]http://feeds.feedburner.com/besthand[/URL]" htmlUrl="[URL="http://blog.onlyone.idv.tw"]http://blog.onlyone.idv.tw[/URL]"
xmlUrl為該網站的RSS,htmlUrl為該網站的網址
DEMO請看[url=http://link.my-net.tw]這裡[/url]。