!7 !include once #1029881 // DynNewBot2 Compact Include cmodule AvorDemonstrator > DynNewBot2 { void start { botName = heading = "AVOR Demonstrator"; adminName = "AVOR Demonstrator Admin"; super.start(); } O html(IWebRequest req) { S uri = addSlash(req.uri()); new Matches m; if (startsWith(uri, "/uiDemonstrator/", m)) ret serveUIDemonstrator(webRequest_modifyURI(addSlashPrefix(m.rest()), req)); ret super.html(req); } L crudClasses(bool masterAuthed) { L l = super.crudClasses(masterAuthed); ret masterAuthed ? listPlus(l, Avatar) : l; } void makeFramer(Req req) { super.makeFramer(req); req.framer.addNavItem( appendQueryToURL(baseLink + "/uiDemonstrator", cookie := "test_" + aRandomID()), "UI Demonstrator", targetBlank := true); } O serveUIDemonstrator(IWebRequest req) { S cookie = or2(req.params().get("cookie"), "test_" + aRandomID()); ret hhtml(hhead_title("UI Demonstrator [" + botName + "]") + hframeset_cols("*,*", hframe("botFrame", appendQueryToURL(baseLink + "/demo", _autoOpenBot := 1, +cookie)) + hframeset_rows("*,*", hframe("botAdminFrame", baseLink + "/crud/Conversation") + hframe("botThoughtsFrame", appendQueryToURL(baseLink + "/thoughts", +cookie)))) ); } }