View Single Post
  #17 (permalink)  
Old 03-09-2007, 02:42 PM
Critter183 Critter183 is offline
Pligg Donor
 
Join Date: Mar 2007
Posts: 34
Thanks: 8
Thanked 3 Times in 3 Posts
Awesome trick!

I had placed a table in header.tpl of my YGET template, and inserted my google code there, along side my logo image. The trouble was it showed on every page.

I took your "if" argument, and used it around my google code and it works like a charm. The only problem I had was when I first did it, using the " " around the pagenames I got a MySQL error. I changed the " " to ' ' and all was well. My mods to header.tpl began after line 36.

PHP Code:
Line 36: </div>
<!-- 
My Mods Begin Here  -->
<
p>&nbsp;</p>
<
table border="0" cellpadding="4" width="100%"><tr>
<
td align="center" valign="top">
<
img src="http://www.mydomain.com/templates/yget/images/logo.jpg" alt="MyLogo" />
</
td>
<
td align="center" valign="top">
{if 
$pagename eq 'index' || $pagename eq 'story' || $pagename eq 'search' || $pagename eq 'upcoming'}
<
script type="text/javascript"><!--
google_ad_client "pub-xxxxxxxxxxxxxxxx";
google_ad_width 728;
google_ad_height 90;
google_ad_format "728x90_as";
google_ad_type "text";
google_ad_channel "";
google_color_border "FFFFFF";
google_color_bg "FFFFFF";
google_color_link "E1771E";
google_color_text "000000";
google_color_url "940F04";
//--></script>
<script type="text/javascript"
  
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
{/if}
</td></tr></table>
<p>&nbsp;</p>
<!-- My Mods End Here  -->
<div id="cab">
    <ul class="postin"> 
I also added: || $pagename eq 'upcoming' to the list.

Last edited by Critter183; 03-09-2007 at 02:59 PM..
Reply With Quote
The Following User Says Thank You to Critter183 For This Useful Post: