From 4f2097d08db420d3747543cb824d781720200c9a Mon Sep 17 00:00:00 2001 From: Chad Birch Date: Wed, 21 Aug 2013 13:12:32 -0600 Subject: [PATCH] Spam filter settings: add "all" level This level makes it so that all items of the chosen type submitted to the subreddit will be filtered initially. This is useful for subreddits that want to be extremely strict with their submissions, as well as for many subreddits to be able to go into "lockdown" in the case of a raid or something similar. --- r2/r2/controllers/api.py | 6 +++--- r2/r2/public/static/css/reddit.less | 4 ++++ r2/r2/templates/createsubreddit.html | 10 ++++++++-- 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/r2/r2/controllers/api.py b/r2/r2/controllers/api.py index 8b332871f..b16f6107c 100755 --- a/r2/r2/controllers/api.py +++ b/r2/r2/controllers/api.py @@ -1793,9 +1793,9 @@ class ApiController(RedditController, OAuth2ResourceController): public_traffic = VBoolean('public_traffic'), exclude_banned_modqueue = VBoolean('exclude_banned_modqueue'), show_cname_sidebar = VBoolean('show_cname_sidebar'), - spam_links = VOneOf('spam_links', ('low', 'high')), - spam_selfposts = VOneOf('spam_selfposts', ('low', 'high')), - spam_comments = VOneOf('spam_comments', ('low', 'high')), + spam_links = VOneOf('spam_links', ('low', 'high', 'all')), + spam_selfposts = VOneOf('spam_selfposts', ('low', 'high', 'all')), + spam_comments = VOneOf('spam_comments', ('low', 'high', 'all')), type = VOneOf('type', ('public', 'private', 'restricted', 'gold_restricted', 'archived')), link_type = VOneOf('link_type', ('any', 'link', 'self')), submit_link_label=VLength('submit_link_label', max_length=60), diff --git a/r2/r2/public/static/css/reddit.less b/r2/r2/public/static/css/reddit.less index aef63976d..f41bec09a 100755 --- a/r2/r2/public/static/css/reddit.less +++ b/r2/r2/public/static/css/reddit.less @@ -3409,6 +3409,10 @@ form input[type=radio] {margin: 2px .5em 0 0; } background: transparent; } +.pretty-form .delete-field td label + label { + margin-left: 2em; +} + #pref-delete textarea#delete-message { font-size: smaller; height: 5em; diff --git a/r2/r2/templates/createsubreddit.html b/r2/r2/templates/createsubreddit.html index 998342c12..a9b650651 100644 --- a/r2/r2/templates/createsubreddit.html +++ b/r2/r2/templates/createsubreddit.html @@ -218,9 +218,9 @@ - <%utils:line_field title="${_('spam filter strength')}" - description='${_("high is the standard filter, low disables most filtering")}'> + <%utils:line_field title="${_('spam filter strength')}">
+

${_("high is the standard filter, low disables most filtering, all will filter every post initially and they will need to be approved manually to be visible.")}

@@ -229,6 +229,8 @@ checked=thing.site and thing.site.spam_links == 'low')} ${utils.inline_radio_type('spam_links', 'high', _("high"), checked=thing.site and thing.site.spam_links == 'high')} + ${utils.inline_radio_type('spam_links', 'all', _("all"), + checked=thing.site and thing.site.spam_links == 'all')} @@ -238,6 +240,8 @@ checked=thing.site and thing.site.spam_selfposts == 'low')} ${utils.inline_radio_type('spam_selfposts', 'high', _("high"), checked=thing.site and thing.site.spam_selfposts == 'high')} + ${utils.inline_radio_type('spam_selfposts', 'all', _("all"), + checked=thing.site and thing.site.spam_selfposts == 'all')} @@ -247,6 +251,8 @@ checked=thing.site and thing.site.spam_comments == 'low')} ${utils.inline_radio_type('spam_comments', 'high', _("high"), checked=thing.site and thing.site.spam_comments == 'high')} + ${utils.inline_radio_type('spam_comments', 'all', _("all"), + checked=thing.site and thing.site.spam_comments == 'all')}
${_("links")}: