Adsense does't Work in TPL Files

Discussion in 'PHP' started by karangupta47, Nov 5, 2010.

  1. #1
    hi i try to post adsense code in tpl files but it's not showing can any one tell me how to post adsense code in tpl files?
     
    karangupta47, Nov 5, 2010 IP
  2. JamesColin

    JamesColin Prominent Member

    Messages:
    7,874
    Likes Received:
    164
    Best Answers:
    1
    Trophy Points:
    395
    Digital Goods:
    1
    #2
    what is a tpl file, it doesn't mean anything.
     
    JamesColin, Nov 5, 2010 IP
  3. Aleksandar Mitić

    Aleksandar Mitić Well-Known Member

    Messages:
    601
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    130
    #3
    TPL means "template", I remember when I was starting to learn php, using templates was one of the first things that I learned.

    Here's a wikipedia article too:

    http://en.wikipedia.org/wiki/Web_template

    As for the problem, I'd post it in another category, just because it's adsense related, doesn't mean it has to go in this sub-forum (you see that people are asking "what's a tpl file?" - no disrespect to you "senserely dot com", just using you as an example).

    Post in another category and I'm sure someone with the technical know how will see where the problem is. I'd like to help you but don't really have the time to go through all the code and try to debug the whole thing.
     
    Aleksandar Mitić, Nov 5, 2010 IP
  4. JamesColin

    JamesColin Prominent Member

    Messages:
    7,874
    Likes Received:
    164
    Best Answers:
    1
    Trophy Points:
    395
    Digital Goods:
    1
    #4
    I know tpl probably means template files, but template of what script, that is the question. tpl files doesn't mean anything without context.
     
    JamesColin, Nov 5, 2010 IP
  5. Aleksandar Mitić

    Aleksandar Mitić Well-Known Member

    Messages:
    601
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    130
    #5
    If you mean "script" in a cms context (wordpress, joomla, drupal etc.), that doesn't matter. If you mean by "scripting language", I'm sure it's php. And if I'd have to guess the engine itself, I'd say it's probably smarty.

    Like I said, he should try in a more relevant sub-forum with more relevant information about the site. Someone will probably have to take a look under the hood. I don't have an idea of what is going on so it's kinda pointless trying to help him until he posts more info.
     
    Last edited: Nov 5, 2010
    Aleksandar Mitić, Nov 5, 2010 IP
  6. karangupta47

    karangupta47 Peon

    Messages:
    178
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    its smarty templates i try to edit that every thing is working but when i try to post adsense and check it on live site the the ads are not displaying on my website
     
    karangupta47, Nov 5, 2010 IP
  7. JamesColin

    JamesColin Prominent Member

    Messages:
    7,874
    Likes Received:
    164
    Best Answers:
    1
    Trophy Points:
    395
    Digital Goods:
    1
    #7
    Looks like you didn't google "smarty adsense"
    I'm feeling good hearted today:
    http://www.flukeit.com/adsense-code-in-smarty/

    "
    After doing some investigating, I learned that I had to add “literal” tags around the code as such:
    {literal}
    Adsense code
    {/literal}
    "
     
    JamesColin, Nov 5, 2010 IP
    mcfox likes this.