Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New thread guidelines #70

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion config/web.ini.sample
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@
# addr = 127.0.0.1

# Port to listen on.
port = 80
port = 8080
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you want to change this then you should also update the README. Ideally it would be in its own PR.

3 changes: 2 additions & 1 deletion groups.d
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
15 changes: 9 additions & 6 deletions web.d
Original file line number Diff line number Diff line change
Expand Up @@ -2484,15 +2484,18 @@ bool discussionPostForm(PostDraft draft, bool showCaptcha=false, PostError error

html.put(
`<div id="postform-info">`
`Posting to <b>`), html.putEncodedEntities(info.publicName), html.put(`</b>`,
(parent
? parentInfo
`Posting to <b>`), html.putEncodedEntities(info.publicName),
html.put(`</b>`,(parent ? parentInfo
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is this hunk about? Looks like your editor misformatted it.

? ` in reply to ` ~ postLink(parentInfo)
: ` in reply to (unknown post)`
: info
? `:<br>(<b>` ~ encodeHtmlEntities(info.description) ~ `</b>)`
: ``),
`</div>`
: ``));
if (info.newThreadGuidelines)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mixed tabs and spaces. DFeed uses tabs

html.put(`<br>`
`Please review the <a href="`, info.newThreadGuidelines,`" > guidelines on creating a new thread in `, info.publicName, `</a>`);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be entity-escaped


html.put(`</div>`
`<input type="hidden" name="secret" value="`, userSettings.secret, `">`
`<input type="hidden" name="did" value="`), html.putEncodedEntities(draftID), html.put(`">`
`<label for="postform-name">Your name:</label>`
Expand Down Expand Up @@ -4005,7 +4008,7 @@ class NotFoundException : Exception
struct ListenConfig
{
string addr;
ushort port = 80;
ushort port = 8000;
Copy link
Owner

@CyberShadow CyberShadow Jun 14, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So is it 8000 or 8080?

If anyone other than me actually used DFeed, I would say "don't change the defaults, that might break someone's setup", but it doesn't really matter.

}

struct Config
Expand Down