Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

google adds code not working

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General
View previous topic :: View next topic  
Author Message
LakjaSupay
Smarty n00b


Joined: 19 Aug 2008
Posts: 4

PostPosted: Mon Feb 02, 2009 3:23 am    Post subject: google adds code not working Reply with quote

Hi, I want to put google adds on my site, but it's not showing anything at all, here's the code of my .tpl file:

Code:

<div id='googleItems'>
        {literal}
   <script type='text/javascript'>
   google_ad_client = 'pub-xxxxxxxxxxxxxxxx';
   google_ad_slot = '111111111111';
   google_ad_width = 200;
       google_ad_height = 200;
   </script>
   <script type='text/javascript' src='http://pagead2.googlesyndication/pagead/show_ads.js'>
   </script>
   {/literal}
 </div>


can somebody plz give me hand and let me know what am I doing wrong??
thx in advance
Back to top
View user's profile Send private message
mohrt
Administrator


Joined: 16 Apr 2003
Posts: 7368
Location: Lincoln Nebraska, USA

PostPosted: Mon Feb 02, 2009 4:47 am    Post subject: Reply with quote

Since there are no curly braces {} in the google code, {literal} tags should not be necessary. The google code should work as-is. I think the google ads do not show up instantly when you first put it in, give it a bit.

View your browser source and see that it is there as it should be. If so, then smarty is working fine.
Back to top
View user's profile Send private message Visit poster's website
LakjaSupay
Smarty n00b


Joined: 19 Aug 2008
Posts: 4

PostPosted: Wed Feb 04, 2009 4:46 am    Post subject: still not working... Reply with quote

I took out the curly braces nd nothing, I even tried this on my index.tpl file:
Code:

{include file="googleAdds.tpl"}


Code:

{php} global $smarty;$smarty->display("googleAdds.tpl"); {/php}


nd put the google adds javascript code on the googleAdds.tpl file, but still won't work.
I took a look at the page code nd the scripts are printed there any way I try, ...but nothing, no adds.
any other ideas plz??
Back to top
View user's profile Send private message
Kryllster
Smarty Rookie


Joined: 22 Sep 2007
Posts: 25

PostPosted: Fri Feb 06, 2009 9:42 pm    Post subject: I tried this Reply with quote

When I first started using smarty I had to include a script that was a mix of different languages. If I remember correctly I used something like what is on this page

http://www.phpinsider.com/smarty-forum/viewtopic.php?t=11912&highlight=

Hope this helps??

Rolling Eyes
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP