Results 1 to 6 of 6
-
11th Feb 2010, 11:23 AM #1OPMemberWebsite's:
litewarez.net litewarez.com triniwarez.comTutorial [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';
PHP Code:include SYSTEM_BASE_PATH . '/engine/template/Smarty.class.php';
so lets add Smarty to our registry engine!
Find:
PHP Code:Registry::set('Database',new Database());
PHP Code:Registry::set('Smarty',new Smarty());
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: 5Join 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
-
13th Feb 2010, 08:00 PM #2MemberWebsite's:
wscripts.net damnlolscript.com lulzjet.comthanks, waiting for more
-
13th Feb 2010, 09:04 PM #3OPMemberWebsite's:
litewarez.net litewarez.com triniwarez.comwill 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
-
13th Feb 2010, 09:38 PM #4BannedWebsite's:
seekingw.com uwddl.com generalgamers.co.uk motivatedgamerz.comNice lw. Can't wait for it
-
19th Feb 2010, 08:17 AM #5Member
thank you . I will try.
-
19th Feb 2010, 06:38 PM #6The Realest Nigga
thanx alot man
Sponsored Links
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Similar Threads
-
Tutorial [Creating a PHP Framework] {advanced} (PART 5) - Sessions
By litewarez in forum Tutorials and GuidesReplies: 1Last Post: 12th Feb 2010, 03:06 PM -
Tutorial [Creating a PHP Framework] {advanced} (PART 4)
By litewarez in forum Tutorials and GuidesReplies: 1Last Post: 9th Feb 2010, 04:24 AM -
Tutorial [Creating a PHP Framework] {advanced} (PART 3)
By litewarez in forum Tutorials and GuidesReplies: 1Last Post: 4th Feb 2010, 02:12 AM -
Tutorial [Creating a PHP Framework] {advanced} (PART 2)
By litewarez in forum Tutorials and GuidesReplies: 2Last Post: 3rd Feb 2010, 05:37 AM -
Tutorial [Creating a PHP Framework] {advanced} (PART 1)
By litewarez in forum Tutorials and GuidesReplies: 1Last Post: 30th Jan 2010, 03:37 PM
themaLeecher - leech and manage...
Version 5.03 released. Open older version (or...