--------------------------------------------------------------------
XML/RSS-feed from GT Forum - Release 1.0, 11-23-2002
--------------------------------------------------------------------
John Gotze,
john@slashdemocracy.org This is a simple hack to GT Forum which allows you to produce an XML/RSS-feed from your forum.
USAGE
The feed is called as a search query.
See it in action (if you have a RSS reader):
http://slashdemocracy.org/...&mh=15&t=xml t=xml is the key to getting XML from search queries. Should be possible to add to all search strings.
Using mh=5 means the feed will have a maximum of 15 items, for example.
INSTALLATION
STEP 1:
Use Fileman or FTP/Telnet.
Go to admin/templates and create a new template directory called /xml (or whatever you want).
Set permissions to 777.
STEP 2:
Create a file with the name .tplinfo and put it in the /xml directory.
The file must contain these three lines:
{
inheritance => '../default'
}
STEP 3:
Create a file with the name search_results.html and put it in the /xml directory.
The file must contain the XML template, like this:
--------copy below section into your new template---
<?xml version="1.0" encoding="ISO-8859-1" ?>
<rss version="0.91">
<channel>
<title><%site_title%></title>
<link>http://yoursite.com</link>
<description>Forum Feed ...</description>
<language>en-us</language>
<copyright>You</copyright>
<managingEditor>you@yoursite.com</managingEditor>
<webMaster>you@yoursite.com</webMaster>
<%set num_page_items = $num_results%>
<%loop results%>
<item>
<title><%post_subject%></title>
<link>http://yoursite.com/gforum.cgi?post=<%post_id%></link>
<description><%nbsp post_username%> in <%forum_name%> on <%post_date%></description>
</item>
<%endloop%>
</channel>
</rss>
---- end copy ---
That's it.
Read more about RSS on
http://slashdemocracy.org/.../XML/Syndication/RSS