| | @@ -124,10 +124,12 @@ |
| 124 | 124 | " on the same server"); |
| 125 | 125 | setup_menu_entry("Tickets", "tktsetup", |
| 126 | 126 | "Configure the trouble-ticketing system for this repository"); |
| 127 | 127 | setup_menu_entry("Wiki", "setup_wiki", |
| 128 | 128 | "Configure the wiki for this repository"); |
| 129 | + setup_menu_entry("Chat", "setup_chat", |
| 130 | + "Configure the chatroom"); |
| 129 | 131 | } |
| 130 | 132 | setup_menu_entry("Search","srchsetup", |
| 131 | 133 | "Configure the built-in search engine"); |
| 132 | 134 | setup_menu_entry("URL Aliases", "waliassetup", |
| 133 | 135 | "Configure URL aliases"); |
| | @@ -1111,10 +1113,55 @@ |
| 1111 | 1113 | @ users to inject dangerous HTML, CSS and JavaScript code into your wiki.</p> |
| 1112 | 1114 | @ <p>This should <strong>only</strong> be enabled when wiki editing is limited |
| 1113 | 1115 | @ to trusted users. It should <strong>not</strong> be used on a publicly |
| 1114 | 1116 | @ editable wiki.</p> |
| 1115 | 1117 | @ (Property: "wiki-use-html") |
| 1118 | + @ <hr /> |
| 1119 | + @ <p><input type="submit" name="submit" value="Apply Changes" /></p> |
| 1120 | + @ </div></form> |
| 1121 | + db_end_transaction(0); |
| 1122 | + style_finish_page(); |
| 1123 | +} |
| 1124 | + |
| 1125 | +/* |
| 1126 | +** WEBPAGE: setup_chat |
| 1127 | +** |
| 1128 | +** The "Admin/Chat" page. Requires Setup privilege. |
| 1129 | +*/ |
| 1130 | +void setup_chat(void){ |
| 1131 | + login_check_credentials(); |
| 1132 | + if( !g.perm.Setup ){ |
| 1133 | + login_needed(0); |
| 1134 | + return; |
| 1135 | + } |
| 1136 | + |
| 1137 | + style_set_current_feature("setup"); |
| 1138 | + style_header("Chat Configuration"); |
| 1139 | + db_begin_transaction(); |
| 1140 | + @ <form action="%R/setup_chat" method="post"><div> |
| 1141 | + login_insert_csrf_secret(); |
| 1142 | + @ <input type="submit" name="submit" value="Apply Changes" /></p> |
| 1143 | + @ <hr /> |
| 1144 | + entry_attribute("Initial Chat History Size", 10, |
| 1145 | + "chat-initial-history", "chatih", "50", 0); |
| 1146 | + @ <p>When /chat first starts up, it preloads up to this many historical |
| 1147 | + @ messages. |
| 1148 | + @ (Property: "chat-initial-history")</p> |
| 1149 | + @ <hr /> |
| 1150 | + entry_attribute("Minimum Number Of Historical Messages To Retain", 10, |
| 1151 | + "chat-keep-count", "chatkc", "50", 0); |
| 1152 | + @ <p>The chat subsystem purges older messages. But it will always retain |
| 1153 | + @ the N most recent messages where N is the value of this setting. |
| 1154 | + @ (Property: "chat-keep-count")</p> |
| 1155 | + @ <hr /> |
| 1156 | + entry_attribute("Maximum Message Age In Days", 10, |
| 1157 | + "chat-keep-days", "chatkd", "7", 0); |
| 1158 | + @ <p>Chat message are removed after N days, where N is the value of |
| 1159 | + @ this setting. N may be fractional. So, for example, to only keep |
| 1160 | + @ an historical record of chat messages for 12 hours, set this value |
| 1161 | + @ to 0.5. |
| 1162 | + @ (Property: "chat-keep-days")</p> |
| 1116 | 1163 | @ <hr /> |
| 1117 | 1164 | @ <p><input type="submit" name="submit" value="Apply Changes" /></p> |
| 1118 | 1165 | @ </div></form> |
| 1119 | 1166 | db_end_transaction(0); |
| 1120 | 1167 | style_finish_page(); |
| 1121 | 1168 | |