Gossamer Forum
Home : Products : Gossamer Forum : Development, Plugins and Globals :

Re: [DoubleJJ] RSS / XML Output for Ten Most Recent Postings

Quote Reply
Re: [DoubleJJ] RSS / XML Output for Ten Most Recent Postings In reply to
--------------------------------------------------------------------
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

Smile
Subject Author Views Date
Thread RSS / XML Output for Ten Most Recent Postings DoubleJJ 32230 Nov 18, 2002, 2:56 PM
Thread Re: [DoubleJJ] RSS / XML Output for Ten Most Recent Postings
gotze 31927 Nov 22, 2002, 7:35 PM
Thread Re: [gotze] RSS / XML Output for Ten Most Recent Postings
DoubleJJ 31918 Nov 22, 2002, 9:33 PM
Thread Re: [DoubleJJ] RSS / XML Output for Ten Most Recent Postings
gotze 31978 Nov 23, 2002, 6:04 PM
Post Re: [gotze] RSS / XML Output - strip bad chars?
DoubleJJ 31806 Nov 24, 2002, 10:15 PM
Post Re: [gotze] RSS / XML Output for Ten Most Recent Postings
maxpico 31266 Apr 20, 2003, 7:54 AM
Thread Re: [DoubleJJ] RSS / XML Output for Ten Most Recent Postings
carfac 31662 Jan 8, 2003, 3:18 PM
Thread Re: [carfac] RSS / XML Output for Ten Most Recent Postings
DoubleJJ 31651 Jan 8, 2003, 6:28 PM
Thread Re: [DoubleJJ] RSS / XML Output for Ten Most Recent Postings
carfac 31807 Jan 9, 2003, 8:30 AM
Thread Re: [carfac] RSS / XML Output for Ten Most Recent Postings
DoubleJJ 31582 Jan 9, 2003, 8:42 AM
Post Re: [DoubleJJ] RSS / XML Output for Ten Most Recent Postings
carfac 31677 Jan 9, 2003, 9:09 AM
Post Re: [DoubleJJ] RSS / XML Output for Ten Most Recent Postings
balita 31486 Feb 4, 2003, 6:01 AM
Thread Re: [DoubleJJ] RSS / XML Output for Ten Most Recent Postings
klauslovgreen 31397 Apr 20, 2003, 8:04 AM
Thread Re: [klauslovgreen] RSS / XML Output for Ten Most Recent Postings
gotze 31243 Apr 20, 2003, 8:23 AM
Thread Re: [gotze] RSS / XML Output for Ten Most Recent Postings
klauslovgreen 31256 Apr 20, 2003, 8:29 AM
Thread Re: [klauslovgreen] RSS / XML Output for Ten Most Recent Postings
gotze 31245 Apr 20, 2003, 8:34 AM
Thread Re: [gotze] RSS / XML Output for Ten Most Recent Postings
discusswireless 29384 Jun 8, 2006, 1:27 PM
Thread Re: [discusswireless] RSS / XML Output for Ten Most Recent Postings
gotze 29386 Jun 8, 2006, 1:38 PM
Thread Re: [gotze] RSS / XML Output for Ten Most Recent Postings
discusswireless 29343 Jun 9, 2006, 8:40 AM
Thread Re: [discusswireless] RSS / XML Output for Ten Most Recent Postings
designgroup 10640 Sep 2, 2006, 11:42 PM
Post Re: [designgroup] RSS / XML Output for Ten Most Recent Postings
tandat 10603 Sep 5, 2006, 5:35 AM
Post Re: [discusswireless] RSS / XML Output for Ten Most Recent Postings
Andy 9924 May 13, 2009, 2:04 AM
Thread A RSS Feed that is Filtered
designgroup 10900 Jun 30, 2006, 7:29 PM
Thread Re: [designgroup] A RSS Feed that is Filtered
gotze 10838 Jul 1, 2006, 4:33 AM
Thread Re: [gotze] A RSS Feed that is Filtered
designgroup 10867 Jul 1, 2006, 11:18 AM
Thread Re: [designgroup] A RSS Feed that is Filtered
gotze 10905 Jul 1, 2006, 11:24 AM
Thread Re: [gotze] A RSS Feed that is Filtered
gotze 10860 Jul 1, 2006, 11:27 AM
Post Re: [gotze] A RSS Feed that is Filtered
designgroup 10800 Jul 1, 2006, 11:33 AM
Post Re: [gotze] A RSS Feed that is Filtered
webslicer 10690 Aug 16, 2006, 5:01 AM
Thread Re: [DoubleJJ] RSS / XML Output for Ten Most Recent Postings
carfac 31560 Feb 4, 2003, 10:06 AM
Thread Re: [carfac] RSS / XML Output for Ten Most Recent Postings
DoubleJJ 31538 Feb 4, 2003, 10:16 AM
Thread Re: [DoubleJJ] RSS / XML Output for Ten Most Recent Postings
carfac 31583 Feb 4, 2003, 10:51 AM
Thread Re: [carfac] RSS / XML Output for Ten Most Recent Postings
DoubleJJ 31539 Feb 4, 2003, 11:12 AM
Thread Re: [DoubleJJ] RSS / XML Output for Ten Most Recent Postings
carfac 31513 Feb 4, 2003, 12:04 PM
Post Re: [carfac] RSS / XML Output for Ten Most Recent Postings
maxpico 31449 Feb 20, 2003, 5:51 AM