!752 static int maxQuestionLength = 500; static int maxAnswerLength = 200; static S html(S subUri, Map params) { L history = cast get(getMainBot(), "history"); new StringBuffer buf; buf.append(pageNav(params, litstringlist(), l(history), "n")); pcall { int x = 0; print("l(history)=" + l(history) + ", x=" + x); int n; if (!empty(params.get("n"))) n = parseInt(params.get("n")); else n = max(0, l(history)-1)/100*100; for (int i = min(n+100, l(history))-1; i >= n; i--) { O dialog = history.get(i); S q = shorten(getString(dialog, "question"), maxQuestionLength); S a = shorten(getString(dialog, "answer"), maxAnswerLength); S user = or(getString(dialog, "user"), "User"); buf.append(htag("li", htmlencode(user) + ": " + htmlencode(q) + "", "class", "splash-li") + "\n"); buf.append(htag("li", system() + ": " + htmlencode(a) + "", "class", "splash-li") + "\n"); } } ret htag("p", "n=" + l(history)) + htag("ul", buf); }