Activity Stream
48,167 MEMBERS
61951 ONLINE
besthostingforums On YouTube Subscribe to our Newsletter besthostingforums On Twitter besthostingforums On Facebook besthostingforums On facebook groups

Results 1 to 6 of 6
  1.     
    #1
    Member
    Website's:
    litewarez.net litewarez.com triniwarez.com

    Default Tutorial [Creating a PHP Framework] {advanced} (PART 6) Smarty Engine

    Ok today were going to be including the Smarty Template engine into our framework !


    This will help you build your sites faster and make them more customizable and easy to change

    With Smarty we can create fast and reliable php code from extremely small lines of code that are made to be easy and simple for end users !

    Firstly lets grab the source code !

    http://www.smarty.net/do_download.ph...-2.6.26.tar.gz

    This file is Smarty 2.6.26 and is the latest stable release !

    Ok so so lets take a look at the package !


    Ok so as you can see theres a few files to help getting you started but for now were going to open the "libs" folder witch holds the code we need!


    --

    Now lets take a look at what we have in our framework package.


    atm were in the directory system/engine/

    Create a directory called template!


    within that directory extract the contents WITHIN the libs directory and place them within the template directory within our framework !


    Ok its not hard to implement the smarty engine into the registry as its object based like all our other items !

    Ok so if we now go and open up startup.php and file the following line !

    PHP Code: 
    include SYSTEM_BASE_PATH '/engine/Database.php'
    and add after!

    PHP Code: 
    include SYSTEM_BASE_PATH '/engine/template/Smarty.class.php'
    then we add it to the registry !

    so lets add Smarty to our registry engine!

    Find:
    PHP Code: 
    Registry::set('Database',new Database()); 
    Add After:
    PHP Code: 
    Registry::set('Smarty',new Smarty()); 
    So now we should have something along the lines of !


    Thants smarty engine setup and installed !

    Next time were going to talk about the smarty configuration and how to set up caching and compile dirs ! also with recurse caching on php5

    Next Time:
    • Configuring the Smarty Engine
    • Setting template directories
    • Creating our first template test !


    Stay Tuned !
    litewarez Reviewed by litewarez on . Tutorial [Creating a PHP Framework] {advanced} (PART 6) Smarty Engine Ok today were going to be including the Smarty Template engine into our framework ! http://www.imgcentre.com/img/uploads/big/2cea67a019.png This will help you build your sites faster and make them more customizable and easy to change With Smarty we can create fast and reliable php code from extremely small lines of code that are made to be easy and simple for end users ! Firstly lets grab the source code ! Rating: 5
    Join Litewarez.net today and become apart of the community.
    Unique | Clean | Advanced (All with you in mind)
    Downloads | Webmasters


    Notifications,Forum,Chat,Community all at Litewarez Webmasters


  2.   Sponsored Links

  3.     
    #2
    Member
    Website's:
    wscripts.net damnlolscript.com lulzjet.com
    thanks, waiting for more

  4.     
    #3
    Member
    Website's:
    litewarez.net litewarez.com triniwarez.com
    will be coming soon!
    Join Litewarez.net today and become apart of the community.
    Unique | Clean | Advanced (All with you in mind)
    Downloads | Webmasters


    Notifications,Forum,Chat,Community all at Litewarez Webmasters


  5.     
    #4
    Banned
    Website's:
    seekingw.com uwddl.com generalgamers.co.uk motivatedgamerz.com
    Nice lw. Can't wait for it

  6.     
    #5
    Member
    thank you . I will try.

  7.     
    #6
    The Realest Nigga
    thanx alot man

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Tutorial [Creating a PHP Framework] {advanced} (PART 5) - Sessions
    By litewarez in forum Tutorials and Guides
    Replies: 1
    Last Post: 12th Feb 2010, 03:06 PM
  2. Tutorial [Creating a PHP Framework] {advanced} (PART 4)
    By litewarez in forum Tutorials and Guides
    Replies: 1
    Last Post: 9th Feb 2010, 04:24 AM
  3. Tutorial [Creating a PHP Framework] {advanced} (PART 3)
    By litewarez in forum Tutorials and Guides
    Replies: 1
    Last Post: 4th Feb 2010, 02:12 AM
  4. Tutorial [Creating a PHP Framework] {advanced} (PART 2)
    By litewarez in forum Tutorials and Guides
    Replies: 2
    Last Post: 3rd Feb 2010, 05:37 AM
  5. Tutorial [Creating a PHP Framework] {advanced} (PART 1)
    By litewarez in forum Tutorials and Guides
    Replies: 1
    Last Post: 30th Jan 2010, 03:37 PM

Tags for this Thread

BE SOCIAL