post-bottom additions and test.hbs
This commit is contained in:
parent
4e896abd4d
commit
49b89e90a8
|
@ -35,6 +35,9 @@ function loadGoogle(settings) {
|
|||
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());
|
||||
}
|
||||
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.enableServices();
|
||||
});
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<div class="google-dfp-ad-label"><h2>Google Ad Plugin Display</h2></div>
|
||||
<div id={{divId}} style='width: {{const_width}}px; height: {{const_height}}px' class="dfp-ad-unit" align=center>
|
||||
<div id={{divId}} style='width: {{const_width}}px; height: {{const_height}}px' class="dfp-ad-unit" align=center>
|
||||
{{#if loadedGoogletag}}
|
||||
<script type='text/javascript'>
|
||||
googletag.cmd.push(function() { googletag.display('{{divId}}'); });
|
||||
|
|
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
|
@ -6,9 +6,13 @@ en:
|
|||
dfp_topic_above_post_stream_code: "Show leaderboard ad above post stream"
|
||||
dfp_show_topic_above_suggested: "Disable topic_above_suggested ad"
|
||||
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_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_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_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!"
|
|
@ -33,5 +33,17 @@ ad_plugin:
|
|||
client: true
|
||||
default: ''
|
||||
dfp_show_topic_above_suggested:
|
||||
client: true
|
||||
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…
Reference in New Issue