mirror of
https://github.com/discourse/discourse-adplugin.git
synced 2025-07-07 13:52:12 +00:00
post-bottom additions and test.hbs
This commit is contained in:
parent
4e896abd4d
commit
49b89e90a8
3
assets/javascripts/discourse/components/google-dfp-ad.js.es6
Normal file → Executable file
3
assets/javascripts/discourse/components/google-dfp-ad.js.es6
Normal file → Executable file
@ -35,6 +35,9 @@ function loadGoogle(settings) {
|
|||||||
if (settings.dfp_topic_above_suggested_code && !settings.dfp_show_topic_above_suggested) {
|
if (settings.dfp_topic_above_suggested_code && !settings.dfp_show_topic_above_suggested) {
|
||||||
googletag.defineSlot(settings.dfp_topic_above_suggested_code, [parseInt(settings.dfp_size_topic_above_suggested_width_code), parseInt(settings.dfp_size_topic_above_suggested_height_code)], 'div-gpt-ad-topic-above-suggested').addService(googletag.pubads());
|
googletag.defineSlot(settings.dfp_topic_above_suggested_code, [parseInt(settings.dfp_size_topic_above_suggested_width_code), parseInt(settings.dfp_size_topic_above_suggested_height_code)], 'div-gpt-ad-topic-above-suggested').addService(googletag.pubads());
|
||||||
}
|
}
|
||||||
|
if (settings.dfp_post_bottom_code && !settings.dfp_show_post_bottom) {
|
||||||
|
googletag.defineSlot(settings.dfp_post_bottom_code, [parseInt(settings.dfp_size_post_bottom_width_code), parseInt(settings.dfp_size_post_bottom_height_code)], 'div-gpt-ad-post-bottom').addService(googletag.pubads());
|
||||||
|
}
|
||||||
googletag.pubads().enableSingleRequest();
|
googletag.pubads().enableSingleRequest();
|
||||||
googletag.enableServices();
|
googletag.enableServices();
|
||||||
});
|
});
|
||||||
|
0
assets/javascripts/discourse/templates/components/google-dfp-ad.hbs
Normal file → Executable file
0
assets/javascripts/discourse/templates/components/google-dfp-ad.hbs
Normal file → Executable file
0
assets/javascripts/discourse/templates/connectors/discovery-list-container-top/discourse-google-dfp.hbs
Normal file → Executable file
0
assets/javascripts/discourse/templates/connectors/discovery-list-container-top/discourse-google-dfp.hbs
Normal file → Executable file
@ -0,0 +1,3 @@
|
|||||||
|
{{#if siteSettings.dfp_post_bottom_code}}
|
||||||
|
{{google-dfp-ad placement="post-bottom"}}
|
||||||
|
{{/if}}
|
0
assets/javascripts/discourse/templates/connectors/topic-above-post-stream/discourse-google-dfp.hbs
Normal file → Executable file
0
assets/javascripts/discourse/templates/connectors/topic-above-post-stream/discourse-google-dfp.hbs
Normal file → Executable file
0
assets/javascripts/discourse/templates/connectors/topic-above-suggested/discourse-google-dfp.hbs
Normal file → Executable file
0
assets/javascripts/discourse/templates/connectors/topic-above-suggested/discourse-google-dfp.hbs
Normal file → Executable file
0
auto_generated/plugin_5e03562e98e357709eaba07c3a0e9054afdd7697.css
Normal file → Executable file
0
auto_generated/plugin_5e03562e98e357709eaba07c3a0e9054afdd7697.css
Normal file → Executable file
0
config/locales/client.en.yml
Normal file → Executable file
0
config/locales/client.en.yml
Normal file → Executable file
4
config/locales/server.en.yml
Normal file → Executable file
4
config/locales/server.en.yml
Normal file → Executable file
@ -6,9 +6,13 @@ en:
|
|||||||
dfp_topic_above_post_stream_code: "Show leaderboard ad above post stream"
|
dfp_topic_above_post_stream_code: "Show leaderboard ad above post stream"
|
||||||
dfp_show_topic_above_suggested: "Disable topic_above_suggested ad"
|
dfp_show_topic_above_suggested: "Disable topic_above_suggested ad"
|
||||||
dfp_topic_above_suggested_code: "Show leaderboard ad above suggested topics"
|
dfp_topic_above_suggested_code: "Show leaderboard ad above suggested topics"
|
||||||
|
dfp_show_post_bottom: "Disable post_bottom ad"
|
||||||
|
dfp_post_bottom_code: "Show leaderboard ad post_bottom topics"
|
||||||
dfp_size_topic_list_top_width_code: "Put your ad topic list top size width!"
|
dfp_size_topic_list_top_width_code: "Put your ad topic list top size width!"
|
||||||
dfp_size_topic_list_top_height_code: "Put your ad topic above post stream size height!"
|
dfp_size_topic_list_top_height_code: "Put your ad topic above post stream size height!"
|
||||||
dfp_size_topic_above_post_stream_width_code: "Put your ad topic above post stream size width!"
|
dfp_size_topic_above_post_stream_width_code: "Put your ad topic above post stream size width!"
|
||||||
dfp_size_topic_above_post_stream_height_code: "Put your ad topic list top size height!"
|
dfp_size_topic_above_post_stream_height_code: "Put your ad topic list top size height!"
|
||||||
dfp_size_topic_above_suggested_width_code: "Put your ad topic above suggested size width!"
|
dfp_size_topic_above_suggested_width_code: "Put your ad topic above suggested size width!"
|
||||||
dfp_size_topic_above_suggested_height_code: "Put your ad topic above suggested size height!"
|
dfp_size_topic_above_suggested_height_code: "Put your ad topic above suggested size height!"
|
||||||
|
dfp_size_post_bottom_width_code: "Put your ad post bottom size width!"
|
||||||
|
dfp_size_post_bottom_height_code: "Put your ad post bottom size height!"
|
12
config/settings.yml
Normal file → Executable file
12
config/settings.yml
Normal file → Executable file
@ -35,3 +35,15 @@ ad_plugin:
|
|||||||
dfp_show_topic_above_suggested:
|
dfp_show_topic_above_suggested:
|
||||||
client: true
|
client: true
|
||||||
default: false
|
default: false
|
||||||
|
dfp_post_bottom_code:
|
||||||
|
client: true
|
||||||
|
default: ''
|
||||||
|
dfp_size_post_bottom_width_code:
|
||||||
|
client: true
|
||||||
|
default: ''
|
||||||
|
dfp_size_post_bottom_height_code:
|
||||||
|
client: true
|
||||||
|
default: ''
|
||||||
|
dfp_show_post_bottom:
|
||||||
|
client: true
|
||||||
|
default: false
|
Loading…
x
Reference in New Issue
Block a user