Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

EZ Question from a php newbie....
Goto page 1, 2  Next
 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General
View previous topic :: View next topic  
Author Message
smoothguy29483
Smarty Rookie


Joined: 27 Jun 2003
Posts: 5

PostPosted: Fri Jun 27, 2003 10:05 pm    Post subject: EZ Question from a php newbie.... Reply with quote

Is there a template engine for windows evironment handy? Can someon point me in the right direction!
Back to top
View user's profile Send private message
mohrt
Administrator


Joined: 16 Apr 2003
Posts: 7368
Location: Lincoln Nebraska, USA

PostPosted: Sat Jun 28, 2003 12:35 am    Post subject: Reply with quote

http://smarty.php.net/

couldn't resist Wink
Back to top
View user's profile Send private message Visit poster's website
smoothguy29483
Smarty Rookie


Joined: 27 Jun 2003
Posts: 5

PostPosted: Sun Jun 29, 2003 4:34 am    Post subject: Reply with quote

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
View user's profile Send private message
Panama Jack
Smarty Rookie


Joined: 23 Jun 2003
Posts: 16

PostPosted: Sun Jun 29, 2003 10:05 pm    Post subject: Reply with quote

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
View user's profile Send private message
andre
Smarty Pro


Joined: 23 Apr 2003
Posts: 164
Location: Karlsruhe, Germany

PostPosted: Mon Jun 30, 2003 6:40 am    Post subject: Reply with quote

FYI: Smarty works with both Linux AND Windows (not to forget other OSes)
Back to top
View user's profile Send private message
smoothguy29483
Smarty Rookie


Joined: 27 Jun 2003
Posts: 5

PostPosted: Mon Jun 30, 2003 11:05 am    Post subject: Reply with quote

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
View user's profile Send private message
andre
Smarty Pro


Joined: 23 Apr 2003
Posts: 164
Location: Karlsruhe, Germany

PostPosted: Mon Jun 30, 2003 12:17 pm    Post subject: Reply with quote

Are you sure you know what PHP is for?
Back to top
View user's profile Send private message
smoothguy29483
Smarty Rookie


Joined: 27 Jun 2003
Posts: 5

PostPosted: Mon Jun 30, 2003 12:47 pm    Post subject: Reply with quote

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
View user's profile Send private message
andre
Smarty Pro


Joined: 23 Apr 2003
Posts: 164
Location: Karlsruhe, Germany

PostPosted: Mon Jun 30, 2003 2:09 pm    Post subject: Reply with quote

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
View user's profile Send private message
smoothguy29483
Smarty Rookie


Joined: 27 Jun 2003
Posts: 5

PostPosted: Tue Jul 01, 2003 11:05 am    Post subject: Reply with quote

thnx
Back to top
View user's profile Send private message
John
Smarty Rookie


Joined: 30 Jun 2003
Posts: 10
Location: Patong Beach Phuket Thailand

PostPosted: Tue Jul 01, 2003 2:21 pm    Post subject: Give a guy a break! Reply with quote

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! Crying or Very sad

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
View user's profile Send private message Visit poster's website
John
Smarty Rookie


Joined: 30 Jun 2003
Posts: 10
Location: Patong Beach Phuket Thailand

PostPosted: Tue Jul 01, 2003 2:24 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
andre
Smarty Pro


Joined: 23 Apr 2003
Posts: 164
Location: Karlsruhe, Germany

PostPosted: Tue Jul 01, 2003 2:28 pm    Post subject: Reply with quote

Quote:
"separate business logic from *presentation* logic" ?


Ehm... yep Embarassed
Back to top
View user's profile Send private message
boots
Administrator


Joined: 16 Apr 2003
Posts: 5611
Location: Toronto, Canada

PostPosted: Wed Jul 02, 2003 6:02 pm    Post subject: Reply with quote

@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 Smile

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
View user's profile Send private message
BlueTrin
Smarty Rookie


Joined: 05 Jul 2003
Posts: 9

PostPosted: Sun Jul 06, 2003 2:13 am    Post subject: Reply with quote


  • 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
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP