php code in tpl file?

Discussion in 'PHP' started by MattEvers, Jan 7, 2006.

  1. #1
    Can this be done? I tried to include some coop code in my footer file. I have done this a lot with footer.php, but never footer.tpl. It doesn't work, and I can't figure out what to do.

    Am I missing something simple?
     
    MattEvers, Jan 7, 2006 IP
  2. mdvaldosta

    mdvaldosta Peon

    Messages:
    4,079
    Likes Received:
    362
    Best Answers:
    0
    Trophy Points:
    0
    #2
    what kind of tpl? Smarty, phpbb?

    if phpBB, you can't use php code in tpl unless you use the xtreme styles mod. if smarty, try placing the code inside {php} {/php} tags
     
    mdvaldosta, Jan 7, 2006 IP
  3. cytech

    cytech Guest

    Messages:
    62
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    It all depends on what kind of template system you are using. As md stated if Smarty you can use {php}{/php} (make sure its set in the config file though)
     
    cytech, Jan 7, 2006 IP
  4. MattEvers

    MattEvers Notable Member

    Messages:
    1,792
    Likes Received:
    137
    Best Answers:
    0
    Trophy Points:
    260
    #4
    I dont' really understand that much about this. I got the tpl files from a free odp script. So I guess they are smarty?? Anyway, including those tags didn't work.

    I'm stumped! :D
     
    MattEvers, Jan 7, 2006 IP
  5. cytech

    cytech Guest

    Messages:
    62
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Can you post a link to this free script?

    Once one of us sees it we can let ya konw :)
     
    cytech, Jan 7, 2006 IP
  6. MattEvers

    MattEvers Notable Member

    Messages:
    1,792
    Likes Received:
    137
    Best Answers:
    0
    Trophy Points:
    260
    #6
    MattEvers, Jan 7, 2006 IP
  7. cytech

    cytech Guest

    Messages:
    62
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    This script does not use Smarty :(

    but depending on what you want to do I can do quick edit and for you.

    So, what kind of PHP code are you trying to put into the footer file?
     
    cytech, Jan 7, 2006 IP
  8. MattEvers

    MattEvers Notable Member

    Messages:
    1,792
    Likes Received:
    137
    Best Answers:
    0
    Trophy Points:
    260
    #8
    Coop.......
     
    MattEvers, Jan 8, 2006 IP
  9. masoud.su

    masoud.su Peon

    Messages:
    2
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #9
    HI everybody
    how can I realize if the php file is included in the smarty template file? I included a php file into my smarty template like this: {php} include('./path/to/whatever.php'); {/php}
    and I really don't know if it's included or not? sorry i don't know any thing about PHP at all? I'm a web designer.
     
    masoud.su, May 6, 2010 IP