Move ads into separate template
authorDavid Bartley <dtbartle@csclub.uwaterloo.ca>
Wed, 12 Sep 2007 22:02:25 +0000 (18:02 -0400)
committerDavid Bartley <dtbartle@csclub.uwaterloo.ca>
Wed, 12 Sep 2007 22:02:25 +0000 (18:02 -0400)
xsl/functions.xsl
xsl/media.xsl

index e0ce8fe..f1f7543 100644 (file)
   <xsl:value-of select="concat($term_text, $date_year)" />
 </xsl:function>
 
+<xsl:template name="inline-ads">
+<!-- google ads -->
+<p>
+  <script type="text/javascript">
+    google_ad_client = "pub-5235744946475097";
+    google_ad_width = 728;
+    google_ad_height = 90;
+    google_ad_format = "728x90_as";
+    google_ad_type = "text_image";
+    //2007-03-21: mcc
+    google_ad_channel = "1106187834";
+  </script>
+  <script type="text/javascript"
+      src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
+    <xsl:text> </xsl:text>
+  </script>
+</p>
+</xsl:template>
+
 </xsl:stylesheet>
index 24e2372..79d8eb4 100644 (file)
           </script>
         </p>
         <xsl:if test="$ads">
-          <!-- google ads -->
-          <p>
-            <script type="text/javascript">
-              google_ad_client = "pub-5235744946475097";
-              google_ad_width = 728;
-              google_ad_height = 90;
-              google_ad_format = "728x90_as";
-              google_ad_type = "text_image";
-              //2007-03-21: mcc
-              google_ad_channel = "1106187834";
-            </script>
-            <script type="text/javascript"
-              src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
-              <xsl:text> </xsl:text>
-            </script>
-          </p>
+          <xsl:call-template name="inline-ads" />
         </xsl:if>
         <xsl:call-template name="footer" />
       </div></body>