Compare commits
18
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d6af1d2e20 | ||
|
|
79d5f144a6 | ||
|
|
408b043046 | ||
|
|
e628bc859b | ||
|
|
f6c7c2d1af | ||
|
|
a669381a71 | ||
|
|
75a56891d2 | ||
|
|
0d4e6bb4fa | ||
|
|
5eed122002 | ||
|
|
4c45a27a72 | ||
|
|
c838f10467 | ||
|
|
8b404b9ffb | ||
|
|
97f56a95bd | ||
|
|
73d010ef49 | ||
|
|
8e1041ec75 | ||
|
|
40c0a64bb9 | ||
|
|
3f71c80e89 | ||
|
|
392fd76679 |
@@ -51,6 +51,7 @@ en:
|
||||
adsense_post_bottom_ad_sizes: "Choose your ad size"
|
||||
adsense_mobile_post_bottom_ad_size: "Choose your ad size"
|
||||
adsense_nth_post_code: "Show an ad after every N posts, where N is this value."
|
||||
adsense_ads_txt: "Contents of your ads.txt file. More details available at <a href='https://support.google.com/adsense/answer/7532444?hl=en' target='_blank'>this Google AdSense help page</a>."
|
||||
|
||||
amazon_through_trust_level: "Show your ads to users based on trust levels. Users with trust level higher than this value will not see ads."
|
||||
amazon_topic_list_top_src_code: "Enter src code to display at topic list top location"
|
||||
|
||||
+80
-76
File diff suppressed because it is too large
Load Diff
@@ -5,3 +5,20 @@
|
||||
# url: https://github.com/discourse/discourse-adplugin
|
||||
|
||||
register_asset "stylesheets/adplugin.scss"
|
||||
|
||||
after_initialize do
|
||||
require_dependency 'application_controller'
|
||||
class ::AdstxtController < ::ApplicationController
|
||||
skip_before_action :check_xhr
|
||||
|
||||
def index
|
||||
raise Discourse::NotFound unless SiteSetting.adsense_ads_txt.present?
|
||||
|
||||
render plain: SiteSetting.adsense_ads_txt
|
||||
end
|
||||
end
|
||||
|
||||
Discourse::Application.routes.append do
|
||||
get '/ads.txt' => "adstxt#index"
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user