diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 006edccf4..1f67a704b 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -63,11 +63,11 @@ module ApplicationHelper end def tos_path - return "#{Discourse::base_uri}/tos" + SiteSetting.tos_url.blank? ? "#{Discourse::base_uri}/tos" : SiteSetting.tos_url end def privacy_path - return "#{Discourse::base_uri}/privacy" + SiteSetting.privacy_policy_url.blank? ? "#{Discourse::base_uri}/privacy" : SiteSetting.privacy_policy_url end def login_path diff --git a/app/models/site_setting.rb b/app/models/site_setting.rb index 1e94e265c..3daaefa65 100755 --- a/app/models/site_setting.rb +++ b/app/models/site_setting.rb @@ -16,6 +16,8 @@ class SiteSetting < ActiveRecord::Base setting(:company_full_name, 'My Unconfigured Forum Ltd.') setting(:company_short_name, 'Unconfigured Forum') setting(:company_domain, 'www.example.com') + setting(:tos_url, '') + setting(:privacy_policy_url, '') setting(:api_key, '') client_setting(:traditional_markdown_linebreaks, false) client_setting(:top_menu, 'latest|new|unread|favorited|categories') diff --git a/config/locales/server.en.yml b/config/locales/server.en.yml index c742fa6ce..fac3c0cb2 100644 --- a/config/locales/server.en.yml +++ b/config/locales/server.en.yml @@ -541,6 +541,9 @@ en: topic_views_heat_medium: "The number of views after which a topic's heat level is medium." topic_views_heat_high: "The number of views after which a topic's heat level is high." + tos_url: "If you have a Terms of Service document hosted elsewhere that you want to use, provide the full URL here." + privacy_policy_url: "If you have a Privacy Policy document hosted elsewhere that you want to use, provide the full URL here." + notification_types: mentioned: "%{display_username} mentioned you in %{link}" liked: "%{display_username} liked your post in %{link}"