]> code.citadel.org Git - citadel.git/commitdiff
* Made the system semi-navigable in noframes mode.
authorArt Cancro <ajc@citadel.org>
Fri, 29 Jan 1999 04:14:25 +0000 (04:14 +0000)
committerArt Cancro <ajc@citadel.org>
Fri, 29 Jan 1999 04:14:25 +0000 (04:14 +0000)
webcit/ChangeLog
webcit/auth.c
webcit/roomops.c
webcit/static/frameset.html
webcit/webcit.c

index 3f3cb1f1679304cfe2e03a168102a53efd04be0f..8e8315f7e4faabb4950b835137440f2d918796ac 100644 (file)
@@ -1,6 +1,7 @@
 Thu Jan 28 20:30:08 EST 1999 Art Cancro <ajc@uncnsrd.mt-kisco.ny.us>
        * Made the frames stuff less dependent on the HTML TARGET= directive
          and more dependent on the HTTP Window-target: directive.
+       * Made the system semi-navigable in noframes mode.
 
 Sat Jan 23 19:36:10 EST 1999 Art Cancro <ajc@uncnsrd.mt-kisco.ny.us>
        * Brought over the new room listing code and <G>oto heuristics
index f07128787426fc60933c597f6afca2229c1d5e42..7a00800a02e51844601c213e5f60ea520955a193 100644 (file)
@@ -107,7 +107,10 @@ void do_login(void) {
        int need_regi = 0;
 
 
-       if (!strcasecmp(bstr("noframes"), "on")) noframes = 1;
+       if (!strcasecmp(bstr("noframes"), "on"))
+               noframes = 1;
+       else
+               noframes = 0;
 
        if (!strcasecmp(bstr("action"), "Exit")) {
                do_logout();
@@ -159,7 +162,7 @@ void do_login(void) {
                        display_reg(1);
                        }
                else {
-                       output_static("frameset.html");
+                       do_welcome();
                        }
                }
        else {
@@ -169,21 +172,28 @@ void do_login(void) {
        }
 
 void do_welcome(void) {
-       printf("HTTP/1.0 200 OK\n");
-       output_headers(1, "bottom");
-       wprintf("<CENTER><H1>");
-       escputs(wc_username);
-       wprintf("</H1>\n");
-       /* FIX add user stats here */
 
-       wprintf("<HR>");
-       /* FIX  ---  what should we put here?  the main menu,
-        * or new messages in the lobby?
-        */
-       embed_main_menu();
 
-       wprintf("</BODY></HTML>\n");
-       wDumpContent();
+       fprintf(stderr, "DO_WELCOME CALLED, NOFRAMES=%d\n", noframes);
+
+       if (noframes) {
+               printf("HTTP/1.0 200 OK\n");
+               output_headers(1, "_top");
+               wprintf("<CENTER><H1>");
+               escputs(wc_username);
+               wprintf("</H1>\n");
+               /* FIX add user stats here */
+       
+               wprintf("<HR>");
+               embed_main_menu();
+       
+               wprintf("</BODY></HTML>\n");
+               wDumpContent();
+               }
+
+       else {
+               output_static("frameset.html");
+               }
        }
 
 
@@ -376,7 +386,7 @@ void register_user(void) {
        serv_puts("000");
        
        if (atoi(bstr("during_login"))) {
-               output_static("frameset.html");
+               do_welcome();
                }
        else {
                display_error("Registration information has been saved.");
index 7ca1113d797c0f6c7bc635b01948378fd03e066b..7b1da7a04238dc373264fad532d3a1c33b26221e 100644 (file)
@@ -312,7 +312,8 @@ void gotoroom(char *gname, int display_name)
                wprintf("<HTML><HEAD></HEAD>\n<BODY ");
        
                /* automatically fire up a read-new-msgs in the bottom frame */
-               wprintf("onload=location=\"/readnew\" ");
+               if (!noframes)
+                       wprintf("onload=location=\"/readnew\" ");
 
                wprintf("BACKGROUND=\"/image&name=background\" TEXT=\"#000000\" LINK=\"#004400\">\n");
                }
@@ -388,6 +389,9 @@ void gotoroom(char *gname, int display_name)
                wprintf("<TD VALIGN=TOP><A HREF=\"/gotonext\">");
                wprintf("<IMG SRC=\"/static/forward.gif\" border=0></A></TD>");
                wprintf("</TR></TABLE></CENTER>\n");
+
+               if (noframes) embed_main_menu();
+
                wprintf("</BODY></HTML>\n");
                wDumpContent();
                }
index 83505d96fa43be95fc603f01a55acfcd4b1fac9e..ac10d753e0cabb848107e4eb64ad509133ce5e7f 100644 (file)
@@ -7,13 +7,13 @@
                <FRAME name="left" src="/static/menubar.html">
                <FRAMESET rows="15%, 80%">
                        <FRAME name="top" src="/dotgoto&room=_BASEROOM_">
-                       <FRAME name="bottom" src="/do_welcome">
+                       <FRAME name="bottom" src="/static/blankpage.html">
                </FRAMESET>
                <NOFRAMES>
                        Your browser doesn't support frames.<BR>
                        This site uses frames.<BR>
-                       Therefore, you cannot view this site.<BR>
-                       Perhaps you should telnet instead?<BR>
+                       Please log in again, and check the "do not use
+                       frames" option.<BR>
                </NOFRAMES>
        </FRAMESET>
 </HTML>
index b82dd2d81795e16dac28faee10cda97ce3792cd6..77ae51b6b865aab91bbc17cfc8683446fa005028 100644 (file)
@@ -440,6 +440,12 @@ void convenience_page(char *titlebarcolor, char *titlebarmsg, char *messagetext)
         wprintf("<B>%s</B>\n", titlebarmsg);
         wprintf("</FONT></TD></TR></TABLE><BR>\n");
        escputs(messagetext);
+       
+       if (noframes) {
+               wprintf("<HR>\n");
+               embed_main_menu();
+               }
+
         wprintf("</BODY></HTML>\n");
         wDumpContent();
        }