* link the entroom template, remove the function
authorWilfried Göesgens <willi@citadel.org>
Fri, 13 Aug 2010 15:54:01 +0000 (15:54 +0000)
committerWilfried Göesgens <willi@citadel.org>
Fri, 13 Aug 2010 15:54:01 +0000 (15:54 +0000)
webcit/roomops.c
webcit/static/t/menu/advanced_roomcommands.html

index 8e05a246888ee36337451054c4e8ae3cdc2a2a37..d54e00ebace6ece4c7f02f3f928c49332f45fd71 100644 (file)
@@ -2434,164 +2434,6 @@ void display_whok(void)
         wDumpContent(1);
 }
 
-
-
-/*
- * display the form for entering a new room
- */
-void display_entroom(void)
-{
-       StrBuf *Buf;
-       int i;
-       char buf[SIZ];
-
-       Buf = NewStrBuf();
-       serv_puts("CRE8 0");
-       serv_getln(buf, sizeof buf);
-
-       if (buf[0] != '2') {
-               strcpy(WC->ImportantMessage, &buf[4]);
-               display_main_menu();
-               FreeStrBuf(&Buf);
-               return;
-       }
-
-       output_headers(1, 1, 1, 0, 0, 0);
-
-       svprintf(HKEY("BOXTITLE"), WCS_STRING, _("Create a new room"));
-       do_template("beginbox", NULL);
-
-       wc_printf("<form name=\"create_room_form\" method=\"POST\" action=\"entroom\">\n");
-       wc_printf("<input type=\"hidden\" name=\"nonce\" value=\"%d\">\n", WC->nonce);
-
-       wc_printf("<table class=\"altern\"> ");
-
-       wc_printf("<tr class=\"even\"><td>");
-       wc_printf(_("Name of room: "));
-       wc_printf("</td><td>");
-       wc_printf("<input type=\"text\" NAME=\"er_name\" MAXLENGTH=\"127\">\n");
-        wc_printf("</td></tr>");
-
-       wc_printf("<tr class=\"odd\"><td>");
-       wc_printf(_("Resides on floor: "));
-       wc_printf("</td><td>");
-//        load_floorlist(Buf); 
-        wc_printf("<select name=\"er_floor\" size=\"1\">\n");
-        for (i = 0; i < 128; ++i)
-                if (!IsEmptyStr(floorlist[i])) {
-                        wc_printf("<option ");
-                        wc_printf("value=\"%d\">", i);
-                        escputs(floorlist[i]);
-                        wc_printf("</option>\n");
-                }
-        wc_printf("</select>\n");
-        wc_printf("</td></tr>");
-
-       /*
-        * Our clever little snippet of JavaScript automatically selects
-        * a public room if the view is set to Bulletin Board or wiki, and
-        * it selects a mailbox room otherwise.  The user can override this,
-        * of course.  We also disable the floor selector for mailboxes.
-        */
-       wc_printf("<tr class=\"even\"><td>");
-       wc_printf(_("Default view for room: "));
-       wc_printf("</td><td>");
-        wc_printf("<select name=\"er_view\" size=\"1\" OnChange=\""
-               "       if ( (this.form.er_view.value == 0)             "
-               "          || (this.form.er_view.value == 6) ) {        "
-               "               this.form.type[0].checked=true;         "
-               "               this.form.er_floor.disabled = false;    "
-               "       }                                               "
-               "       else {                                          "
-               "               this.form.type[4].checked=true;         "
-               "               this.form.er_floor.disabled = true;     "
-               "       }                                               "
-               "\">\n");
-       for (i=0; i<(sizeof viewdefs / sizeof (char *)); ++i) {
-/*
-               if (is_view_allowed_as_default(i)) {
-                       wc_printf("<option %s value=\"%d\">",
-                               ((i == 0) ? "selected" : ""), i );
-                       escputs(viewdefs[i]);
-                       wc_printf("</option>\n");
-               }
-*/
-       }
-       wc_printf("</select>\n");
-       wc_printf("</td></tr>");
-
-       wc_printf("<tr class=\"even\"><td>");
-       wc_printf(_("Type of room:"));
-       wc_printf("</td><td>");
-       wc_printf("<ul class=\"adminlist\">\n");
-
-       wc_printf("<li><input type=\"radio\" NAME=\"type\" VALUE=\"public\" ");
-       wc_printf("CHECKED OnChange=\""
-               "       if (this.form.type[0].checked == true) {        "
-               "               this.form.er_floor.disabled = false;    "
-               "       }                                               "
-               "\"> ");
-       wc_printf(_("Public (automatically appears to everyone)"));
-       wc_printf("</li>");
-
-       wc_printf("\n<li><input type=\"radio\" NAME=\"type\" VALUE=\"hidden\" OnChange=\""
-               "       if (this.form.type[1].checked == true) {        "
-               "               this.form.er_floor.disabled = false;    "
-               "       }                                               "
-               "\"> ");
-       wc_printf(_("Private - hidden (accessible to anyone who knows its name)"));
-       wc_printf("</li>");
-
-       wc_printf("\n<li><input type=\"radio\" NAME=\"type\" VALUE=\"passworded\" OnChange=\""
-               "       if (this.form.type[2].checked == true) {        "
-               "               this.form.er_floor.disabled = false;    "
-               "       }                                               "
-               "\"> ");
-       wc_printf(_("Private - require password: "));
-       wc_printf("<input type=\"text\" NAME=\"er_password\" MAXLENGTH=\"9\">\n");
-       wc_printf("</li>");
-
-       wc_printf("<li><input type=\"radio\" NAME=\"type\" VALUE=\"invonly\" OnChange=\""
-               "       if (this.form.type[3].checked == true) {        "
-               "               this.form.er_floor.disabled = false;    "
-               "       }                                               "
-               "\"> ");
-       wc_printf(_("Private - invitation only"));
-       wc_printf("</li>");
-
-       wc_printf("\n<li><input type=\"radio\" NAME=\"type\" VALUE=\"personal\" "
-               "OnChange=\""
-               "       if (this.form.type[4].checked == true) {        "
-               "               this.form.er_floor.disabled = true;     "
-               "       }                                               "
-               "\"> ");
-       wc_printf(_("Personal (mailbox for you only)"));
-       wc_printf("</li>");
-
-       wc_printf("\n</ul>\n");
-       wc_printf("</td></tr></table>\n");
-
-       wc_printf("<div class=\"buttons\">\n");
-       wc_printf("<input type=\"submit\" name=\"ok_button\" value=\"%s\">", _("Create new room"));
-       wc_printf("&nbsp;");
-       wc_printf("<input type=\"submit\" name=\"cancel_button\" value=\"%s\">", _("Cancel"));
-       wc_printf("</div>\n");
-       wc_printf("</form>\n<hr />");
-       serv_printf("MESG roomaccess");
-       serv_getln(buf, sizeof buf);
-       if (buf[0] == '1') {
-               fmout("LEFT");
-       }
-
-       do_template("endbox", NULL);
-
-       wDumpContent(1);
-       FreeStrBuf(&Buf);
-}
-
-
-
-
 /*
  * support function for entroom() -- sets the default view 
  */
@@ -3286,7 +3128,6 @@ InitModule_ROOMOPS
 
        WebcitAddUrlHandler(HKEY("goto_private"), "", 0, goto_private, NEED_URL);
        WebcitAddUrlHandler(HKEY("zap"), "", 0, zap, 0);
-       WebcitAddUrlHandler(HKEY("display_entroom"), "", 0, display_entroom, 0);
        WebcitAddUrlHandler(HKEY("entroom"), "", 0, entroom, 0);
        WebcitAddUrlHandler(HKEY("display_whok"), "", 0, display_whok, 0);
        WebcitAddUrlHandler(HKEY("do_invt_kick"), "", 0, do_invt_kick, 0);
index 676aa20a4310ee4e8cc856468b6892abc867fe8d..ca6e1006f2601281e014b3c21d38a5737c5730e9 100644 (file)
@@ -4,7 +4,7 @@
 <li><a href="display_editroom">(old)<?_("Edit or delete this room")></a></li>
 <?!("X", 1)>
 <li><a href="do_template?template=room_display_private"><?_("Go to a 'hidden' room")></a></li>
-<li><a href="display_entroom"><?_("Create a new room")></a></li>
+<li><a href="do_template?template=room_create"><?_("Create a new room")></a></li>
 <li><a href="do_template?template=room_zap_this"><?_("Zap (forget) this room")></a></li>
 <li><a href="do_template?template=room_zapped_list"><?_("List all forgotten rooms")></a></li>
 </ul>