Add support for archived subreddits, with a special submit message.

This commit is contained in:
Max Goodman
2011-12-01 14:22:32 -08:00
parent 7c328537d3
commit 06f8d1c4f0
3 changed files with 6 additions and 2 deletions

View File

@@ -253,7 +253,10 @@ class Reddit(Templated):
kwargs["subtitles"] = [strings.submit_box_text]
else:
kwargs["disabled"] = True
kwargs["subtitles"] = [strings.submit_box_restricted_text]
if c.site.type == "archived":
kwargs["subtitles"] = [strings.submit_box_archived_text]
else:
kwargs["subtitles"] = [strings.submit_box_restricted_text]
ps.append(SideBox(**kwargs))
if self.create_reddit_box and c.user_is_loggedin:

View File

@@ -125,6 +125,7 @@ string_dict = dict(
),
submit_box_text = _('to anything interesting: news article, blog entry, video, picture...'),
submit_box_restricted_text = _('submission in this subreddit is restricted to approved submitters.'),
submit_box_archived_text = _('this subreddit is archived and no longer accepting submissions.'),
permalink_title = _("%(author)s comments on %(title)s"),
link_info_title = _("%(title)s : %(site)s"),
banned_subreddit = _("""**this reddit has been banned**\n\nmost likely this was done automatically by our spam filtering program. the program is still learning, and may even have some bugs, so if you feel the ban was a mistake, please submit a link to our [request a reddit listing](%(link)s) and be sure to include the **exact name of the reddit**."""),

View File

@@ -266,7 +266,7 @@ class Subreddit(Thing, Printable):
if c.user_is_admin:
return True
if self.type in ('public', 'restricted'):
if self.type in ('public', 'restricted', 'archived'):
return True
elif c.user_is_loggedin:
#private requires contributorship