From 0f89947a2fdbf186228acb81b2355d86365adf82 Mon Sep 17 00:00:00 2001 From: Art Cancro Date: Fri, 20 Jan 2006 21:39:28 +0000 Subject: [PATCH] * Started writing wiki code. It completely does not work. :) --- webcit/ChangeLog | 3 +++ webcit/Makefile.in | 4 ++-- webcit/messages.c | 6 +++++ webcit/webcit.c | 2 ++ webcit/webcit.h | 1 + webcit/wiki.c | 55 ++++++++++++++++++++++++++++++++++++++++++++++ 6 files changed, 69 insertions(+), 2 deletions(-) create mode 100644 webcit/wiki.c diff --git a/webcit/ChangeLog b/webcit/ChangeLog index 9e48525ef..e21c168c6 100644 --- a/webcit/ChangeLog +++ b/webcit/ChangeLog @@ -1,5 +1,8 @@ $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. diff --git a/webcit/Makefile.in b/webcit/Makefile.in index b6cdbaa6d..d5508a6bf 100644 --- a/webcit/Makefile.in +++ b/webcit/Makefile.in @@ -46,7 +46,7 @@ webserver: webserver.o context_loop.o tools.o ical_dezonify.o \ 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 \ @@ -56,7 +56,7 @@ webserver: webserver.o context_loop.o tools.o ical_dezonify.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 \ diff --git a/webcit/messages.c b/webcit/messages.c index 4bde21073..0009f6b9c 100644 --- a/webcit/messages.c +++ b/webcit/messages.c @@ -1860,6 +1860,12 @@ void readloop(char *oper) 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")); diff --git a/webcit/webcit.c b/webcit/webcit.c index 7220a5d7e..b702b3f62 100644 --- a/webcit/webcit.c +++ b/webcit/webcit.c @@ -1327,6 +1327,8 @@ void session_loop(struct httprequest *req) 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")) { diff --git a/webcit/webcit.h b/webcit/webcit.h index d7708f68f..06f1b820b 100644 --- a/webcit/webcit.h +++ b/webcit/webcit.h @@ -658,6 +658,7 @@ void httplang_to_locale(char *LocaleString); 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); diff --git a/webcit/wiki.c b/webcit/wiki.c new file mode 100644 index 000000000..dc72dba05 --- /dev/null +++ b/webcit/wiki.c @@ -0,0 +1,55 @@ +/* + * $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; ipagename=%s
\n", roomname, pagename); + + wDumpContent(1); +} + + +/** @} */ -- 2.30.2