From 4a1267e085fdeddab1fbee4a425a530c6cdfdbb8 Mon Sep 17 00:00:00 2001 From: Sebastian Wilzbach Date: Sat, 28 May 2016 22:14:57 +0200 Subject: [PATCH 1/2] Set default HTTP port to 8080 --- config/web.ini.sample | 2 +- web.d | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/config/web.ini.sample b/config/web.ini.sample index a23f8bee..8c600b33 100644 --- a/config/web.ini.sample +++ b/config/web.ini.sample @@ -15,4 +15,4 @@ # addr = 127.0.0.1 # Port to listen on. -port = 80 +port = 8080 diff --git a/web.d b/web.d index 28297db2..a5df07c5 100644 --- a/web.d +++ b/web.d @@ -4005,7 +4005,7 @@ class NotFoundException : Exception struct ListenConfig { string addr; - ushort port = 80; + ushort port = 8000; } struct Config From e76d83c0bc25b892615ebddf2dc938d7f2ca1658 Mon Sep 17 00:00:00 2001 From: Sebastian Wilzbach Date: Sat, 28 May 2016 22:15:32 +0200 Subject: [PATCH 2/2] Allow to supply new thread guidelines --- groups.d | 3 ++- web.d | 13 ++++++++----- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/groups.d b/groups.d index 4887c49a..a7a29883 100644 --- a/groups.d +++ b/groups.d @@ -35,7 +35,8 @@ struct Config struct Group { - string internalName, publicName, urlName, groupSet, description, postMessage, sinkType, sinkName; + string internalName, publicName, urlName, groupSet, description, + postMessage, sinkType, sinkName, newThreadGuidelines; string[] urlAliases; OrderedMap!(string, AlsoVia) alsoVia; } diff --git a/web.d b/web.d index a5df07c5..ae7f4b06 100644 --- a/web.d +++ b/web.d @@ -2484,15 +2484,18 @@ bool discussionPostForm(PostDraft draft, bool showCaptcha=false, PostError error html.put( `
` - `Posting to `), html.putEncodedEntities(info.publicName), html.put(``, - (parent - ? parentInfo + `Posting to `), html.putEncodedEntities(info.publicName), + html.put(``,(parent ? parentInfo ? ` in reply to ` ~ postLink(parentInfo) : ` in reply to (unknown post)` : info ? `:
(` ~ encodeHtmlEntities(info.description) ~ `)` - : ``), - `
` + : ``)); + if (info.newThreadGuidelines) + html.put(`
` + `Please review the guidelines on creating a new thread in `, info.publicName, ``); + + html.put(`` `` `` ``