changeset 11:da006a8e2c2b

duplicate ad modules
author raven <mazdarulez@hotmail.com>
date Tue, 20 Aug 2019 12:50:15 +1000
parents 02b2fdfc07e2
children 3b057845e2a7
files src/nabble/modules/naml/ads_auto_1.naml src/nabble/modules/naml/ads_manual_1.naml
diffstat 2 files changed, 237 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/nabble/modules/naml/ads_auto_1.naml	Tue Aug 20 12:50:15 2019 +1000
@@ -0,0 +1,87 @@
+<macro name="auto_ads">
+<script async="true" src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
+<script>
+	var nbl_showAds = !(window.nbl_canHideAds && window.localStorage && localStorage.nbl_noAds);
+	if(nbl_showAds) {
+		(adsbygoogle = window.adsbygoogle || []).push({
+			google_ad_client: "ca-pub-6750305871516672",
+			enable_page_level_ads: true
+		});
+	}
+</script>
+</macro>
+
+<override_macro name="topic_html" requires="servlet">
+    <n.topic_min_html>
+        <head>
+            <n.topic_common_head/>
+            <n.topic_head/>
+            <n.topic_meta/>
+            <n.increment_view_count/>
+						<n.auto_ads/>
+        </head>
+        <body>
+            <table width="100%" cellpadding="0" style="border-collapse:collapse">
+                <tr>
+                    <td></td>
+                    <td>
+                        <n.page_node.topic_hardcoded_notices/>
+                        <n.newsflash/>
+                        <n.topic_header/>
+                        <n.topic_controls/>
+                    </td>
+                </tr>
+                <tr valign="top">
+                    <td>
+                    </td>
+                    <td>
+                        <n.topic_contents.view_contents.page_node.topic_rows/>
+                        <n.topic_footer/>
+                    </td>
+                </tr>
+            </table>
+       </body>
+    </n.topic_min_html>
+</override_macro>
+
+<override_macro name="view_standard_page">
+    <n.set_app_rows_per_page rows_per_page="[n.forum_topics_per_page/]"/>
+    <n.app_html>
+        <head>
+            <n.app_title />
+            <n.standard_table_stylesheet/>
+						<n.auto_ads/>
+        </head>
+        <body>
+            <n.new_topic_action_link/>
+            <n.topics_action_link only_if_has_subapps="true"/>
+            <n.people_action_link/>
+            <n.options_action_menu/>
+            <n.app_child_pagination margin=".8em .3em .5em 0"/>
+            <n.standard_table.standard_table_columns />
+            <n.app_child_pagination margin=".8em .3em .5em 0"/>
+            <n.forum_footer/>
+        </body>
+    </n.app_html>
+</override_macro>
+
+<override_macro name="view_topics_page">
+    <n.set_app_rows_per_page rows_per_page="[n.forum_topics_per_page/]"/>
+    <n.app_html>
+        <head>
+            <n.app_title/>
+            <n.topics_table_stylesheet/>
+						<n.auto_ads/>
+        </head>
+        <body>
+            <n.new_topic_action_link/>
+            <n.subapps_action_link/>
+            <n.people_action_link/>
+            <n.options_action_menu/>
+            <n.app_topic_pagination margin=".8em .3em .5em 0"/>
+            <n.topics_table.topics_table_columns />
+            <n.app_topic_pagination margin=".8em .3em .5em 0"/>
+            <n.forum_footer/>
+        </body>
+    </n.app_html>
+</override_macro>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/nabble/modules/naml/ads_manual_1.naml	Tue Aug 20 12:50:15 2019 +1000
@@ -0,0 +1,150 @@
+<static>
+    ins
+</static>
+
+<macro name="auto_ads">
+<script async="true" src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
+<script>
+	var nbl_showAds = !(window.nbl_canHideAds && window.localStorage && localStorage.nbl_noAds);
+	if(nbl_showAds) {
+		(adsbygoogle = window.adsbygoogle || []).push({
+			google_ad_client: "ca-pub-6750305871516672",
+			enable_page_level_ads: true
+		});
+	}
+</script>
+</macro>
+
+<macro name="vertical_ad">
+<script async="true" src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
+<!-- wide skyscraper -->
+<ins class="adsbygoogle"
+     style="display:block;width:160px;height:600px"
+     data-ad-client="ca-pub-6750305871516672"
+     data-ad-slot="8020766188"></ins>
+</macro>
+
+<macro name="ad_responsive_top">
+    <script async="true" src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
+    <!-- responsive-top -->
+    <ins class="adsbygoogle"
+    style="display:block"
+    data-ad-client="ca-pub-6750305871516672"
+    data-ad-slot="6982128634"
+    data-ad-format="horizontal"
+    data-full-width-responsive="true"></ins>
+</macro>
+
+<override_macro name="topic_html" requires="servlet">
+    <n.topic_min_html>
+        <head>
+            <n.topic_common_head/>
+            <n.topic_head/>
+            <n.topic_meta/>
+            <n.increment_view_count/>
+						<n.auto_ads/>
+        </head>
+        <body>
+					<div class="ad-responsive-top" style="margin-top:10px;margin-bottom:10px;text-align:center">
+						<n.ad_responsive_top/>
+						<script>
+							var nbl_showAds = !(window.nbl_canHideAds && window.localStorage && localStorage.nbl_noAds);
+							if(nbl_showAds) {
+								(adsbygoogle = window.adsbygoogle || []).push({});
+							}
+						</script>
+					</div>
+            <table width="100%" cellpadding="0" style="border-collapse:collapse">
+                <tr>
+                    <td></td>
+                    <td>
+                        <n.page_node.topic_hardcoded_notices/>
+                        <n.newsflash/>
+                        <n.topic_header/>
+                        <n.topic_controls/>
+                    </td>
+                </tr>
+                <tr valign="top">
+                    <td class="vertical-ad" width="170px" style="padding-top:1em">
+                        <n.vertical_ad/>
+                    </td>
+                    <td>
+                        <n.topic_contents.view_contents.page_node.topic_rows/>
+                        <n.topic_footer/>
+                    </td>
+                </tr>
+            </table>
+             <script>
+                var nbl_showAds = !(window.nbl_canHideAds && window.localStorage && localStorage.nbl_noAds);
+                if( window.innerWidth >= 800 && nbl_showAds) {
+                    (adsbygoogle = window.adsbygoogle || []).push({});
+                } else {
+                    document.querySelector('.vertical-ad ins.adsbygoogle').style.width = 0;
+                    document.querySelector('td.vertical-ad').style.width = 0;
+                }
+            </script>
+       </body>
+    </n.topic_min_html>
+</override_macro>
+
+<override_macro name="view_standard_page">
+    <n.set_app_rows_per_page rows_per_page="[n.forum_topics_per_page/]"/>
+    <n.app_html>
+        <head>
+            <n.app_title />
+            <n.standard_table_stylesheet/>
+						<n.auto_ads/>
+        </head>
+        <body>
+            <div class="ad-responsive-top" style="margin-top:10px;margin-bottom:10px;text-align:center">
+                <n.ad_responsive_top/>
+            </div>
+            <n.new_topic_action_link/>
+            <n.topics_action_link only_if_has_subapps="true"/>
+            <n.people_action_link/>
+            <n.options_action_menu/>
+
+            <n.app_child_pagination margin=".8em .3em .5em 0"/>
+            <n.standard_table.standard_table_columns />
+            <n.app_child_pagination margin=".8em .3em .5em 0"/>
+            <n.forum_footer/>
+						<script>
+							var nbl_showAds = !(window.nbl_canHideAds && window.localStorage && localStorage.nbl_noAds);
+							if(nbl_showAds) {
+								(adsbygoogle = window.adsbygoogle || []).push({});
+							}
+						</script>
+        </body>
+    </n.app_html>
+</override_macro>
+
+<override_macro name="view_topics_page">
+    <n.set_app_rows_per_page rows_per_page="[n.forum_topics_per_page/]"/>
+    <n.app_html>
+        <head>
+            <n.app_title/>
+            <n.topics_table_stylesheet/>
+						<n.auto_ads/>
+        </head>
+        <body>
+						<div class="ad-responsive-top" style="margin-top:10px;margin-bottom:10px;text-align:center">
+							<n.ad_responsive_top/>
+						</div>
+            <n.new_topic_action_link/>
+            <n.subapps_action_link/>
+            <n.people_action_link/>
+            <n.options_action_menu/>
+
+            <n.app_topic_pagination margin=".8em .3em .5em 0"/>
+            <n.topics_table.topics_table_columns />
+            <n.app_topic_pagination margin=".8em .3em .5em 0"/>
+            <n.forum_footer/>
+						<script>
+							var nbl_showAds = !(window.nbl_canHideAds && window.localStorage && localStorage.nbl_noAds);
+							if(nbl_showAds) {
+								(adsbygoogle = window.adsbygoogle || []).push({});
+							}
+						</script>
+        </body>
+    </n.app_html>
+</override_macro>