RSS 2.0

Bogdan Maryniuk <[email protected]>
Newsgroups gmane.comp.python.zope.coreblog.english
Message-ID <[email protected]>
Hello.

Mailing list dead?


Recently I needed RSS 2.0 so I'd like to leave it for the future in the
further releases if mr. Author not against it. :)


Recipe to have it in your instance
..................................

1. Go to your blog instance in ZMI.
2. Click "Contents" tab.
3. Add "DTML Method" from the components dropdown.
4. Save the DTML source below there.
5. Copy this DTML Method to the skin/default/
6. Add a link of your blog somewhere:

   <a href="<dtml-var blogurl>/rss20_xml">RSS 2.0</a>


Recipe to add it to the COREBlog entirely
.........................................


1. Create a file $PRODUCTS/COREBlog/dtml/rss20_xml.dtml
and save this content there:
------------------------------------------
<dtml-call "RESPONSE.setHeader('content-type', 'text/xml')"><?xml
version="1.0" encoding="<dtml-var management_page_charset>"?>
<rss version="2.0">
   <channel>
      <title><dtml-var title html_quote></title>
      <link><dtml-var blogurl></link>
      <description><dtml-var description></description>
      <pubDate><dtml-var bobobase_modification_time></pubDate>
      <lastBuildDate><dtml-var bobobase_modification_time></lastBuildDate>
      <docs><dtml-var blogurl>/rss20_xml</docs> 
      <generator><dtml-var description></generator>

      <dtml-in "rev_day_entry_items(count=top_days)">
      <item>
         <title><dtml-var title html_quote></title>
         <link><dtml-var blogurl>/<dtml-var id></link>
         <description><dtml-var subtitle></description>
         <guid><dtml-var blogurl>/<dtml-var id>#more</guid>
      </item>
      </dtml-in>
   </channel>
</rss>
------------------------------------------

2. Apply patch to $PRODUCTS/COREBlog/COREBlog.py file:
------------------------------------------
--- COREBlog.py-orig    2005-07-27 15:03:54.000000000 +0300
+++ COREBlog.py 2005-07-29 19:07:02.574580392 +0300
@@ -262,6 +262,7 @@
         addDTML(os.path.join(fullpath,"rdf10_xml.dtml"),"rdf10_xml","RDF 1.0",self)
         addDTML(os.path.join(fullpath,"rdf91_xml.dtml"),"rdf91_xml","RDF 0.91",self)
         addDTML(os.path.join(fullpath,"rsd_xml.dtml"),"rsd_xml","RSD 1.0",self)
+        addDTML(os.path.join(fullpath,"rss20_xml.dtml"),"rss20_xml","RSS 2.0",self)
 
         #bannar
         imagepath = os.path.join(package_home(globals()),"www/")
------------------------------------------

Have fun. :)

-- 
暮

Key emulation:
[ ] Intuitive
[*] Emacs        (Seen in an MCEdit dialog) 
_______________________________________________
COREblog-en mailing list
COREblog-en-/9qXvnWia/9Wk0Htik3J/[email protected]
http://postaria.com/cgi-bin/mailman/listinfo/coreblog-en
Unsubscription writing to coreblog-en-leave-/9qXvnWia/9Wk0Htik3J/[email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.