diff --git a/assets/javascripts/discourse/components/google-adsense.js.es6 b/assets/javascripts/discourse/components/google-adsense.js.es6 index b1626ce..585d3da 100644 --- a/assets/javascripts/discourse/components/google-adsense.js.es6 +++ b/assets/javascripts/discourse/components/google-adsense.js.es6 @@ -52,7 +52,6 @@ var data = { if (Discourse.SiteSettings.adsense_publisher_code) { - if (!Discourse.SiteSettings.adsense_show_topic_list_top) { 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)); @@ -61,8 +60,6 @@ if (Discourse.SiteSettings.adsense_publisher_code) { 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_show_topic_above_post_stream) { if (!Discourse.Mobile.mobileView && Discourse.SiteSettings.adsense_topic_above_post_stream_code) { 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)); @@ -71,8 +68,6 @@ if (Discourse.SiteSettings.adsense_publisher_code) { if (Discourse.Mobile.mobileView && Discourse.SiteSettings.adsense_mobile_topic_above_post_stream_code) { data["topic-above-post-stream"]["ad_mobile_code"] = Discourse.SiteSettings.adsense_mobile_topic_above_post_stream_code; } - } - if (!Discourse.SiteSettings.adsense_show_topic_above_suggested) { if (!Discourse.Mobile.mobileView && Discourse.SiteSettings.adsense_topic_above_suggested_code) { 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)); @@ -81,8 +76,6 @@ if (Discourse.SiteSettings.adsense_publisher_code) { if (Discourse.Mobile.mobileView && Discourse.SiteSettings.adsense_mobile_topic_above_suggested_code) { data["topic-above-suggested"]["ad_mobile_code"] = Discourse.SiteSettings.adsense_mobile_topic_above_suggested_code; } - } - if (!Discourse.SiteSettings.adsense_show_post_bottom) { if (!Discourse.Mobile.mobileView && Discourse.SiteSettings.adsense_post_bottom_code) { 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)); @@ -91,7 +84,6 @@ if (Discourse.SiteSettings.adsense_publisher_code) { if (Discourse.Mobile.mobileView && Discourse.SiteSettings.adsense_mobile_post_bottom_code) { data["post-bottom"]["ad_mobile_code"] = Discourse.SiteSettings.adsense_mobile_post_bottom_code; } - } } diff --git a/assets/javascripts/discourse/components/google-dfp-ad.js.es6 b/assets/javascripts/discourse/components/google-dfp-ad.js.es6 index 0114c6e..7c9cac3 100755 --- a/assets/javascripts/discourse/components/google-dfp-ad.js.es6 +++ b/assets/javascripts/discourse/components/google-dfp-ad.js.es6 @@ -76,7 +76,7 @@ function loadGoogle(settings) { } } - if (settings.dfp_topic_list_top_code && !settings.dfp_show_topic_list_top && settings.dfp_topic_list_top_ad_sizes) { + if (settings.dfp_topic_list_top_code && settings.dfp_topic_list_top_ad_sizes) { const_width = parseInt(splitWidthInt(settings.dfp_topic_list_top_ad_sizes)); const_height = parseInt(splitHeightInt(settings.dfp_topic_list_top_ad_sizes)); if (Discourse.Mobile.mobileView) { @@ -88,7 +88,7 @@ function loadGoogle(settings) { 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.dfp_topic_above_post_stream_ad_sizes) { + if (settings.dfp_topic_above_post_stream_code && settings.dfp_topic_above_post_stream_ad_sizes) { const_width = parseInt(splitWidthInt(settings.dfp_topic_above_post_stream_ad_sizes)); const_height = parseInt(splitHeightInt(settings.dfp_topic_above_post_stream_ad_sizes)); if (Discourse.Mobile.mobileView) { @@ -100,7 +100,7 @@ function loadGoogle(settings) { 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.dfp_topic_above_suggested_ad_sizes) { + if (settings.dfp_topic_above_suggested_code && settings.dfp_topic_above_suggested_ad_sizes) { const_width = parseInt(splitWidthInt(settings.dfp_topic_above_suggested_ad_sizes)); const_height = parseInt(splitHeightInt(settings.dfp_topic_above_suggested_ad_sizes)); if (Discourse.Mobile.mobileView) { @@ -112,7 +112,7 @@ function loadGoogle(settings) { 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.dfp_post_bottom_ad_sizes) { + if (settings.dfp_post_bottom_code && settings.dfp_post_bottom_ad_sizes) { const_width = parseInt(splitWidthInt(settings.dfp_post_bottom_ad_sizes)); const_height = parseInt(splitHeightInt(settings.dfp_post_bottom_ad_sizes)); if (Discourse.Mobile.mobileView) { diff --git a/config/locales/server.en.yml b/config/locales/server.en.yml index f45eee0..576bdbf 100755 --- a/config/locales/server.en.yml +++ b/config/locales/server.en.yml @@ -2,25 +2,21 @@ en: site_settings: dfp_publisher_id: "Input your publisher ID" dfp_through_trust_level: "Show your ads to users based on trust levels" - dfp_show_topic_list_top: "Disable ad at topic list top location" dfp_topic_list_top_code: "Enter ad code to display at topic list top location" dfp_mobile_topic_list_top_code: "Enter ad code to display mobile ads at topic list top location" dfp_topic_list_top_ad_sizes: "Choose your ad size" dfp_target_topic_list_top_key_code: "Input custom targeting keys - inventory Level" dfp_target_topic_list_top_value_code: "Input custom targeting values - inventory Level" - dfp_show_topic_above_post_stream: "Disable ad at topic above post stream location" dfp_topic_above_post_stream_code: "Enter ad code to display at topic above post stream location" dfp_mobile_topic_above_post_stream_code: "Enter ad code to display mobile ads at topic above post stream location" dfp_topic_above_post_stream_ad_sizes: "Choose your ad size" dfp_target_topic_above_post_stream_key_code: "Input custom targeting keys - inventory Level" dfp_target_topic_above_post_stream_value_code: "Input custom targeting values - inventory Level" - dfp_show_topic_above_suggested: "Disable ad at topic above suggested location" dfp_topic_above_suggested_code: "Enter ad code to display at topic above suggested location" dfp_mobile_topic_above_suggested_code: "Enter ad code to display mobile ads at topic above suggested location" dfp_topic_above_suggested_ad_sizes: "Choose your ad size" dfp_target_topic_above_suggested_key_code: "Input custom targeting keys - inventory Level" dfp_target_topic_above_suggested_value_code: "Input custom targeting values - inventory Level" - dfp_show_post_bottom: "Disable ad at post bottom location" dfp_post_bottom_code: "Enter ad code to display at post bottom location" dfp_mobile_post_bottom_code: "Enter ad code to display mobile ads at post bottom location" dfp_nth_post_code: "Choose a post number for your ad to show in the post bottom location - this is the nth post" @@ -29,19 +25,15 @@ en: dfp_target_post_bottom_value_code: "Input custom targeting values - inventory Level" adsense_publisher_code: "Input your publisher ID" adsense_through_trust_level: "Show your ads to users based on trust levels" - adsense_show_topic_list_top: "Disable ad at topic list top location" adsense_topic_list_top_code: "Enter ad code to display at topic list top location" adsense_mobile_topic_list_top_code: "Enter ad code to display mobile ads at topic list top location" adsense_topic_list_top_ad_sizes: "Choose your ad sizes" - adsense_show_topic_above_post_stream: "Disable ad at topic above post stream location" adsense_topic_above_post_stream_code: "Enter ad code to display at topic above post stream location" adsense_mobile_topic_above_post_stream_code: "Enter ad code to display mobile ads at topic above post stream location" adsense_topic_above_post_stream_ad_sizes: "Choose your ad sizes" - adsense_show_topic_above_suggested: "Disable ad at topic above suggested location" adsense_topic_above_suggested_code: "Enter ad code to display at topic above suggested location" adsense_mobile_topic_above_suggested_code: "Enter ad code to display mobile ads at topic above suggested location" adsense_topic_above_suggested_ad_sizes: "Choose your ad sizes" - adsense_show_post_bottom: "Disable ad at post bottom location" adsense_post_bottom_code: "Enter ad code to display ads at post bottom location" adsense_mobile_post_bottom_code: "Enter ad code to display mobile ads at post bottom location" adsense_post_bottom_ad_sizes: "Choose your ad sizes" diff --git a/config/locales/server.es.yml b/config/locales/server.es.yml index 03178a6..827307e 100755 --- a/config/locales/server.es.yml +++ b/config/locales/server.es.yml @@ -2,25 +2,21 @@ es: site_settings: dfp_publisher_id: "Ingrese su ID de editor" dfp_through_trust_level: "Muestre sus anuncios a los usuarios basados ​​en los niveles de confianza" - dfp_show_topic_list_top: "Desactivar anuncio situado encima de la lista de temas" dfp_topic_list_top_code: "Ingrese su código de anuncio para mostrar por encima de la lista de temas" dfp_mobile_topic_list_top_code: "Ingrese su móvil Código del anuncio para ver por encima de la lista de temas" dfp_topic_list_top_ad_sizes: "Seleccione el tamaño de tu anuncio" dfp_target_topic_list_top_key_code: "Llaves de entrada para la orientación personalizada en el nivel de inventario" dfp_target_topic_list_top_value_code: "Los valores de entrada para la orientación personalizada en el nivel de inventario" - dfp_show_topic_above_post_stream: "Desactivar anuncio situado en la página de los temas por encima de la relación de puestos" dfp_topic_above_post_stream_code: "Ingrese su código de anuncio para mostrar en la página de los temas por encima de la relación de puestos" dfp_mobile_topic_above_post_stream_code: "Ingrese su móvil Código del anuncio para ver en la página de los temas por encima de la relación de puestos" dfp_topic_above_post_stream_ad_sizes: "Seleccione el tamaño de tu anuncio" dfp_target_topic_above_post_stream_key_code: "Llaves de entrada para la orientación personalizada en el nivel de inventario" dfp_target_topic_above_post_stream_value_code: "Los valores de entrada para la orientación personalizada en el nivel de inventario" - dfp_show_topic_above_suggested: "Desactivar anuncio situado encima de temas sugeridos" dfp_topic_above_suggested_code: "Ingrese su código de anuncio para mostrar por encima de temas sugeridos" dfp_mobile_topic_above_suggested_code: "Ingrese su móvil Código del anuncio para ver por encima de temas sugeridos" dfp_topic_above_suggested_ad_sizes: "Seleccione el tamaño de tu anuncio" dfp_target_topic_above_suggested_key_code: "Llaves de entrada para la orientación personalizada en el nivel de inventario" dfp_target_topic_above_suggested_value_code: "Los valores de entrada para la orientación personalizada en el nivel de inventario" - dfp_show_post_bottom: "Desactivar anuncio al final de un puesto" dfp_post_bottom_code: "Ingrese su código de anuncio para mostrar al final de un puesto" dfp_mobile_post_bottom_code: "Ingrese su móvil Código del anuncio para ver al final de un puesto" dfp_nth_post_code: "Elija un número de correos para su anuncio para mostrar al final de ese puesto" @@ -29,21 +25,17 @@ es: dfp_target_post_bottom_value_code: "Los valores de entrada para la orientación personalizada en el nivel de inventario" adsense_publisher_code: "Ingrese su ID de editor" adsense_through_trust_level: "Muestre sus anuncios a los usuarios basados ​​en los niveles de confianza" - adsense_show_topic_list_top: "Desactivar anuncio situado encima de la lista de temas" adsense_topic_list_top_code: "Ingrese su código de anuncio para mostrar por encima de la lista de temas" adsense_mobile_topic_list_top_code: "Ingrese su móvil Código del anuncio para ver por encima de la lista de temas" adsense_topic_list_top_ad_sizes: "Seleccione el tamaño de tu anuncio" - adsense_show_topic_above_post_stream: "Desactivar anuncio situado en la página de los temas por encima de la relación de puestos" adsense_topic_above_post_stream_code: "Ingrese su código de anuncio para mostrar en la página de los temas por encima de la relación de puestos" adsense_mobile_topic_above_post_stream_code: "Ingrese su móvil Código del anuncio para ver en la página de los temas por encima de la relación de puestos" adsense_topic_above_post_stream_ad_sizes: "Seleccione el tamaño de tu anuncio" - adsense_show_topic_above_suggested: "Desactivar anuncio situado encima de temas sugeridos" adsense_topic_above_suggested_code: "Ingrese su código de anuncio para mostrar por encima de temas sugeridos" adsense_mobile_topic_above_suggested_code: "Ingrese su móvil Código del anuncio para ver por encima de temas sugeridos" adsense_topic_above_suggested_ad_sizes: "Seleccione el tamaño de tu anuncio" adsense_post_bottom_code: "Ingrese su código de anuncio para mostrar al final de un puesto" adsense_mobile_post_bottom_code: "Ingrese su móvil Código del anuncio para ver al final de un puesto" - adsense_show_post_bottom: "Desactivar anuncio al final de un puesto" adsense_post_bottom_ad_sizes: "Seleccione el tamaño de tu anuncio" adsense_nth_post_code: "Elija un número de correos para su anuncio para mostrar al final de ese puesto" amazon_through_trust_level: "Muestre sus anuncios a los usuarios basados ​​en los niveles de confianza" diff --git a/config/settings.yml b/config/settings.yml index 8a7ce29..23a7d9b 100755 --- a/config/settings.yml +++ b/config/settings.yml @@ -12,9 +12,6 @@ adsense_plugin: adsense_mobile_topic_list_top_code: client: true default: '' - adsense_show_topic_list_top: - client: true - default: false adsense_topic_list_top_ad_sizes: client: true default: '728*90 - leaderboard' @@ -36,9 +33,6 @@ adsense_plugin: adsense_mobile_topic_above_post_stream_code: client: true default: '' - adsense_show_topic_above_post_stream: - client: true - default: false adsense_topic_above_post_stream_ad_sizes: client: true default: '728*90 - leaderboard' @@ -60,9 +54,6 @@ adsense_plugin: adsense_mobile_topic_above_suggested_code: client: true default: '' - adsense_show_topic_above_suggested: - client: true - default: false adsense_topic_above_suggested_ad_sizes: client: true default: '728*90 - leaderboard' @@ -84,9 +75,6 @@ adsense_plugin: adsense_mobile_post_bottom_code: client: true default: '' - adsense_show_post_bottom: - client: true - default: false adsense_post_bottom_ad_sizes: client: true default: '728*90 - leaderboard' @@ -139,9 +127,6 @@ dfp_plugin: default: '' type: value_list client: true - dfp_show_topic_list_top: - client: true - default: false dfp_topic_above_post_stream_code: client: true default: '' @@ -163,9 +148,6 @@ dfp_plugin: - 180*150 - small rectangle - 200*200 - small square - 250*250 - square - dfp_show_topic_above_post_stream: - client: true - default: false dfp_target_topic_above_post_stream_key_code: default: '' type: value_list @@ -195,9 +177,6 @@ dfp_plugin: - 180*150 - small rectangle - 200*200 - small square - 250*250 - square - dfp_show_topic_above_suggested: - client: true - default: false dfp_target_topic_above_suggested_key_code: default: '' type: value_list @@ -226,9 +205,6 @@ dfp_plugin: - 970*90 - large leaderboard - 468*60 - banner - 234*60 - half banner - dfp_show_post_bottom: - client: true - default: false dfp_target_post_bottom_key_code: default: '' type: value_list @@ -241,7 +217,8 @@ dfp_plugin: amazon_plugin: amazon_through_trust_level: client: true - default: 2 + default: 2 + enum: 'TrustLevelSetting' amazon_topic_list_top_src_code: client: true default: ''