* the navbar style isn't used, remove it.
[citadel.git] / webcit / roomops.c
index f1488411e1745c5c48c6e9b6a9acff626d972d71..1b7925641687d237af1800472de2a4442dabd250 100644 (file)
@@ -247,46 +247,6 @@ void zapped_list(void)
        wDumpContent(1);
 }
 
-/*
- * Display the current view and offer an option to change it
- */
-void embed_view_o_matic(StrBuf *Target, WCTemplputParams *TP)
-{
-       int i;
-
-       wc_printf("<form name=\"viewomatic\" action=\"changeview\">\n");
-       wc_printf("\t<div style=\"display: inline;\">\n\t<input type=\"hidden\" name=\"nonce\" value=\"%d\">\n", WC->nonce);
-       wc_printf("<label for=\"view_name\">");
-       wc_printf(_("View as:"));
-       wc_printf("</label> "
-               "<select name=\"newview\" size=\"1\" "
-               "id=\"view_name\" class=\"selectbox\" "
-               "OnChange=\"location.href=viewomatic.newview.options"
-               "[selectedIndex].value\">\n");
-
-       for (i=0; i<(sizeof viewdefs / sizeof (char *)); ++i) {
-               /*
-                * Only offer the views that make sense, given the default
-                * view for the room.  For example, don't offer a Calendar
-                * view in a non-Calendar room.
-                */
-               if (
-                       (i == WC->CurRoom.view)
-                       ||      (i == WC->CurRoom.defview)                      /* default */
-                       ||      ( (i == 0) && (WC->CurRoom.defview == 1) )      /* mail or bulletin */
-                       ||      ( (i == 1) && (WC->CurRoom.defview == 0) )      /* mail or bulletin */
-                       /* ||   ( (i == 7) && (WC->CurRoom.defview == 3) )      (calendar list temporarily disabled) */
-                       ) {
-
-                       wc_printf("<option %s value=\"changeview?view=%d\">",
-                               ((i == WC->CurRoom.view) ? "selected" : ""),
-                               i );
-                       escputs(viewdefs[i]);
-                       wc_printf("</option>\n");
-               }
-       }
-       wc_printf("</select></div></form>\n");
-}
 
 
 
@@ -298,13 +258,11 @@ void embed_view_o_matic(StrBuf *Target, WCTemplputParams *TP)
  *
  */
 
-void embed_room_banner(char *got, int navbar_style) {
+void embed_room_banner(char *got) 
+{
        wcsession *WCC = WC;
        char buf[256];
-       char buf2[1024];
-       char with_files[256];
-       int file_count=0;
-       
+                               
        /*
         * We need to have the information returned by a GOTO server command.
         * If it isn't supplied, we fake it by issuing our own GOTO.
@@ -322,7 +280,7 @@ void embed_room_banner(char *got, int navbar_style) {
                  "     room_is_trash = %d;             \n"
                  "</script>\n",
                  ((WC->CurRoom.RAFlags & UA_ISTRASH) != 0)
-       );
+               );
 
        /*
         * If the user happens to select the "make this my start page" link,
@@ -335,42 +293,19 @@ void embed_room_banner(char *got, int navbar_style) {
        StrBufPrintf(WCC->Hdr->this_page, 
                     "dotskip?room=%s",
                     ChrPtr(WC->CurRoom.name)
-       );
+               );
 
        /* Check for new mail. */
        WC->new_mail = extract_int(&got[4], 9);
        WC->CurRoom.view = extract_int(&got[4], 11);
 
-       /* Is this a directory room and does it contain files and how many? */
-       if ((WC->CurRoom.QRFlags & QR_DIRECTORY) && (WC->CurRoom.QRFlags & QR_VISDIR))
-       {
-               serv_puts("RDIR");
-               serv_getln(buf2, sizeof buf2);
-               if (buf2[0] == '1') while (serv_getln(buf2, sizeof buf2), strcmp(buf2, "000"))
-                                           file_count++;
-               snprintf (with_files, sizeof with_files, 
-                         "; <a href=\"do_template?template=files\"> %d %s </a>", 
-                         file_count, 
-                         ((file_count>1) || (file_count == 0)  ? _("files") : _("file")));
-       }
-       else
-               strcpy (with_files, "");
-       
-       svprintf(HKEY("NUMMSGS"), WCS_STRING,
-                _("%d new of %d messages%s"),
-                extract_int(&got[4], 1),
-                extract_int(&got[4], 2),
-                with_files
-               );
-       svcallback("VIEWOMATIC", embed_view_o_matic); 
        do_template("roombanner", NULL);
        /* roombanner contains this for mobile */
-       if (navbar_style != navbar_none && (WC->is_mobile < 1)) { 
+       if (WC->is_mobile < 1) { 
 
                wc_printf("<div id=\"navbar\"><ul>");
 
-               if (navbar_style == navbar_default) wc_printf(
+               wc_printf(
                        "<li class=\"ungoto\">"
                        "<a href=\"ungoto\">"
                        "<img src=\"static/ungoto2_24x.gif\" alt=\"\" width=\"24\" height=\"24\">"
@@ -378,7 +313,7 @@ void embed_room_banner(char *got, int navbar_style) {
                        "</li>\n", _("Ungoto")
                        );
 
-               if ( (navbar_style == navbar_default) && (WC->CurRoom.view == VIEW_BBS) ) {
+               if (WC->CurRoom.view == VIEW_BBS) {
                        wc_printf(
                                "<li class=\"newmess\">"
                                "<a href=\"readnew\">"
@@ -388,232 +323,228 @@ void embed_room_banner(char *got, int navbar_style) {
                                );
                }
 
-               if (navbar_style == navbar_default) {
-                       switch(WC->CurRoom.view) {
-                       case VIEW_ADDRESSBOOK:
-                               wc_printf(
-                                       "<li class=\"viewcontacts\">"
-                                       "<a href=\"readfwd\">"
-                                       "<img src=\"static/viewcontacts_24x.gif\" "
-                                       "alt=\"\" width=\"24\" height=\"24\">"
-                                       "<span class=\"navbar_link\">"
-                                       "%s"
-                                       "</span></a></li>\n", _("View contacts")
-                                       );
-                               break;
-                       case VIEW_CALENDAR:
-                               wc_printf(
-                                       "<li class=\"staskday\">"
-                                       "<a href=\"readfwd?calview=day\">"
-                                       "<img src=\"static/taskday2_24x.gif\" "
-                                       "alt=\"\" width=\"24\" height=\"24\">"
-                                       "<span class=\"navbar_link\">"
-                                       "%s"
-                                       "</span></a></li>\n", _("Day view")
-                                       );
-                               wc_printf(
-                                       "<li class=\"monthview\">"
-                                       "<a href=\"readfwd?calview=month\">"
-                                       "<img src=\"static/monthview2_24x.gif\" "
-                                       "alt=\"\" width=\"24\" height=\"24\">"
-                                       "<span class=\"navbar_link\">"
-                                       "%s"
-                                       "</span></a></li>\n", _("Month view")
-                                       );
-                               break;
-                       case VIEW_CALBRIEF:
-                               wc_printf(
-                                       "<li class=\"monthview\">"
-                                       "<a href=\"readfwd?calview=month\">"
-                                       "<img src=\"static/monthview2_24x.gif\" "
-                                       "alt=\"\" width=\"24\" height=\"24\">"
-                                       "<span class=\"navbar_link\">"
-                                       "%s"
-                                       "</span></a></li>\n", _("Calendar list")
-                                       );
-                               break;
-                       case VIEW_TASKS:
-                               wc_printf(
-                                       "<li class=\"taskmanag\">"
-                                       "<a href=\"readfwd\">"
-                                       "<img src=\"static/taskmanag_24x.gif\" "
-                                       "alt=\"\" width=\"24\" height=\"24\">"
-                                       "<span class=\"navbar_link\">"
-                                       "%s"
-                                       "</span></a></li>\n", _("View tasks")
-                                       );
-                               break;
-                       case VIEW_NOTES:
-                               wc_printf(
-                                       "<li class=\"viewnotes\">"
-                                       "<a href=\"readfwd\">"
-                                       "<img src=\"static/viewnotes_24x.gif\" "
-                                       "alt=\"\" width=\"24\" height=\"24\">"
-                                       "<span class=\"navbar_link\">"
-                                       "%s"
-                                       "</span></a></li>\n", _("View notes")
-                                       );
-                               break;
-                       case VIEW_MAILBOX:
-                               wc_printf(
-                                       "<li class=\"readallmess\">"
-                                       "<a id=\"m_refresh\" href=\"readfwd\">"
-                                       "<img src=\"static/readallmess3_24x.gif\" "
-                                       "alt=\"\" width=\"24\" height=\"24\">"
-                                       "<span class=\"navbar_link\">"
-                                       "%s"
-                                       "</span></a></li>\n", _("Refresh message list")
-                                       );
-                               break;
-                       case VIEW_WIKI:
-                               wc_printf(
-                                       "<li class=\"readallmess\">"
-                                       "<a href=\"wiki?page=home\">"
-                                       "<img src=\"static/readallmess3_24x.gif\" "
-                                       "alt=\"\" width=\"24\" height=\"24\">"
-                                       "<span class=\"navbar_link\">"
-                                       "%s"
-                                       "</span></a></li>\n", _("Wiki home")
-                                       );
-                               break;
-                       default:
-                               wc_printf(
-                                       "<li class=\"readallmess\">"
-                                       "<a href=\"readfwd\">"
-                                       "<img src=\"static/readallmess3_24x.gif\" "
-                                       "alt=\"\" width=\"24\" height=\"24\">"
-                                       "<span class=\"navbar_link\">"
-                                       "%s"
-                                       "</span></a></li>\n", _("Read all messages")
-                                       );
-                               break;
-                       }
+               switch(WC->CurRoom.view) {
+               case VIEW_ADDRESSBOOK:
+                       wc_printf(
+                               "<li class=\"viewcontacts\">"
+                               "<a href=\"readfwd\">"
+                               "<img src=\"static/viewcontacts_24x.gif\" "
+                               "alt=\"\" width=\"24\" height=\"24\">"
+                               "<span class=\"navbar_link\">"
+                               "%s"
+                               "</span></a></li>\n", _("View contacts")
+                               );
+                       break;
+               case VIEW_CALENDAR:
+                       wc_printf(
+                               "<li class=\"staskday\">"
+                               "<a href=\"readfwd?calview=day\">"
+                               "<img src=\"static/taskday2_24x.gif\" "
+                               "alt=\"\" width=\"24\" height=\"24\">"
+                               "<span class=\"navbar_link\">"
+                               "%s"
+                               "</span></a></li>\n", _("Day view")
+                               );
+                       wc_printf(
+                               "<li class=\"monthview\">"
+                               "<a href=\"readfwd?calview=month\">"
+                               "<img src=\"static/monthview2_24x.gif\" "
+                               "alt=\"\" width=\"24\" height=\"24\">"
+                               "<span class=\"navbar_link\">"
+                               "%s"
+                               "</span></a></li>\n", _("Month view")
+                               );
+                       break;
+               case VIEW_CALBRIEF:
+                       wc_printf(
+                               "<li class=\"monthview\">"
+                               "<a href=\"readfwd?calview=month\">"
+                               "<img src=\"static/monthview2_24x.gif\" "
+                               "alt=\"\" width=\"24\" height=\"24\">"
+                               "<span class=\"navbar_link\">"
+                               "%s"
+                               "</span></a></li>\n", _("Calendar list")
+                               );
+                       break;
+               case VIEW_TASKS:
+                       wc_printf(
+                               "<li class=\"taskmanag\">"
+                               "<a href=\"readfwd\">"
+                               "<img src=\"static/taskmanag_24x.gif\" "
+                               "alt=\"\" width=\"24\" height=\"24\">"
+                               "<span class=\"navbar_link\">"
+                               "%s"
+                               "</span></a></li>\n", _("View tasks")
+                               );
+                       break;
+               case VIEW_NOTES:
+                       wc_printf(
+                               "<li class=\"viewnotes\">"
+                               "<a href=\"readfwd\">"
+                               "<img src=\"static/viewnotes_24x.gif\" "
+                               "alt=\"\" width=\"24\" height=\"24\">"
+                               "<span class=\"navbar_link\">"
+                               "%s"
+                               "</span></a></li>\n", _("View notes")
+                               );
+                       break;
+               case VIEW_MAILBOX:
+                       wc_printf(
+                               "<li class=\"readallmess\">"
+                               "<a id=\"m_refresh\" href=\"readfwd\">"
+                               "<img src=\"static/readallmess3_24x.gif\" "
+                               "alt=\"\" width=\"24\" height=\"24\">"
+                               "<span class=\"navbar_link\">"
+                               "%s"
+                               "</span></a></li>\n", _("Refresh message list")
+                               );
+                       break;
+               case VIEW_WIKI:
+                       wc_printf(
+                               "<li class=\"readallmess\">"
+                               "<a href=\"wiki?page=home\">"
+                               "<img src=\"static/readallmess3_24x.gif\" "
+                               "alt=\"\" width=\"24\" height=\"24\">"
+                               "<span class=\"navbar_link\">"
+                               "%s"
+                               "</span></a></li>\n", _("Wiki home")
+                               );
+                       break;
+               default:
+                       wc_printf(
+                               "<li class=\"readallmess\">"
+                               "<a href=\"readfwd\">"
+                               "<img src=\"static/readallmess3_24x.gif\" "
+                               "alt=\"\" width=\"24\" height=\"24\">"
+                               "<span class=\"navbar_link\">"
+                               "%s"
+                               "</span></a></li>\n", _("Read all messages")
+                               );
+                       break;
                }
 
-               if (navbar_style == navbar_default) {
-                       switch(WC->CurRoom.view) {
-                       case VIEW_ADDRESSBOOK:
-                               wc_printf(
-                                       "<li class=\"addnewcontact\">"
-                                       "<a href=\"display_enter\">"
-                                       "<img src=\"static/addnewcontact_24x.gif\" "
-                                       "alt=\"\" width=\"24\" height=\"24\">"
-                                       "<span class=\"navbar_link\">"
-                                       "%s"
-                                       "</span></a></li>\n", _("Add new contact")
-                                       );
-                               break;
-                       case VIEW_CALENDAR:
-                       case VIEW_CALBRIEF:
-                               wc_printf("<li class=\"addevent\"><a href=\"display_enter");
-                               if (havebstr("year" )) wc_printf("?year=%s", bstr("year"));
-                               if (havebstr("month")) wc_printf("?month=%s", bstr("month"));
-                               if (havebstr("day"  )) wc_printf("?day=%s", bstr("day"));
-                               wc_printf("\">"
-                                       "<img  src=\"static/addevent_24x.gif\" "
-                                       "alt=\"\" width=\"24\" height=\"24\">"
-                                       "<span class=\"navbar_link\">"
-                                       "%s"
-                                       "</span></a></li>\n", _("Add new event")
-                                       );
-                               break;
-                       case VIEW_TASKS:
-                               wc_printf(
-                                       "<li class=\"newmess\">"
-                                       "<a href=\"display_enter\">"
-                                       "<img  src=\"static/newmess3_24x.gif\" "
-                                       "alt=\"\" width=\"24\" height=\"24\">"
-                                       "<span class=\"navbar_link\">"
-                                       "%s"
-                                       "</span></a></li>\n", _("Add new task")
-                                       );
-                               break;
-                       case VIEW_NOTES:
-                               wc_printf(
-                                       "<li class=\"enternewnote\">"
-                                       "<a href=\"add_new_note\">"
-                                       "<img  src=\"static/enternewnote_24x.gif\" "
-                                       "alt=\"\" width=\"24\" height=\"24\">"
-                                       "<span class=\"navbar_link\">"
-                                       "%s"
-                                       "</span></a></li>\n", _("Add new note")
-                                       );
-                               break;
-                       case VIEW_WIKI:
-                               safestrncpy(buf, bstr("page"), sizeof buf);
-                               if (IsEmptyStr(buf)) {
-                                       safestrncpy(buf, "home", sizeof buf);
-                               }
-                               str_wiki_index(buf);
-                               wc_printf(
-                                       "<li class=\"newmess\">"
-                                       "<a href=\"display_enter?page=%s\">"
-                                       "<img  src=\"static/newmess3_24x.gif\" "
-                                       "alt=\"\" width=\"24\" height=\"24\">"
-                                       "<span class=\"navbar_link\">"
-                                       "%s"
-                                       "</span></a></li>\n", buf, _("Edit this page")
-                                       );
+               switch(WC->CurRoom.view) {
+               case VIEW_ADDRESSBOOK:
+                       wc_printf(
+                               "<li class=\"addnewcontact\">"
+                               "<a href=\"display_enter\">"
+                               "<img src=\"static/addnewcontact_24x.gif\" "
+                               "alt=\"\" width=\"24\" height=\"24\">"
+                               "<span class=\"navbar_link\">"
+                               "%s"
+                               "</span></a></li>\n", _("Add new contact")
+                               );
+                       break;
+               case VIEW_CALENDAR:
+               case VIEW_CALBRIEF:
+                       wc_printf("<li class=\"addevent\"><a href=\"display_enter");
+                       if (havebstr("year" )) wc_printf("?year=%s", bstr("year"));
+                       if (havebstr("month")) wc_printf("?month=%s", bstr("month"));
+                       if (havebstr("day"  )) wc_printf("?day=%s", bstr("day"));
+                       wc_printf("\">"
+                                 "<img  src=\"static/addevent_24x.gif\" "
+                                 "alt=\"\" width=\"24\" height=\"24\">"
+                                 "<span class=\"navbar_link\">"
+                                 "%s"
+                                 "</span></a></li>\n", _("Add new event")
+                               );
+                       break;
+               case VIEW_TASKS:
+                       wc_printf(
+                               "<li class=\"newmess\">"
+                               "<a href=\"display_enter\">"
+                               "<img  src=\"static/newmess3_24x.gif\" "
+                               "alt=\"\" width=\"24\" height=\"24\">"
+                               "<span class=\"navbar_link\">"
+                               "%s"
+                               "</span></a></li>\n", _("Add new task")
+                               );
+                       break;
+               case VIEW_NOTES:
+                       wc_printf(
+                               "<li class=\"enternewnote\">"
+                               "<a href=\"add_new_note\">"
+                               "<img  src=\"static/enternewnote_24x.gif\" "
+                               "alt=\"\" width=\"24\" height=\"24\">"
+                               "<span class=\"navbar_link\">"
+                               "%s"
+                               "</span></a></li>\n", _("Add new note")
+                               );
+                       break;
+               case VIEW_WIKI:
+                       safestrncpy(buf, bstr("page"), sizeof buf);
+                       if (IsEmptyStr(buf)) {
+                               safestrncpy(buf, "home", sizeof buf);
+                       }
+                       str_wiki_index(buf);
+                       wc_printf(
+                               "<li class=\"newmess\">"
+                               "<a href=\"display_enter?page=%s\">"
+                               "<img  src=\"static/newmess3_24x.gif\" "
+                               "alt=\"\" width=\"24\" height=\"24\">"
+                               "<span class=\"navbar_link\">"
+                               "%s"
+                               "</span></a></li>\n", buf, _("Edit this page")
+                               );
 
-                               if (bmstrcasestr((char *)ChrPtr(WCC->Hdr->HR.ReqLine), "wiki_history")) {
-                                       /* already viewing history; display a link to the current page */
-                                       wc_printf(
-                                               "<li class=\"newmess\">"
-                                               "<a href=\"wiki?page=%s\">"
-                                               "<img  src=\"static/newmess3_24x.gif\" "
-                                               "alt=\"\" width=\"24\" height=\"24\">"
-                                               "<span class=\"navbar_link\">"
-                                               "%s"
-                                               "</span></a></li>\n", buf, _("Current version")
-                                               );
-                               }
-                               else {
-                                       /* display a link to the history */
-                                       wc_printf(
-                                               "<li class=\"newmess\">"
-                                               "<a href=\"wiki_history?page=%s\">"
-                                               "<img  src=\"static/newmess3_24x.gif\" "
-                                               "alt=\"\" width=\"24\" height=\"24\">"
-                                               "<span class=\"navbar_link\">"
-                                               "%s"
-                                               "</span></a></li>\n", buf, _("History")
-                                               );
-                               }
-                               break;
-                       case VIEW_MAILBOX:
+                       if (bmstrcasestr((char *)ChrPtr(WCC->Hdr->HR.ReqLine), "wiki_history")) {
+                               /* already viewing history; display a link to the current page */
                                wc_printf(
                                        "<li class=\"newmess\">"
-                                       "<a href=\"display_enter\">"
+                                       "<a href=\"wiki?page=%s\">"
                                        "<img  src=\"static/newmess3_24x.gif\" "
                                        "alt=\"\" width=\"24\" height=\"24\">"
                                        "<span class=\"navbar_link\">"
                                        "%s"
-                                       "</span></a></li>\n", _("Write mail")
-                                       );
-                               wc_printf(
-                                       "<li class=\"newmess\">"
-                                       "<a href=\"javascript:deleteAllSelectedMessages();\">"
-                                       "<img  src=\"static/delete.gif\" "
-                                       "alt=\"\" width=\"24\" height=\"24\"><span class=\"navbar_link\">"
-                                       "%s"
-                                       "</span></a></li>\n", _("Delete")
+                                       "</span></a></li>\n", buf, _("Current version")
                                        );
-                               break;
-                       default:
+                       }
+                       else {
+                               /* display a link to the history */
                                wc_printf(
                                        "<li class=\"newmess\">"
-                                       "<a href=\"display_enter\">"
+                                       "<a href=\"wiki_history?page=%s\">"
                                        "<img  src=\"static/newmess3_24x.gif\" "
                                        "alt=\"\" width=\"24\" height=\"24\">"
                                        "<span class=\"navbar_link\">"
                                        "%s"
-                                       "</span></a></li>\n", _("Enter a message")
+                                       "</span></a></li>\n", buf, _("History")
                                        );
-                               break;
                        }
+                       break;
+               case VIEW_MAILBOX:
+                       wc_printf(
+                               "<li class=\"newmess\">"
+                               "<a href=\"display_enter\">"
+                               "<img  src=\"static/newmess3_24x.gif\" "
+                               "alt=\"\" width=\"24\" height=\"24\">"
+                               "<span class=\"navbar_link\">"
+                               "%s"
+                               "</span></a></li>\n", _("Write mail")
+                               );
+                       wc_printf(
+                               "<li class=\"newmess\">"
+                               "<a href=\"javascript:deleteAllSelectedMessages();\">"
+                               "<img  src=\"static/delete.gif\" "
+                               "alt=\"\" width=\"24\" height=\"24\"><span class=\"navbar_link\">"
+                               "%s"
+                               "</span></a></li>\n", _("Delete")
+                               );
+                       break;
+               default:
+                       wc_printf(
+                               "<li class=\"newmess\">"
+                               "<a href=\"display_enter\">"
+                               "<img  src=\"static/newmess3_24x.gif\" "
+                               "alt=\"\" width=\"24\" height=\"24\">"
+                               "<span class=\"navbar_link\">"
+                               "%s"
+                               "</span></a></li>\n", _("Enter a message")
+                               );
+                       break;
                }
 
-               if (navbar_style == navbar_default) wc_printf(
+               wc_printf(
                        "<li class=\"skipthisroom\">"
                        "<a href=\"skip\" "
                        "title=\"%s\">"
@@ -624,8 +555,8 @@ void embed_room_banner(char *got, int navbar_style) {
                        _("Leave all messages marked as unread, go to next room with unread messages"),
                        _("Skip this room")
                        );
-
-               if (navbar_style == navbar_default) wc_printf(
+               
+               wc_printf(
                        "<li class=\"markngo\">"
                        "<a href=\"gotonext\" "
                        "title=\"%s\">"
@@ -636,10 +567,9 @@ void embed_room_banner(char *got, int navbar_style) {
                        _("Mark all messages as read, go to next room with unread messages"),
                        _("Goto next room")
                        );
-
+       
                wc_printf("</ul></div>\n");
        }
-
 }
 
 
@@ -1132,6 +1062,25 @@ void tmplput_CurrentRoomViewString(StrBuf *Target, WCTemplputParams *TP)
        FreeStrBuf(&Buf);
 }
 
+void tmplput_RoomViewString(StrBuf *Target, WCTemplputParams *TP) 
+{
+       long CheckThis;
+       StrBuf *Buf;
+
+       CheckThis = GetTemplateTokenNumber(Target, TP, 0, 0);
+       if ((CheckThis >= VIEW_MAX) || (CheckThis < VIEW_BBS))
+       {
+               LogTemplateError(Target, "Token", ERR_PARM2, TP,
+                                "Roomview [%ld] not valid\n", 
+                                CheckThis);
+               return;
+       }
+
+       Buf = NewStrBufPlain(_(viewdefs[CheckThis]), -1);
+       StrBufAppendTemplate(Target, TP, Buf, 0);
+       FreeStrBuf(&Buf);
+}
+
 
 /*
  * goto next room
@@ -3339,7 +3288,7 @@ void tmplput_current_room(StrBuf *Target, WCTemplputParams *TP)
 void tmplput_roombanner(StrBuf *Target, WCTemplputParams *TP)
 {
        wc_printf("<div id=\"banner\">\n");
-       embed_room_banner(NULL, navbar_default);
+       embed_room_banner(NULL);
        wc_printf("</div>\n");
 }
 
@@ -3571,7 +3520,8 @@ InitModule_ROOMOPS
        RegisterNamespace("THISROOM:ORDER", 0, 0, tmplput_CurrentRoomOrder, NULL, CTX_NONE);
        RegisterNamespace("THISROOM:DEFAULT_VIEW", 0, 0, tmplput_CurrentRoomDefView, NULL, CTX_NONE);
        RegisterConditional(HKEY("COND:THISROOM:HAVE_VIEW"), 0, ConditionalThisRoomHaveView, CTX_NONE);
-       RegisterNamespace("THISROOM:VIEW_STRING", 0, 0, tmplput_CurrentRoomViewString, NULL, CTX_NONE);
+       RegisterNamespace("THISROOM:VIEW_STRING", 0, 1, tmplput_CurrentRoomViewString, NULL, CTX_NONE);
+       RegisterNamespace("ROOM:VIEW_STRING", 1, 2, tmplput_RoomViewString, NULL, CTX_NONE);
 
        RegisterNamespace("THISROOM:INFOTEXT", 1, 2, tmplput_CurrentRoomInfoText, NULL, CTX_NONE);
        RegisterConditional(HKEY("COND:THISROOM:ORDER"), 0, ConditionalThisRoomOrder, CTX_NONE);