!7 static S text; concept Text { S conceptID; S text; S by; } p { db(); load("text"); if (isMainProgram()) serveHttpAndOpenBrowser(); } synchronized html { S newText = params.get("text"); if (newText != null) { text = newText; save("text"); } S user = cast call(getBot(#1007510), "conceptIDForCookie"); S msg = ""; if (nempty(params.get("publish"))) { Text t = uniq_sync(Text, conceptID := aGlobalID(), text := text, by := user); msg = "Published as: " + t.conceptID; } S list = p("Published texts: " + join(", ", collect(list(Text), 'conceptID))); ret (empty(msg) ? "" : p(msg)) + list + p("You are: " + or2(user, "?")) + hpostform([[
|
#TEXT#
|
|
|