1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Preserve newlines in PHP .tpl file

Discussion in 'HTML & Website Design' started by batman4444, Aug 28, 2007.

  1. #1
    I am trying to modify a php directory script to add google adwords. However whenever i add the adwords script into the .tpl file it removes all the newlines or carriage return or whatever they are called.
    It appears that this is why the adwords script is not working,

    any ideas on how to preserve the newlines within the .tpl file?
    thanks


    here is the .tpl file im trying to edit and believe what needs to be done is add newlines to the the end of each line of the google script, however \n does not work,


     
    batman4444, Aug 28, 2007 IP
  2. tmeyer45458

    tmeyer45458 Peon

    Messages:
    355
    Likes Received:
    45
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Add {literal} tags around adsense javascript:

    {literal}

    Script for adsense

    {/literal}

    That should fix what ails ya..
     
    tmeyer45458, Aug 28, 2007 IP
    batman4444 likes this.
  3. batman4444

    batman4444 Active Member

    Messages:
    211
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    51
    #3
    worked just like a charm, i must have spent 3 hours on that supid little problem, thanks a ton tmeyer rep given
     
    batman4444, Aug 29, 2007 IP
  4. tmeyer45458

    tmeyer45458 Peon

    Messages:
    355
    Likes Received:
    45
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Your very welcome!:) It's nice to be able to help others after so many (here) have help me with my own "stupid little problems".

    Good luck w/your site:D
     
    tmeyer45458, Aug 29, 2007 IP