2004年06月04日

“RSS 1.0索引”模板修正  [ 分类:科技 Tech ]

  这两天埋头苦学社会经济统计,十分喜欢其中严格按照标准进行分门别类的感觉。在这本建国初期撰写的教科书中,作者似乎已经对“标准化”概念进行了细致的构想。
  让我们继续昨天的话题:RSS技术——资源接口标准化的经典案例。谓之“案例”,因为这不仅是技术上的成功尝试,更从人文角度推动了信息共享的进程。
  今天就RSS的应用作了更进一步的了解,把Movable Type的“RSS 1.0索引”模板进行了大幅修改。相对于mt的默认模板来说,这个模板增加了这些功能:
  1)换行。默认模板不会换行,所有的段落都是连在一起的,读起来很费劲。
  2)显示图片/ActiveX控件。原先这两项内容是被自动忽略的,不会显示出来。
  3)显示评论/引用。听从高人指点加上的模块,可是FeedDemon好像不支持。
  至于功能怎么实现的,请将以上模板和默认模板进行对比,本猪不再赘述。
  P.S.顺便把rememberwind、plex、fangfang、wanpihai的模板也给改了,真是新时代的活雷锋啊!
  点击“完整阅读”查看模板成品(其中作者和错误报告邮箱要改)。

--------------------------------------------
<?xml version="1.0" encoding="<$MTPublishCharset$>"?> 

<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
xmlns="http://purl.org/rss/1.0/"
xmlns:admin="http://webns.net/mvcb/"
xmlns:annotate="http://purl.org/rss/1.0/modules/annotate/"
xmlns:dcterms="http://purl.org/dc/terms/"
xmlns:cc="http://web.resource.org/cc/"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:foaf="http://xmlns.com/foaf/0.1/"
xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">

<channel rdf:about="<$MTBlogURL$>"> 
<title><$MTBlogName encode_xml="1"$></title>
<link><$MTBlogURL$></link>
<description><$MTBlogDescription encode_xml="1"$></description> 
<dc:language>zh-cn</dc:language> 
<dc:creator>Author's Name</dc:creator> 
<dc:date><MTEntries lastn="1"><$MTEntryDate language="en" format="%Y-%m-%dT%H:%M:%S"$><$MTBlogTimezone$></MTEntries></dc:date>

<admin:generatorAgent rdf:resource="http://www.movabletype.org/?v=<$MTVersion$>" />
<admin:errorReportsTo rdf:resource="mailto:your@email.com"/> 

<MTBlogIfCCLicense> 
<cc:license rdf:resource="<$MTBlogCCLicenseURL$>" /> 
</MTBlogIfCCLicense> 

<items> 
<rdf:Seq><MTEntries lastn="15"> 
<rdf:li rdf:resource="<$MTEntryPermalink encode_xml="1"$>" /> 
</MTEntries></rdf:Seq>
</items> 

</channel> 

<MTEntries lastn="15"> 
<item rdf:about="<$MTEntryPermalink encode_xml="1"$>"> 
<title><$MTEntryTitle encode_xml="1"$></title>
<link><$MTEntryPermalink encode_xml="1"$></link>
<p><$MTEntryPermalink encode_xml="1"$> 
<description><$MTEntryExcerpt encode_xml="1"$></description> 
<dc:subject><$MTEntryCategory encode_xml="1"$></dc:subject> 
<dc:creator><$MTEntryAuthor encode_xml="1"$></dc:creator> 
<dc:date><$MTEntryDate format="%Y-%m-%dT%H:%M:%S" language="en"$><$MTBlogTimezone$></dc:date>
<content:encoded><$MTEntryBody encode_xml="1"$><$MTEntryMore encode_xml="1"$></content:encoded>

<MTEntryIfAllowComments> 
<annotate:reference rdf:resource="<$MTEntryPermalink encode_xml="1"$>" /> 
<MTComments>
<dc:contributor> 
<foaf:person foaf:name="<MTCommentAuthor encode_xml="1">"> 
<foaf:homepage rdf:resource="<MTCommentURL encode_xml="1">" /> 
<foaf:email rdf:resource="<$MTCommentEmail encode_xml="1"$>" /> 
</foaf:person>
</dc:contributor> 
</MTComments> 
</MTEntryIfAllowComments> 

<MTPingsSent> 
<trackback:about rdf:resource="<$MTPingsSentURL encode_xml="1"$>"/> 
</MTPingsSent>

<MTEntryIfAllowPings> 
<trackback:ping rdf:resource="<MTEntryTrackbackLink encode_xml="1">"/> 
<MTPings>
<dcterms:isReferencedBy rdf:resource="<$MTPingURL encode_xml="1"$>" /> 
</MTPings>
</MTEntryIfAllowPings> 
</item> 
</MTEntries> 
</rdf:RDF>
--------------------------------------------

由 flypig 发表于 2004年06月04日 22:32
本文Trackback地址
http://www.flypig.org/mt3/mt-tbtbtb.cgi/15.
引用 Trackbacks

 

评论 Comments

谢谢雷锋同志 :D
挑点骨头:
在那一段中,多了个没有结束的。
似乎还有不规范的地方,因为在feedburn中不能烧录。

woody 发表于 2005年05月25日 17:23
发表评论









记住我的信息?