FEATURE: number of new topics at the end of summary email can be controlled by a new setting, digest_other_topics

This commit is contained in:
Neil Lalonde 2016-12-01 14:20:01 -05:00
parent 4820ebd76c
commit 576a424130
3 changed files with 4 additions and 2 deletions

View File

@ -130,7 +130,7 @@ class UserNotifications < ActionMailer::Base
end
# Now fetch some topics and posts to show
topics_for_digest = Topic.for_digest(user, min_date, limit: SiteSetting.digest_topics + 3, top_order: true).to_a
topics_for_digest = Topic.for_digest(user, min_date, limit: SiteSetting.digest_topics + SiteSetting.digest_other_topics, top_order: true).to_a
@popular_topics = topics_for_digest[0,SiteSetting.digest_topics]
@other_new_for_you = topics_for_digest.size > SiteSetting.digest_topics ? topics_for_digest[SiteSetting.digest_topics..-1] : []

View File

@ -1286,8 +1286,9 @@ en:
allow_animated_thumbnails: "Generates animated thumbnails of animated gifs."
default_avatars: "URLs to avatars that will be used by default for new users until they change them."
automatically_download_gravatars: "Download Gravatars for users upon account creation or email change."
digest_topics: "The maximum number of topics to display in the email summary."
digest_topics: "The maximum number of popular topics to display in the email summary."
digest_posts: "The maximum number of popular posts to display in the email summary."
digest_other_topics: "The maximum number of topics to show in the 'New in topics and categories you follow' section of the email summary."
digest_min_excerpt_length: "Minimum post excerpt in the email summary, in characters."
delete_digest_email_after_days: "Suppress summary emails for users not seen on the site for more than (n) days."
digest_suppress_categories: "Suppress these categories from summary emails."

View File

@ -588,6 +588,7 @@ email:
default: 5
min: 1
digest_posts: 3
digest_other_topics: 5
delete_digest_email_after_days: 365
digest_suppress_categories:
type: category_list