Results 1 to 7 of 7

Thread: template system

  1. #1
    Join Date
    May 2007
    Posts
    467
    Tokens
    0

    Default template system

    Okay i have been trying to make a template system that works for well over 3 month and i can not get it to do what i want so i want to know if any one knows of any tuts and can post a tut here for me.

    what i am trying to do is make it so you can call them template blah.tpl like
    echo eval( $template->load('blah')); or some thing and in the blah.tpl i can have {$lang_hello} and that will be the word lang from my lang.php file $lang = array blah blah.. and also have {$str_login_open} that that would be like if($user >= 1) { and have {$str_close} as }

    some thing along them lines so can some one help me..

    thank you

    Moved by Invent (Forum Moderator) from Designing & Development: Please post in the correct forum next time, thanks .
    Last edited by Invent; 27-07-2008 at 09:42 PM.

  2. #2
    Join Date
    Jul 2008
    Location
    Hastings, UK.
    Posts
    2,050
    Tokens
    0

    Latest Awards:

    Default

    Quote Originally Posted by VistaBoy View Post
    Okay i have been trying to make a template system that works for well over 3 month and i can not get it to do what i want so i want to know if any one knows of any tuts and can post a tut here for me.

    what i am trying to do is make it so you can call them template blah.tpl like
    echo eval( $template->load('blah')); or some thing and in the blah.tpl i can have {$lang_hello} and that will be the word lang from my lang.php file $lang = array blah blah.. and also have {$str_login_open} that that would be like if($user >= 1) { and have {$str_close} as }

    some thing along them lines so can some one help me..

    thank you
    Take a look at the source of SMARTY templating system so you can get a rough outline on how they've done it, don't rip their system though.

  3. #3
    Join Date
    Nov 2007
    Posts
    1,253
    Tokens
    150

    Latest Awards:

    Default

    Just use smarty....


    www.fragme.co = a project.

  4. #4
    Join Date
    May 2008
    Posts
    605
    Tokens
    0

    Default

    As people have said smarty is really good for templates.

  5. #5
    Join Date
    Mar 2008
    Posts
    5,108
    Tokens
    3,780

    Latest Awards:

    Default

    Quote Originally Posted by Calon View Post
    Take a look at the source of SMARTY templating system so you can get a rough outline on how they've done it, don't rip their system though.
    How could he rip it? It is open source

  6. #6
    Join Date
    May 2008
    Posts
    605
    Tokens
    0

    Default

    Quote Originally Posted by Dentafrice View Post
    How could he rip it? It is open source
    He thinks everything open source is ripped.

  7. #7
    Join Date
    Apr 2008
    Location
    Derby
    Posts
    4,668
    Tokens
    262

    Latest Awards:

    Default

    lol
    everything open source is ripped
    true ^^

    and id use smarty
    Back for a while

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •