diff --git a/assets/javascripts/discourse/components/google-adsense.js.es6 b/assets/javascripts/discourse/components/google-adsense.js.es6 index db946f7..3e7aa3e 100644 --- a/assets/javascripts/discourse/components/google-adsense.js.es6 +++ b/assets/javascripts/discourse/components/google-adsense.js.es6 @@ -3,6 +3,10 @@ import PageTracker from 'discourse/lib/page-tracker'; var ad_width = ''; var ad_height = ''; var ad_code = ''; +var ad_mobile_width = 320; +var ad_mobile_height = 50; +var ad_mobile_code = ''; +var currentUser = Discourse.User.current(); var publisher_id = Discourse.SiteSettings.adsense_publisher_code; var preGoogleVars = null; var postGoogleVars = null; @@ -20,43 +24,42 @@ function splitHeightInt(value) { return str.trim(); } - PageTracker.current().on('change', function(url) { - - var ads = document.getElementById("adsense_loader"); if (ads) { - // clear the old element and its state - //ads.remove(); ads.parentNode.removeChild(ads); - for (var i = 0; i < postGoogleVars.length; i++) { - var key = postGoogleVars[i]; - window[key] = undefined; - } - } - - if(preGoogleVars === null) { - preGoogleVars = []; - for(var key in window) { - if(key.indexOf("google") !== -1) { - preGoogleVars.push(key); + for (var key in window) { + if (key.indexOf("google") !== -1){ + window[key] = undefined; } - } - } + // for (var i = 0; i < postGoogleVars.length; i++) { + // var key = postGoogleVars[i]; + // window[key] = undefined; + } + } + + // if(preGoogleVars === null) { + // preGoogleVars = []; + // for(var key in window) { + // if(key.indexOf("google") !== -1) { + // preGoogleVars.push(key); + // } + // } + // } var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.id="adsense_loader"; ga.src = '//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js'; - ga.addEventListener('load', function(e) { - if(postGoogleVars === null) { - postGoogleVars = []; + // ga.addEventListener('load', function(e) { + // if(postGoogleVars === null) { + // postGoogleVars = []; - for(var key in window) { - if(key.indexOf("google") !== -1 && preGoogleVars.indexOf(key) == -1) { - postGoogleVars.push(key); - } - } - } - }); + // for(var key in window) { + // if(key.indexOf("google") !== -1 && preGoogleVars.indexOf(key) == -1) { + // postGoogleVars.push(key); + // } + // } + // } + // }); var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); }); @@ -70,22 +73,27 @@ var data = { if (Discourse.SiteSettings.adsense_publisher_code) { - if (Discourse.SiteSettings.adsense_topic_list_top_code && !Discourse.SiteSettings.adsense_show_topic_list_top) { - data["topic-list-top"]["ad_code"] = Discourse.SiteSettings.adsense_topic_list_top_code; - data["topic-list-top"]["ad_width"] = parseInt(splitWidthInt(Discourse.SiteSettings.adsense_topic_list_top_ad_sizes)); - data["topic-list-top"]["ad_height"] = parseInt(splitHeightInt(Discourse.SiteSettings.adsense_topic_list_top_ad_sizes)); + if (!Discourse.SiteSettings.adsense_show_topic_list_top && !((currentUser) && (currentUser.get('trust_level') > Discourse.SiteSettings.adsense_through_trust_level))) { + if (!Discourse.Mobile.mobileView && Discourse.SiteSettings.adsense_topic_list_top_code) { + data["topic-list-top"]["ad_code"] = Discourse.SiteSettings.adsense_topic_list_top_code; + data["topic-list-top"]["ad_width"] = parseInt(splitWidthInt(Discourse.SiteSettings.adsense_topic_list_top_ad_sizes)); + data["topic-list-top"]["ad_height"] = parseInt(splitHeightInt(Discourse.SiteSettings.adsense_topic_list_top_ad_sizes)); + } + if (Discourse.Mobile.mobileView && Discourse.SiteSettings.adsense_mobile_topic_list_top_code) { + data["topic-list-top"]["ad_mobile_code"] = Discourse.SiteSettings.adsense_mobile_topic_list_top_code; + } } - if (Discourse.SiteSettings.adsense_topic_above_post_stream_code && !Discourse.SiteSettings.adsense_show_topic_above_post_stream) { + if (Discourse.SiteSettings.adsense_topic_above_post_stream_code && !Discourse.SiteSettings.adsense_show_topic_above_post_stream && !((currentUser) && (currentUser.get('trust_level') > Discourse.SiteSettings.adsense_through_trust_level))) { data["topic-above-post-stream"]["ad_code"] = Discourse.SiteSettings.adsense_topic_above_post_stream_code; data["topic-above-post-stream"]["ad_width"] = parseInt(splitWidthInt(Discourse.SiteSettings.adsense_topic_above_post_stream_ad_sizes)); data["topic-above-post-stream"]["ad_height"] = parseInt(splitHeightInt(Discourse.SiteSettings.adsense_topic_above_post_stream_ad_sizes)); } - if (Discourse.SiteSettings.adsense_topic_above_suggested_code && !Discourse.SiteSettings.adsense_show_topic_above_suggested) { + if (Discourse.SiteSettings.adsense_topic_above_suggested_code && !Discourse.SiteSettings.adsense_show_topic_above_suggested && !((currentUser) && (currentUser.get('trust_level') > Discourse.SiteSettings.adsense_through_trust_level))) { data["topic-above-suggested"]["ad_code"] = Discourse.SiteSettings.adsense_topic_above_suggested_code; data["topic-above-suggested"]["ad_width"] = parseInt(splitWidthInt(Discourse.SiteSettings.adsense_topic_above_suggested_ad_sizes)); data["topic-above-suggested"]["ad_height"] = parseInt(splitHeightInt(Discourse.SiteSettings.adsense_topic_above_suggested_ad_sizes)); } - if (Discourse.SiteSettings.adsense_post_bottom_code && !Discourse.SiteSettings.adsense_show_post_bottom) { + if (Discourse.SiteSettings.adsense_post_bottom_code && !Discourse.SiteSettings.adsense_show_post_bottom && !((currentUser) && (currentUser.get('trust_level') > Discourse.SiteSettings.adsense_through_trust_level))) { data["post-bottom"]["ad_code"] = Discourse.SiteSettings.adsense_post_bottom_code; data["post-bottom"]["ad_width"] = parseInt(splitWidthInt(Discourse.SiteSettings.adsense_post_bottom_ad_sizes)); data["post-bottom"]["ad_height"] = parseInt(splitHeightInt(Discourse.SiteSettings.adsense_post_bottom_ad_sizes)); @@ -100,6 +108,8 @@ export default Ember.Component.extend({ publisher_id: publisher_id, ad_width: ad_width, ad_height: ad_height, + ad_mobile_width: ad_mobile_width, + ad_mobile_height: ad_mobile_height, mobile_width: mobile_width, mobile_height: mobile_height, @@ -108,6 +118,7 @@ export default Ember.Component.extend({ this.set('ad_width', data[this.placement]["ad_width"] ); this.set('ad_height', data[this.placement]["ad_height"] ); this.set('ad_code', data[this.placement]["ad_code"] ); + this.set('ad_mobile_code', data[this.placement]["ad_mobile_code"] ); this._super(); }, @@ -120,8 +131,8 @@ export default Ember.Component.extend({ }.property('adWrapperStyle'), adWrapperStyleMobile: function() { - return `width: ${this.get('mobile_width')}px; height: ${this.get('mobile_height')}px; margin:0 auto;`.htmlSafe(); - }.property('mobile_width', 'mobile_height'), + return `width: ${this.get('ad_mobile_width')}px; height: ${this.get('ad_mobile_height')}px; margin:0 auto;`.htmlSafe(); + }.property('ad_mobile_width', 'ad_mobile_height'), adInsStyleMobile: function() { return `display: inline-block; ${this.get('adWrapperStyleMobile')}`.htmlSafe(); diff --git a/assets/javascripts/discourse/components/google-dfp-ad.js.es6 b/assets/javascripts/discourse/components/google-dfp-ad.js.es6 index 6b55990..f2459e4 100755 --- a/assets/javascripts/discourse/components/google-dfp-ad.js.es6 +++ b/assets/javascripts/discourse/components/google-dfp-ad.js.es6 @@ -3,6 +3,9 @@ import loadScript from 'discourse/lib/load-script'; var const_width = ''; var const_height = ''; +var const_mobile_width = 320; +var const_mobile_height = 50; +var currentUser = Discourse.User.current(); var mobile_width = 320; var mobile_height = 50; @@ -19,11 +22,6 @@ function splitHeightInt(value) { var str = value.substring(4, 7); return str.trim(); } -/* -// Coaches Note! -// Background: We want to call on google.setTargeting using googletag.bar so that we can can take in inputs from users (key and value) for custom targeting. -// Look at 26 - 55 which should call on googletag.setTargeting. -// Error is occuring on link 49 which is returning "Uncaught ReferenceError: setTargeting is not defined" // This creates an array for the values of the custom targeting key function valueParse(value) { @@ -41,41 +39,6 @@ function keyParse(word) { return key; } -// This sets the key and value for custom targeting -var Foo = function(key, value, googletag) { - this.locationKey = key; - this.locationValue = value; - this.googletag = googletag; -} - -// setTargeting is not defined. We want to return as a method - PROBLEM 1 -Foo.prototype.bar = function() { - return this.googletag.setTargeting(this.locationKey, this.locationValue); -} - -// This should call googletag.setTargeting(key for that location, value for that location) -function custom_targeting(key_array, value_array) { - for (var i = 0; i < key_array.length; i++) { - var wordValue = valueParse(value_array[i]); - var f = new Foo(key_array[i], wordValue, googletag); - f.bar(); - console.log("works!"); - } -} - -// END of Coaches Note - -// splitting values -/*var custom_values = []; -var word = keyParse(Discourse.SiteSettings.dfp_target_topic_list_top_value_code); -var wordValue; -for (var i = 0; i < word.length; i++) { - wordValue = valueParse(word[i]); - custom_values.push(wordValue); -}*/ - - -//PageTracker.current().on('change', function(url) { function loadGoogle(settings) { if (_loaded) { return Ember.RSVP.resolve(); @@ -94,57 +57,72 @@ function loadGoogle(settings) { } googletag.cmd.push(function() { + + var topic_list_top = googletag.defineSlot('/' + settings.dfp_publisher_id + '/' + settings.dfp_topic_list_top_code, [parseInt(splitWidthInt(Discourse.SiteSettings.topic_list_top_ad_sizes)), parseInt(splitHeightInt(Discourse.SiteSettings.topic_list_top_ad_sizes))], 'div-gpt-ad-topic-list-top').addService(googletag.pubads()); + var topic_above_post_stream = googletag.defineSlot('/' + settings.dfp_publisher_id + '/' + settings.dfp_topic_above_post_stream_code, [parseInt(splitWidthInt(Discourse.SiteSettings.topic_above_post_stream_top_ad_sizes)), parseInt(splitHeightInt(Discourse.SiteSettings.topic_above_post_stream_ad_sizes))], 'div-gpt-ad-topic-above-post-stream').addService(googletag.pubads()); + var topic_above_suggested = googletag.defineSlot('/' + settings.dfp_publisher_id + '/' + settings.dfp_topic_above_suggested_code, [parseInt(splitWidthInt(Discourse.SiteSettings.topic_above_suggested_ad_sizes)), parseInt(splitHeightInt(Discourse.SiteSettings.topic_above_suggested_ad_sizes))], 'div-gpt-ad-topic-above-suggested').addService(googletag.pubads()); + var post_bottom = googletag.defineSlot('/' + settings.dfp_publisher_id + '/' + settings.dfp_post_bottom_code, [parseInt(splitWidthInt(Discourse.SiteSettings.post_bottom_ad_sizes)), parseInt(splitHeightInt(Discourse.SiteSettings.post_bottom_ad_sizes))], 'div-gpt-ad-post-bottom').addService(googletag.pubads()); + + // This sets the key and value for custom targeting + var Foo = function(key, value, googletag) { + this.locationKey = key; + this.locationValue = value; + this.googletag = googletag; + } + + // setTargeting is not defined. We want to return as a method - PROBLEM 1 + Foo.prototype.bar = function() { + return this.googletag.setTargeting(this.locationKey, this.locationValue); + } + + // This should call googletag.setTargeting(key for that location, value for that location) + function custom_targeting(key_array, value_array, location) { + var f; + for (var i = 0; i < key_array.length; i++) { + var wordValue = valueParse(value_array[i]); + f = new Foo(key_array[i], wordValue, location); + f.bar(); + } + } + if (settings.dfp_topic_list_top_code && !settings.dfp_show_topic_list_top && settings.topic_list_top_ad_sizes) { const_width = parseInt(splitWidthInt(settings.topic_list_top_ad_sizes)); const_height = parseInt(splitHeightInt(settings.topic_list_top_ad_sizes)); if (Discourse.Mobile.mobileView) { - googletag.defineSlot(settings.dfp_topic_list_top_code, [320,50], 'div-gpt-ad-topic-list-top').addService(googletag.pubads()); + googletag.defineSlot('/' + settings.dfp_publisher_id + '/' + settings.dfp_topic_list_top_code, [320,50], 'div-gpt-ad-topic-list-top').addService(googletag.pubads()); } - else { - googletag.defineSlot('/' + settings.dfp_publisher_id + '/' + settings.dfp_topic_list_top_code, [parseInt(splitWidthInt(settings.topic_list_top_ad_sizes)), parseInt(splitHeightInt(settings.topic_list_top_ad_sizes))], 'div-gpt-ad-topic-list-top') - //custom_targeting((keyParse(Discourse.SiteSettings.dfp_target_topic_list_top_key_code)), (keyParse(Discourse.SiteSettings.dfp_target_topic_list_top_value_code))) - .setTargeting('gender', 'female') - .addService(googletag.pubads()); + else { + custom_targeting((keyParse(Discourse.SiteSettings.dfp_target_topic_list_top_key_code)), (keyParse(Discourse.SiteSettings.dfp_target_topic_list_top_value_code)), topic_list_top) } } if (settings.dfp_topic_above_post_stream_code && !settings.dfp_show_topic_above_post_stream && settings.topic_above_post_stream_ad_sizes) { const_width = parseInt(splitWidthInt(settings.topic_above_post_stream_ad_sizes)); const_height = parseInt(splitHeightInt(settings.topic_above_post_stream_ad_sizes)); if (Discourse.Mobile.mobileView) { - googletag.defineSlot(settings.dfp_topic_above_post_stream_code, [320,50], 'div-gpt-ad-topic-above-post-stream').addService(googletag.pubads()); + googletag.defineSlot('/' + settings.dfp_publisher_id + '/' + settings.dfp_topic_above_post_stream_code, [320,50], 'div-gpt-ad-topic-above-post-stream').addService(googletag.pubads()); } else { - googletag.defineSlot('/' + settings.dfp_publisher_id + '/' + settings.dfp_topic_above_post_stream_code, [parseInt(splitWidthInt(settings.topic_above_post_stream_ad_sizes)), parseInt(splitHeightInt(settings.topic_above_post_stream_ad_sizes))], 'div-gpt-ad-topic-above-post-stream') - //.setTargeting(settings.dfp_target_topic_above_post_stream_key_code, valueParse(settings.dfp_target_topic_above_post_stream_value_code)) - // This hardcoded code works: .setTargeting('category', ["clothes", "handbags", "makeup"]) - .addService(googletag.pubads()); + custom_targeting((keyParse(Discourse.SiteSettings.dfp_target_topic_above_post_stream_key_code)), (keyParse(Discourse.SiteSettings.dfp_target_topic_above_post_stream_value_code)), topic_above_post_stream) } } if (settings.dfp_topic_above_suggested_code && !settings.dfp_show_topic_above_suggested && settings.topic_above_suggested_ad_sizes) { const_width = parseInt(splitWidthInt(settings.topic_above_suggested_ad_sizes)); const_height = parseInt(splitHeightInt(settings.topic_above_suggested_ad_sizes)); if (Discourse.Mobile.mobileView) { - googletag.defineSlot(settings.dfp_topic_above_suggested_code, [320,50], 'div-gpt-ad-topic-above-suggested').addService(googletag.pubads()); + googletag.defineSlot('/' + settings.dfp_publisher_id + '/' + settings.dfp_topic_above_suggested_code, [320,50], 'div-gpt-ad-topic-above-suggested').addService(googletag.pubads()); } else { - googletag.defineSlot('/' + settings.dfp_publisher_id + '/' + settings.dfp_topic_above_suggested_code, [parseInt(splitWidthInt(settings.topic_above_suggested_ad_sizes)), parseInt(splitHeightInt(settings.topic_above_suggested_ad_sizes))], 'div-gpt-ad-topic-above-suggested') - - //googletag.setTargeting(settings.dfp_target_topic_above_suggested_key_code, valueParse(settings.dfp_target_topic_above_suggested_value_code)) - // This hardcoded code works: .setTargeting('category', ["clothes", "handbags", "makeup"]) - googletag.addService(googletag.pubads()); + custom_targeting((keyParse(Discourse.SiteSettings.dfp_target_topic_above_suggested_key_code)), (keyParse(Discourse.SiteSettings.dfp_target_topic_above_suggested_value_code)), topic_above_suggested) } } if (settings.dfp_post_bottom_code && !settings.dfp_show_post_bottom && settings.post_bottom_ad_sizes) { const_width = parseInt(splitWidthInt(settings.post_bottom_ad_sizes)); const_height = parseInt(splitHeightInt(settings.post_bottom_ad_sizes)); if (Discourse.Mobile.mobileView) { - googletag.defineSlot(settings.dfp_post_bottom_code, [320,50], 'div-gpt-ad-post-bottom').addService(googletag.pubads()); + googletag.defineSlot('/' + settings.dfp_publisher_id + '/' + settings.dfp_post_bottom_code, [320,50], 'div-gpt-ad-post-bottom').addService(googletag.pubads()); } else { - googletag.defineSlot('/' + settings.dfp_publisher_id + '/' + settings.dfp_post_bottom_code, [parseInt(splitWidthInt(settings.post_bottom_ad_sizes)), parseInt(splitHeightInt(settings.post_bottom_ad_sizes))], 'div-gpt-ad-post-bottom') - //.setTargeting(settings.dfp_target_post_bottom_key_code, valueParse(settings.dfp_target_post_bottom_value_code)) - // This hardcoded code works: .setTargeting('category', ["clothes", "handbags", "makeup"]) - .addService(googletag.pubads()); + custom_targeting((keyParse(Discourse.SiteSettings.dfp_target_post_bottom_key_code)), (keyParse(Discourse.SiteSettings.dfp_target_post_bottom_value_code)), post_bottom) } } @@ -162,6 +140,8 @@ function loadGoogle(settings) { export default Ember.Component.extend({ const_width: const_width, const_height: const_height, + const_mobile_width: const_mobile_width, + const_mobile_height: const_mobile_height, classNames: ['google-dfp-ad'], loadedGoogletag: false, @@ -179,8 +159,12 @@ export default Ember.Component.extend({ }.property('const_width', 'const_height'), adWrapperStyleMobile: function() { - return `width: ${this.get('mobile_width')}px; height: ${this.get('mobile_height')}px; margin:0 auto;`.htmlSafe(); - }.property('mobile_width', 'mobile_height'), + return `width: ${this.get('const_mobile_width')}px; height: ${this.get('const_mobile_height')}px;`.htmlSafe(); + }.property('const_mobile_width', 'const_mobile_height'), + + checkTrustLevels: function() { + return !((currentUser) && (currentUser.get('trust_level') > Discourse.SiteSettings.dfp_through_trust_level)); + }.property('trust_level'), _initGoogleDFP: function() { var self = this; diff --git a/assets/javascripts/discourse/templates/components/google-adsense.hbs b/assets/javascripts/discourse/templates/components/google-adsense.hbs index ca671d9..280fdcd 100644 --- a/assets/javascripts/discourse/templates/components/google-adsense.hbs +++ b/assets/javascripts/discourse/templates/components/google-adsense.hbs @@ -3,7 +3,7 @@ + data-ad-slot={{ad_mobile_code}}> - + {{#if checkTrustLevels}} +
+ {{/if}} {{/if}} {{else}} {{#if loadedGoogletag}} - + {{#if checkTrustLevels}} + + {{/if}} {{/if}} {{/if}} \ No newline at end of file diff --git a/config/locales/client.en.yml b/config/locales/client.en.yml index e437608..2d6f20f 100755 --- a/config/locales/client.en.yml +++ b/config/locales/client.en.yml @@ -3,5 +3,5 @@ en: admin: site_settings: categories: - ad_plugin: 'Ad Plugin' + ad_plugin: 'DFP Plugin' adsense_plugin: 'Adsense Plugin' \ No newline at end of file diff --git a/config/locales/server.en.yml b/config/locales/server.en.yml index 75ff3e3..2da21dd 100755 --- a/config/locales/server.en.yml +++ b/config/locales/server.en.yml @@ -1,38 +1,48 @@ en: site_settings: dfp_publisher_id: "Put in your publisher id here" + dfp_through_trust_level: "Show your ads to users based on trust." dfp_show_topic_list_top: "Disable topic_list_top ad" dfp_topic_list_top_code: "Show leaderboard ad above topic lists." + dfp_mobile_topic_list_top_code: "Mobile - Show leaderboard ad above topic lists." topic_list_top_ad_sizes: "Choose your ad size" dfp_target_topic_list_top_key_code: "Input key values - Inventory Level" dfp_target_topic_list_top_value_code: "Input key values - Inventory Level" dfp_show_topic_above_post_stream: "Disable topic_above_post_stream ad" dfp_topic_above_post_stream_code: "Show leaderboard ad above post stream" + dfp_mobile_topic_above_post_stream_code: "Mobile - Show leaderboard ad above post stream" topic_above_post_stream_ad_sizes: "Choose your ad size" dfp_target_topic_above_post_stream_key_code: "Input key values - Inventory Level" dfp_target_topic_above_post_stream_value_code: "Input key values - Inventory Level" dfp_show_topic_above_suggested: "Disable topic_above_suggested ad" dfp_topic_above_suggested_code: "Show leaderboard ad above suggested topics" + dfp_mobile_topic_above_suggested_code: "Mobile - Show leaderboard ad above suggested topics" topic_above_suggested_ad_sizes: "Choose your ad size" dfp_target_topic_above_suggested_key_code: "Input key values - Inventory Level" dfp_target_topic_above_suggested_value_code: "Input key values - Inventory Level" dfp_show_post_bottom: "Disable post_bottom ad" dfp_post_bottom_code: "Show leaderboard ad post_bottom topics" + dfp_mobile_post_bottom_code: "Mobile - Show leaderboard ad post_bottom topics" dfp_nth_post_code: "Choose the Nth position for your ad to show" post_bottom_ad_sizes: "Choose your ad size" dfp_target_post_bottom_key_code: "Input key values - Inventory Level" dfp_target_post_bottom_value_code: "Input key values - Inventory Level" adsense_publisher_code: "Insert your Publisher ID here" + adsense_through_trust_level: "Show your ads to users based on trust." adsense_show_topic_list_top: "Disable topic_list_top ad" adsense_topic_list_top_code: "Show leaderboard ad above topic lists." + adsense_mobile_topic_list_top_code: "Mobile - Show leaderboard ad above topic lists." adsense_topic_list_top_ad_sizes: "Choose your ad sizes" adsense_show_topic_above_post_stream: "Disable topic_above_post_stream ad" adsense_topic_above_post_stream_code: "Show leaderboard ad above post stream" + adsense_mobile_topic_above_post_stream_code: "Mobile - Show leaderboard ad above post stream" adsense_topic_above_post_stream_ad_sizes: "Choose your ad sizes" adsense_show_topic_above_suggested: "Disable topic_above_suggested ad" adsense_topic_above_suggested_code: "Show leaderboard ad above suggested topics" + adsense_mobile_topic_above_suggested_code: "Mobile - Show leaderboard ad above suggested topics" adsense_topic_above_suggested_ad_sizes: "Choose your ad sizes" adsense_post_bottom_code: "Show leaderboard ad post_bottom topics" + adsense_mobile_post_bottom_code: "Mobile - Show leaderboard ad post_bottom topics" adsense_show_post_bottom: "Disable post_bottom ad" adsense_post_bottom_ad_sizes: "Choose your ad sizes" adsense_nth_post_code: "Choose the Nth position for your ad to show" \ No newline at end of file diff --git a/config/settings.yml b/config/settings.yml index 2a3d648..15fbe6f 100755 --- a/config/settings.yml +++ b/config/settings.yml @@ -2,9 +2,16 @@ adsense_plugin: adsense_publisher_code: client: true default: '' + adsense_through_trust_level: + client: true + default: 2 + enum: 'TrustLevelSetting' adsense_topic_list_top_code: client: true default: '' + adsense_mobile_topic_list_top_code: + client: true + default: '' adsense_show_topic_list_top: client: true default: false @@ -26,6 +33,9 @@ adsense_plugin: adsense_topic_above_post_stream_code: client: true default: '' + adsense_mobile_topic_above_post_stream_code: + client: true + default: '' adsense_show_topic_above_post_stream: client: true default: false @@ -47,6 +57,9 @@ adsense_plugin: adsense_topic_above_suggested_code: client: true default: '' + adsense_mobile_topic_above_suggested_code: + client: true + default: '' adsense_show_topic_above_suggested: client: true default: false @@ -68,6 +81,9 @@ adsense_plugin: adsense_post_bottom_code: client: true default: '' + adsense_mobile_post_bottom_code: + client: true + default: '' adsense_show_post_bottom: client: true default: false @@ -94,9 +110,16 @@ ad_plugin: dfp_publisher_id: client: true default: '' + dfp_through_trust_level: + client: true + default: 2 + enum: 'TrustLevelSetting' dfp_topic_list_top_code: client: true default: '' + dfp_mobile_topic_list_top_code: + client: true + default: '' topic_list_top_ad_sizes: client: true default: '728*90 - leaderboard' @@ -126,6 +149,9 @@ ad_plugin: dfp_topic_above_post_stream_code: client: true default: '' + dfp_mobile_topic_above_post_stream_code: + client: true + default: '' topic_above_post_stream_ad_sizes: client: true default: '728*90 - leaderboard' @@ -155,6 +181,9 @@ ad_plugin: dfp_topic_above_suggested_code: client: true default: '' + dfp_mobile_topic_above_suggested_code: + client: true + default: '' topic_above_suggested_ad_sizes: client: true default: '728*90 - leaderboard' @@ -184,6 +213,9 @@ ad_plugin: dfp_post_bottom_code: client: true default: '' + dfp_mobile_post_bottom_code: + client: true + default: '' dfp_nth_post_code: client: true default: ''