Page 1 of 3 123 LastLast
Results 1 to 10 of 30

Thread: Advantages and Disadvantages of php templates

  1. #1
    Join Date
    Nov 2007
    Posts
    346
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Advantages and Disadvantages of php templates

    Hello, 1)) I was wondering what are the advantages and disadvantages of php templates.

    2))Can someone help me set up a php template for the following page, considering that this page is my index.php page. http://www.athletes4excellence.com/layout.php . Please and thank you!

    Edit: Removed ugly formatting.
    Last edited by tech_support; 01-14-2008 at 12:35 AM.

  2. #2
    Join Date
    May 2006
    Location
    Sydney, Australia - Near the coast.
    Posts
    1,995
    Thanks
    0
    Thanked 8 Times in 7 Posts

    Default

    1)) I was wondering what are the advantages and disadvantages of php templates.
    Advantages
    - Easy to maintain
    - Less time wasted if you needed to change one script

    Disadvantages
    - Time-consuming when you're converting
    - Can't work in DW properly.

    2))Can someone help me set up a php template for the following page, considering that this page is my index.php page. http://www.athletes4excellence.com/layout.php . Please and thank you!
    Read, learn, repeat until fully understood.
    http://www.dynamicdrive.com/forums/s...d.php?p=125609
    Peter - alotofstuffhere[dot]com - Email Me - Donate via PayPal - Got spare hardware? Donate 'em to me :) Just send me a PM.
    Currently: enjoying the early holidays :)
    Read before posting: FAQ | What you CAN'T do with JavaScript | Form Rules | Thread Title Naming Guide

  3. #3
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    - Time-consuming when you're converting
    Not a disadvantage of using a template though -- that's a disadvantage of using something else and then switching to templates.
    - Can't work in DW properly.
    Again, a disadvantage of DW, not templates.
    Read, learn, repeat until fully understood.
    http://www.dynamicdrive.com/forums/s...d.php?p=125609
    As I posted in the thread, that's not as powerful or elegant as a real templating engine such as Smarty.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends franšais | entiendo espa˝ol | t˘i Ýt hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  4. #4
    Join Date
    Nov 2007
    Posts
    346
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Twey, I do not understand that link you gave me.

  5. #5
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    What about it?
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends franšais | entiendo espa˝ol | t˘i Ýt hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  6. #6
    Join Date
    Nov 2007
    Posts
    346
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    What's in it? Also, where do I get a nice php template?

  7. #7
    Join Date
    Sep 2006
    Location
    St. George, UT
    Posts
    2,769
    Thanks
    3
    Thanked 157 Times in 155 Posts

    Default

    What do you mean by
    where do I get a nice php template?
    Go to the Smarty website and learn how to make up the template files (which is just plain html with some simple variables in the form of {$var}). After that, assign the variables in your script and display the template.

    Hope this helps.
    "Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian Wilson, Nintendo, Inc, 1989
    TheUnlimitedHost | The Testing Site | Southern Utah Web Hosting and Design

  8. #8
    Join Date
    Nov 2007
    Posts
    346
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I don't understand. Is the one that tech_support wrote a good one? Should I use it, also if I were to use it "the final code" that he has up, is it the "index.php" page and how would the normal pages would look like? Please and thank you!

  9. #9
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    As I said, that method of doing things isn't as powerful as using a real templating engine. tech_support's is an example of one inferior method of doing it. On the Smarty website you can find examples and documentation of how to do it using Smarty.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends franšais | entiendo espa˝ol | t˘i Ýt hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  10. #10
    Join Date
    Nov 2007
    Posts
    346
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Are there setup php templates on the web that can be used? Please and thank you. Something exactly like this, http://www.pixel2life.com/ except I want the menu with sub menu tabs and taking out the search engine. Again thank you so much I appreciate the help!
    Last edited by afe; 01-19-2008 at 07:20 PM.

Bookmarks

Posting Permissions

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