View previous topic :: View next topic |
Author |
Message |
smoothguy29483 Smarty Rookie
Joined: 27 Jun 2003 Posts: 5
|
Posted: Fri Jun 27, 2003 10:05 pm Post subject: EZ Question from a php newbie.... |
|
|
Is there a template engine for windows evironment handy? Can someon point me in the right direction! |
|
Back to top |
|
mohrt Administrator
Joined: 16 Apr 2003 Posts: 7368 Location: Lincoln Nebraska, USA
|
|
Back to top |
|
smoothguy29483 Smarty Rookie
Joined: 27 Jun 2003 Posts: 5
|
Posted: Sun Jun 29, 2003 4:34 am Post subject: |
|
|
ummm...yeah...about that link you posted..when I go to the download section and I try to download the file for smarty..they are being save as .tar.gz or something like that..and yeah...from the best of my knowledge that is a linux file format....I could be wrong but I thought that linux files didn't work in a windows environment??? |
|
Back to top |
|
Panama Jack Smarty Rookie
Joined: 23 Jun 2003 Posts: 16
|
Posted: Sun Jun 29, 2003 10:05 pm Post subject: |
|
|
smoothguy29483 wrote: | ummm...yeah...about that link you posted..when I go to the download section and I try to download the file for smarty..they are being save as .tar.gz or something like that..and yeah...from the best of my knowledge that is a linux file format....I could be wrong but I thought that linux files didn't work in a windows environment??? |
If you have ANY decent Zip, RAR, ect. program for windows handy it will unpack those files. |
|
Back to top |
|
andre Smarty Pro
Joined: 23 Apr 2003 Posts: 164 Location: Karlsruhe, Germany
|
Posted: Mon Jun 30, 2003 6:40 am Post subject: |
|
|
FYI: Smarty works with both Linux AND Windows (not to forget other OSes) |
|
Back to top |
|
smoothguy29483 Smarty Rookie
Joined: 27 Jun 2003 Posts: 5
|
Posted: Mon Jun 30, 2003 11:05 am Post subject: |
|
|
ok..another dumb question for you. Where do I unzip it to...and I don't see an exe file in there either? |
|
Back to top |
|
andre Smarty Pro
Joined: 23 Apr 2003 Posts: 164 Location: Karlsruhe, Germany
|
Posted: Mon Jun 30, 2003 12:17 pm Post subject: |
|
|
Are you sure you know what PHP is for? |
|
Back to top |
|
smoothguy29483 Smarty Rookie
Joined: 27 Jun 2003 Posts: 5
|
Posted: Mon Jun 30, 2003 12:47 pm Post subject: |
|
|
I thought smarty was a program inwhich you could edit php templates inorder to make a php web site out of. When I say I new to this..I'm really new...I'm starting at ground zero here with no knowledge of php..but I taught myself VB so I figured I could teach myself this no problem... |
|
Back to top |
|
andre Smarty Pro
Joined: 23 Apr 2003 Posts: 164 Location: Karlsruhe, Germany
|
Posted: Mon Jun 30, 2003 2:09 pm Post subject: |
|
|
Not exactly.
Smarty is a kind of addition to PHP. It's neither a PHP editor nor does it help you building PHP scripts. The goal of Smarty is to separate business logic and application logic.
I think you're searching for something like Dreamweaver or PHPEdit which are IDEs for editing web pages and PHP scripts.
I would suggest you first try to program a little bit with PHP. After you learned PHP you come back and try Smarty to improve your projects.
A good starting point is http://www.phpbuilder.com/. There you'll find a lot of articles teaching everything you need to know about PHP.
Addionally try to search Google for "PHP tutorial":
http://de2.php.net/tut.php
http://hotwired.lycos.com/webmonkey/programming/php/tutorials/tutorial4.html
... |
|
Back to top |
|
smoothguy29483 Smarty Rookie
Joined: 27 Jun 2003 Posts: 5
|
Posted: Tue Jul 01, 2003 11:05 am Post subject: |
|
|
thnx |
|
Back to top |
|
John Smarty Rookie
Joined: 30 Jun 2003 Posts: 10 Location: Patong Beach Phuket Thailand
|
Posted: Tue Jul 01, 2003 2:21 pm Post subject: Give a guy a break! |
|
|
smoothguy29483 wrote: | ok..another dumb question for you. Where do I unzip it to...and I don't see an exe file in there either? |
C'mon guys - give smoothguy a break!
You need to download the Adobe Acrobat file: Smarty-2.5.0-docs.pdf
(from somewhere "Documentation"?! on the Smarty Website).
Can anyone say "RTFM"?
Actually the document is fairly well done (the website's "Crash Course" repeats the same stuff verbatim) and will fairly painlessly walk you through the not entirely simple set up.
The rest of the manual is adequately written and the zip provides you with a simple example of several working files in a demo directory in the Zip.
Basically, Smarty recommends that you:
1. Set up the Smarty library files *above* your main server root's public_html directory (one level up from where you actually serve your .php / .html pages from, keeping your template files in a sub-dir of the domain's root)
2. Set paths up so the libraries can be found during compilation.
3. Set permissions to write to these dirs (for Unix) etc...
However, be careful when setting up your template directory paths in the "Extended Setup" setup.php file - the example file only shows Unix-style path examples and for Windoze you need to use foward slashes for the directory paths delimiters (which go the opposite way to Windoze)!!!
Example:
Windoze:
C:\apache\htdocs\smartytest\templates\
But Smarty wants:
$this->template_dir = 'C:/apache/htdocs/smartytest/templates/';
.
.
.
etc
I recommend that you set up and get the example working before going any further!
Windoze WinZip V8.0 will unpack the Unix stlye Zip file (for me - or did I download a tar.gz plugin for WinZip first? Hmmm... RTFM).
Good luck
John _________________ http://reproduction-oil-paintings.com |
|
Back to top |
|
John Smarty Rookie
Joined: 30 Jun 2003 Posts: 10 Location: Patong Beach Phuket Thailand
|
Posted: Tue Jul 01, 2003 2:24 pm Post subject: |
|
|
andre wrote: |
...
The goal of Smarty is to separate business logic and application logic.
...
... |
Umm, don't you mean "separate business logic from *presentation* logic" ?
Cheers
John _________________ http://reproduction-oil-paintings.com |
|
Back to top |
|
andre Smarty Pro
Joined: 23 Apr 2003 Posts: 164 Location: Karlsruhe, Germany
|
Posted: Tue Jul 01, 2003 2:28 pm Post subject: |
|
|
Quote: | "separate business logic from *presentation* logic" ? |
Ehm... yep |
|
Back to top |
|
boots Administrator
Joined: 16 Apr 2003 Posts: 5611 Location: Toronto, Canada
|
Posted: Wed Jul 02, 2003 6:02 pm Post subject: |
|
|
@smoothguy29483: it sounds like you don't have any programming background. IMHO, Smarty is probably not the best starting-point for you.
I would suggest you either get some background or if you are on a team, associate with a competent programmer. I most certainly don't speak for everyone here, but personally I am more than willing to help nearly anyone with Smarty issues, but the rest is up to you
HOWEVER, you don't need to be a programmer to write smarty templates. You DO need at least some general experience to install and integrate Smarty into your site and application. I realize that you are new at this, but considering that you didn't even attempt to to use WinZip to handle the tar.gz archive (which it does) it shows that you may not be ready for some of the more challenging issues that you will be facing.
If you are interested in using Smarty to its fullest, then do start with some PHP education first.
Good Luck! |
|
Back to top |
|
BlueTrin Smarty Rookie
Joined: 05 Jul 2003 Posts: 9
|
Posted: Sun Jul 06, 2003 2:13 am Post subject: |
|
|
- Get and install easyphp, so you can install easily an environment with Apache/PHP/mySQL (tho mySQL is not needed for smarty even if using templates might be useless without a dynamic content)
- download smarty, read the install instructions(if you installed easyphp, the root of your website is the www folder in easyPHP install folder)
- run the demo which is contained in the smarty package, you just have to copy it in your website root folder, then open a browser and go on http://localhost/demo/
- read the code source in the .tpl and .php files in the demo folder, that should help you a little bit.
|
|
Back to top |
|
|