From: Art Cancro Date: Wed, 8 Sep 2010 23:24:22 +0000 (-0400) Subject: Add the tag and some others to the RSS feeds. X-Git-Tag: v8.01~729 X-Git-Url: https://code.citadel.org/?a=commitdiff_plain;h=b870efab535fc46c630524a1c25d8eca6e3b874f;p=citadel.git Add the tag and some others to the RSS feeds. Also added some newlines to the feed because it was running words together. --- diff --git a/webcit/feed_generator.c b/webcit/feed_generator.c index 4daebf4d9..b1ca93252 100644 --- a/webcit/feed_generator.c +++ b/webcit/feed_generator.c @@ -43,6 +43,7 @@ void feed_rss_one_message(long msgnum) { while (serv_getln(buf, sizeof buf), strcmp(buf, "000")) { if (in_body) { escputs(buf); + wc_printf("\r\n"); } else if (!strncasecmp(buf, "subj=", 5)) { wc_printf(""); @@ -115,6 +116,7 @@ void feed_rss_do_messages(void) { * Entry point for RSS feed generator */ void feed_rss(void) { + char buf[1024]; output_headers(0, 0, 0, 1, 1, 0); hprintf("Content-type: text/xml\r\n"); @@ -139,15 +141,26 @@ void feed_rss(void) { urlescputs(ChrPtr(site_prefix)); wc_printf("</link>"); - // <language>en-us</language> - // <description>Linux Today News Service</description> - // <atom:link href="http://linuxtoday.com/biglt.rss" rel="self" type="application/rss+xml" /> + serv_puts("RINF"); + serv_getln(buf, sizeof buf); + if (buf[0] == '1') { + wc_printf("<description>\r\n"); + while (serv_getln(buf, sizeof buf), strcmp(buf, "000")) { + escputs(buf); + wc_printf("\r\n"); + } + wc_printf("</description>"); + } - // <image> - // <title>Linux Today - // http://linuxtoday.com/pics/ltnet.png - // http://linuxtoday.com - // + wc_printf(""); + escputs(ChrPtr(WC->CurRoom.name)); + wc_printf(""); + urlescputs(ChrPtr(site_prefix)); + wc_printf("/image?name=_roompic_?gotofirst="); + urlescputs(ChrPtr(WC->CurRoom.name)); + wc_printf(""); + urlescputs(ChrPtr(site_prefix)); + wc_printf("\r\n"); feed_rss_do_messages();