$Id$
+Fri Jan 20 16:39:04 EST 2006 ajc
+* Started writing wiki code. It completely does not work. :)
+
Fri Jan 20 21:03:25 CET 2006 dothebart
* Started with doxygen style comments and doxygen config.
vcard.o vcard_edit.o preferences.o html2html.o listsub.o \
mime_parser.o graphics.o netconf.o siteconfig.o subst.o rss.o \
calendar.o calendar_tools.o calendar_view.o event.o \
- availability.o iconbar.o crypto.o inetconf.o notes.o \
+ availability.o iconbar.o crypto.o inetconf.o notes.o wiki.o \
groupdav_main.o groupdav_get.o groupdav_propfind.o fmt_date.o \
groupdav_options.o autocompletion.o gettext.o tabs.o \
groupdav_delete.o groupdav_put.o http_datestring.o setup_wizard.o \
roomops.o messages.o userlist.o paging.o sysmsgs.o useredit.o \
locate_host.o siteconfig.o subst.o vcard.o vcard_edit.o floors.o \
mime_parser.o graphics.o netconf.o preferences.o html2html.o rss.o \
- summary.o calendar.o calendar_tools.o calendar_view.o event.o \
+ summary.o calendar.o calendar_tools.o calendar_view.o event.o wiki.o \
availability.o ical_dezonify.o iconbar.o crypto.o inetconf.o notes.o \
groupdav_main.o groupdav_get.o groupdav_propfind.o groupdav_delete.o \
groupdav_options.o autocompletion.o tabs.o \
char *datesort_button;
int bbs_reverse = 0;
+ if (WC->wc_view == VIEW_WIKI) {
+ sprintf(buf, "wiki/%s/home", WC->wc_roomname);
+ http_redirect(buf);
+ return;
+ }
+
startmsg = atol(bstr("startmsg"));
maxmsgs = atoi(bstr("maxmsgs"));
is_summary = atoi(bstr("summary"));
print_message(arg1);
} else if (!strcasecmp(action, "msgheaders")) {
display_headers(arg1);
+ } else if (!strcasecmp(action, "wiki")) {
+ display_wiki_page(arg1, arg2);
} else if (!strcasecmp(action, "display_enter")) {
display_enter();
} else if (!strcasecmp(action, "post")) {
void tabbed_dialog(int num_tabs, char *tabnames[]);
void begin_tab(int tabnum, int num_tabs);
void end_tab(int tabnum, int num_tabs);
+void display_wiki_page(char *roomname, char *pagename);
void embed_room_banner(char *, int);
--- /dev/null
+/*
+ * $Id: $
+ */
+/**
+ *
+ * \defgroup Wiki Wiki; Functions pertaining to rooms with a wiki view
+ *
+ */
+
+/*@{*/
+#include "webcit.h"
+
+
+
+/**
+ * \brief Convert a string to something suitable as a wiki index
+ *
+ * \param s The string to be converted.
+ */
+void str_wiki_index(char *s)
+{
+ int i;
+
+ if (s == NULL) return;
+
+ /* First remove all non-alphanumeric characters */
+ for (i=0; i<strlen(s); ++i) {
+ if (!isalnum(s[i])) {
+ strcpy(&s[i], &s[i+1]);
+ }
+ }
+
+ /* Then make everything lower case */
+ for (i=0; i<strlen(s); ++i) {
+ s[i] = tolower(s[i]);
+ }
+}
+
+/**
+ * \brief Display a specific page from a wiki room
+ *
+ * \param roomname The name of the room containing the wiki
+ * \param pagename The index of the page being requested
+ */
+void display_wiki_page(char *roomname, char *pagename)
+{
+ output_headers(1, 1, 1, 0, 0, 0);
+
+ wprintf("roomname=%s<br>pagename=%s<br>\n", roomname, pagename);
+
+ wDumpContent(1);
+}
+
+
+/** @} */