Add Reply and Email links; and an RSS link in the header
authorMichael Hampton <io_error@uncensored.citadel.org>
Fri, 16 Sep 2005 01:20:00 +0000 (01:20 +0000)
committerMichael Hampton <io_error@uncensored.citadel.org>
Fri, 16 Sep 2005 01:20:00 +0000 (01:20 +0000)
webcit/ChangeLog
webcit/rss.c
webcit/static/xml_button.gif [new file with mode: 0644]
webcit/webcit.c

index 5d3aa491a4bc256efce77b709a231fe6c9df87ae..3846f9739bb34b886ccb8a8c58c43ce11bb1b660 100644 (file)
@@ -1,4 +1,7 @@
 $Log$
+Revision 625.3  2005/09/16 01:20:00  error
+Add Reply and Email links; and an RSS link in the header
+
 Revision 625.2  2005/09/15 21:29:42  ajc
 * Made the message list div slightly larger, the preview pane equally
   smaller, and stuck a separator bar in between them that will someday
@@ -2962,3 +2965,4 @@ Sun Dec  6 19:50:55 EST 1998 Art Cancro <ajc@uncnsrd.mt-kisco.ny.us>
 
 1998-12-03 Nathan Bryant <bryant@cs.usm.maine.edu>
        * webserver.c: warning fix
+
index c57708045fba66c81c3b6c822c2c6f9c77941cd5..88bbec2b4fdeadbfd5388dcd2f3255dba53f6c22 100644 (file)
 time_t if_modified_since;
 
 
+void display_rss_control(const char *reply_to, const char *subject)
+{
+       wprintf("<div style=\"align: right;\"><p>\n");
+       wprintf("<a href=\"/display_enter?recp=");
+       urlescputs(reply_to);
+       wprintf("&subject=");
+       if (strncasecmp(subject, "Re: ", 3)) wprintf("Re:%20");
+       urlescputs(subject);
+       wprintf("\">[%s]</a> \n", _("Reply"));
+       wprintf("<a href=\"/display_enter?recp=");
+       urlescputs(reply_to);
+       wprintf("&force_room=_MAIL_&subject=");
+       if (strncasecmp(subject, "Re: ", 3)) wprintf("Re:%20");
+       urlescputs(subject);
+       wprintf("\">[%s]</a>\n", _("Email"));
+       wprintf("</p></div>\n");
+}
+
+
 void display_rss(const char *roomname)
 {
        int nummsgs;
@@ -250,6 +269,7 @@ void display_rss(const char *roomname)
                                escputs(buf);
                                wprintf("\n");
                        }
+                       display_rss_control(from, subj);
                        wprintf("]]></description>\n");
                }
                /* Boring old 80-column fixed format text gets handled this way... */
@@ -289,6 +309,7 @@ void display_rss(const char *roomname)
                                escputs(buf);
                                wprintf("</tt><br />\n");
                        }
+                       display_rss_control(from, subj);
                        wprintf("]]></description>\n");
                }
                /* HTML is fun, but we've got to strip it first */
diff --git a/webcit/static/xml_button.gif b/webcit/static/xml_button.gif
new file mode 100644 (file)
index 0000000..e081da0
Binary files /dev/null and b/webcit/static/xml_button.gif differ
index 71d748f6c0a2f5212fa6270b1d931eda18c5d18b..b595b01c230e41c0fefe3c3793bdab1d93be05d5 100644 (file)
@@ -718,6 +718,11 @@ void offer_start_page(void) {
        wprintf("\"><FONT SIZE=-2 COLOR=\"#AAAAAA\">");
        wprintf(_("Make this my start page"));
        wprintf("</FONT></A>");
+       wprintf("<br/><a href=\"/rss?room=");
+       urlescputs(WC->wc_roomname);
+       wprintf("\" title=\"RSS 2.0 feed for ");
+       escputs(WC->wc_roomname);
+       wprintf("\"><img alt=\"RSS\" src=\"/static/xml_button.gif\"/></a>\n");
 }