FIX: showing ads on mobile when mobile ad units are not defined

This commit is contained in:
Neil Lalonde 2016-11-17 11:45:18 -05:00
parent 883d5ecd85
commit 910b0d0e4c
4 changed files with 93 additions and 33 deletions

View File

@ -1,9 +1,21 @@
{{#if siteSettings.adsense_topic_list_top_code}}
{{google-adsense placement="topic-list-top"}}
{{/if}}
{{#if siteSettings.dfp_topic_list_top_code}}
{{google-dfp-ad placement="topic-list-top" refreshOnChange=loading category=category.slug}}
{{/if}}
{{#if siteSettings.amazon_topic_list_top_src_code}}
{{amazon-product-links placement="topic-list-top"}}
{{#if site.mobileView}}
{{#if siteSettings.adsense_mobile_topic_list_top_code}}
{{google-adsense placement="topic-list-top"}}
{{/if}}
{{#if siteSettings.dfp_mobile_topic_list_top_code}}
{{google-dfp-ad placement="topic-list-top" refreshOnChange=loading category=category.slug}}
{{/if}}
{{#if siteSettings.amazon_mobile_topic_list_top_src_code}}
{{amazon-product-links placement="topic-list-top"}}
{{/if}}
{{else}}
{{#if siteSettings.adsense_topic_list_top_code}}
{{google-adsense placement="topic-list-top"}}
{{/if}}
{{#if siteSettings.dfp_topic_list_top_code}}
{{google-dfp-ad placement="topic-list-top" refreshOnChange=loading category=category.slug}}
{{/if}}
{{#if siteSettings.amazon_topic_list_top_src_code}}
{{amazon-product-links placement="topic-list-top"}}
{{/if}}
{{/if}}

View File

@ -1,9 +1,33 @@
{{#if postSpecificCountAdsense}}
{{google-adsense placement="post-bottom" postNumber=post_number}}
{{/if}}
{{#if postSpecificCountDFP}}
{{google-dfp-ad placement="post-bottom" category=topic.category.slug postNumber=post_number}}
{{/if}}
{{#if postSpecificCountAmazon}}
{{amazon-product-links placement="post-bottom" postNumber=post_number}}
{{/if}}
{{#if site.mobileView}}
{{#if postSpecificCountAdsense}}
{{#if siteSettings.adsense_mobile_post_bottom_code}}
{{google-adsense placement="post-bottom" postNumber=post_number}}
{{/if}}
{{/if}}
{{#if postSpecificCountDFP}}
{{#if siteSettings.dfp_mobile_post_bottom_code}}
{{google-dfp-ad placement="post-bottom" category=topic.category.slug postNumber=post_number}}
{{/if}}
{{/if}}
{{#if postSpecificCountAmazon}}
{{#if siteSettings.amazon_mobile_post_bottom_src_code}}
{{amazon-product-links placement="post-bottom" postNumber=post_number}}
{{/if}}
{{/if}}
{{else}}
{{#if postSpecificCountAdsense}}
{{#if siteSettings.adsense_post_bottom_code}}
{{google-adsense placement="post-bottom" postNumber=post_number}}
{{/if}}
{{/if}}
{{#if postSpecificCountDFP}}
{{#if siteSettings.dfp_post_bottom_code}}
{{google-dfp-ad placement="post-bottom" category=topic.category.slug postNumber=post_number}}
{{/if}}
{{/if}}
{{#if postSpecificCountAmazon}}
{{#if siteSettings.amazon_post_bottom_src_code}}
{{amazon-product-links placement="post-bottom" postNumber=post_number}}
{{/if}}
{{/if}}
{{/if}}

View File

@ -1,9 +1,21 @@
{{#if siteSettings.adsense_topic_above_post_stream_code}}
{{google-adsense placement="topic-above-post-stream"}}
{{/if}}
{{#if siteSettings.dfp_topic_above_post_stream_code}}
{{google-dfp-ad placement="topic-above-post-stream" refreshOnChange=model.id category=model.category.slug}}
{{/if}}
{{#if siteSettings.amazon_topic_above_post_stream_src_code}}
{{amazon-product-links placement="topic-above-post-stream"}}
{{#if site.mobileView}}
{{#if siteSettings.adsense_mobile_topic_above_post_stream_code}}
{{google-adsense placement="topic-above-post-stream"}}
{{/if}}
{{#if siteSettings.dfp_mobile_topic_above_post_stream_code}}
{{google-dfp-ad placement="topic-above-post-stream" refreshOnChange=model.id category=model.category.slug}}
{{/if}}
{{#if siteSettings.amazon_mobile_topic_above_post_stream_src_code}}
{{amazon-product-links placement="topic-above-post-stream"}}
{{/if}}
{{else}}
{{#if siteSettings.adsense_topic_above_post_stream_code}}
{{google-adsense placement="topic-above-post-stream"}}
{{/if}}
{{#if siteSettings.dfp_topic_above_post_stream_code}}
{{google-dfp-ad placement="topic-above-post-stream" refreshOnChange=model.id category=model.category.slug}}
{{/if}}
{{#if siteSettings.amazon_topic_above_post_stream_src_code}}
{{amazon-product-links placement="topic-above-post-stream"}}
{{/if}}
{{/if}}

View File

@ -1,9 +1,21 @@
{{#if siteSettings.adsense_topic_above_suggested_code}}
{{google-adsense placement="topic-above-suggested"}}
{{/if}}
{{#if siteSettings.dfp_topic_above_suggested_code}}
{{google-dfp-ad placement="topic-above-suggested" refreshOnChange=model.id category=model.category.slug}}
{{/if}}
{{#if siteSettings.amazon_topic_above_suggested_src_code}}
{{amazon-product-links placement="topic-above-suggested"}}
{{#if site.mobileView}}
{{#if siteSettings.adsense_mobile_topic_above_suggested_code}}
{{google-adsense placement="topic-above-suggested"}}
{{/if}}
{{#if siteSettings.dfp_mobile_topic_above_suggested_code}}
{{google-dfp-ad placement="topic-above-suggested" refreshOnChange=model.id category=model.category.slug}}
{{/if}}
{{#if siteSettings.amazon_mobile_topic_above_suggested_src_code}}
{{amazon-product-links placement="topic-above-suggested"}}
{{/if}}
{{else}}
{{#if siteSettings.adsense_topic_above_suggested_code}}
{{google-adsense placement="topic-above-suggested"}}
{{/if}}
{{#if siteSettings.dfp_topic_above_suggested_code}}
{{google-dfp-ad placement="topic-above-suggested" refreshOnChange=model.id category=model.category.slug}}
{{/if}}
{{#if siteSettings.amazon_topic_above_suggested_src_code}}
{{amazon-product-links placement="topic-above-suggested"}}
{{/if}}
{{/if}}