]> code.citadel.org Git - citadel.git/commitdiff
* do_template() now parses a .wml file for WAP clients, and a .html file
authorMichael Hampton <io_error@uncensored.citadel.org>
Sun, 12 May 2002 15:21:44 +0000 (15:21 +0000)
committerMichael Hampton <io_error@uncensored.citadel.org>
Sun, 12 May 2002 15:21:44 +0000 (15:21 +0000)
  for everybody else

webcit/ChangeLog
webcit/auth.c
webcit/mainmenu.c
webcit/messages.c
webcit/roomops.c
webcit/subst.c
webcit/webcit.c

index b89392e17dbd7822e4f374e53f1f8c6c2de945ac..0234da8cd576c7fa99d393c9d1e890e835800493 100644 (file)
@@ -1,4 +1,8 @@
 $Log$
+Revision 323.35  2002/05/12 15:21:43  error
+* do_template() now parses a .wml file for WAP clients, and a .html file
+  for everybody else
+
 Revision 323.34  2002/05/11 22:46:19  error
 * Track whether user-agent is a WAP gateway
 
@@ -818,4 +822,3 @@ 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 3871d938ce0633bbff556c00cf76f9d9b86e719d..bb863faf1ae93697ed4222cdb6b0cf8dd24ed5ca 100644 (file)
@@ -58,7 +58,7 @@ void display_login(char *mesg)
 
        svprintf("hello", WCS_SERVCMD, "MESG hello");
 
-       do_template("login.html");
+       do_template("login");
 
        clear_local_substs();
        wDumpContent(0);        /* No menu here; not logged in yet! */
index 3626b569266d98678908248ec2f50b6fb884ccb0..1b6c95800bbaee40a15554d095c76d27ed0e29bc 100644 (file)
@@ -306,10 +306,10 @@ void display_menubar(int as_single_page) {
                        "BODY   { text-decoration: none; }\n"
                        "</STYLE>\n"
                        "</HEAD>\n");
-               do_template("background.html");
+               do_template("background");
        }
 
-       do_template("menubar.html");
+       do_template("menubar");
 
        if (as_single_page) {
                wDumpContent(2);
index b360dc6bb1fcb3284b8f2b775a15056b2e064603..198cc4b58acd6df14fdcf2875f7f2521106408ad 100644 (file)
@@ -947,7 +947,7 @@ void display_enter(void)
                if (strlen(bstr("recp")) > 0) {
                        wprintf("<EM>%s</EM><BR>\n", &buf[4]);
                }
-               do_template("prompt_for_recipient.html");
+               do_template("prompt_for_recipient");
                goto DONE;
        }
        if (buf[0] != '2') {
index f2c072f3d6378c7a90dbcbb6ce4a29ef46b2d6f8..06c921049c49487c2486a2870fa20578032b36e0 100644 (file)
@@ -384,7 +384,7 @@ void embed_room_banner(char *got) {
        svcallback("YOUHAVEMAIL", embed_newmail_button);
        svcallback("VIEWOMATIC", embed_view_o_matic);
 
-       do_template("roombanner.html");
+       do_template("roombanner");
        clear_local_substs();
 }
 
@@ -416,7 +416,7 @@ void gotoroom(char *gname, int display_name)
                        "<META HTTP-EQUIV=\"expired\" CONTENT=\"28-May-1971 18:10:00 GMT\">\n"
                        "<meta name=\"MSSmartTagsPreventParsing\" content=\"TRUE\">\n"
                        "</HEAD>\n");
-               do_template("background.html");
+               do_template("background");
        }
        if (display_name != 2) {
                /* store ungoto information */
index 23d83386edc6e58a5fd62c72edcba74efe28b2eb..095e414a169769cff408e12d16ff40b2d68a877f 100644 (file)
@@ -155,6 +155,10 @@ void do_template(void *templatename) {
 
        strcpy(filename, "static/");
        strcat(filename, templatename);
+       if (WC->is_wap)
+               strcat(filename, ".wml");
+       else
+               strcat(filename, ".html");
        
        fp = fopen(filename, "r");
        if (fp == NULL) {
index 348018e6efa2463340553035f0f93a7ce286f17f..a65016329f606f8dee27c53bc2261a3dc0709f52 100644 (file)
@@ -354,7 +354,7 @@ void output_headers(int controlcode)
                                "onload=\"launch_page_popup()\" ");
                        WC->HaveExpressMessages = 0;
                }
-               do_template("background.html");
+               do_template("background");
                clear_local_substs();
 
        if (print_standard_html_head == 1) {