Re: [Nolug] PHP help

From: Jess Planck <jesse.planck_at_gmail.com>
Date: Fri, 18 Apr 2008 11:44:24 -0500
Message-Id: <18E4E118-D459-4795-BB0F-EDDA331FD55F@gmail.com>

Oh yea. That's why PHP is still pretty cool because you have the
flexibility to make the template engine / no-template engine decision
based on your workflow. Other nice template systems also exist in the
PEAR repository. I kinda like Flexy, and QuickForm (not a template
engine) is incredibly useful.

I'm lucky since my education is in Design first, programming came out
of necessity. So in many cases I am the designer, but about 75% of the
time I am doing sub-contract for Design Studios, SO I let them come up
with the outlandish stuff. Then of course since I have my feet in both
ponds I can help bring things down to a good compromise between
function and design before the client EVER sees proposed work. In most
cases I am typically using an already established CMS, and I get
really picky about application tool selection. I've seen custom
designed template systems that can make you loose your lunch... and
make me run very quickly away from good money.

For nightmares pre-PHP think Perl - "Mason.pm"

Jess

On Apr 18, 2008, at 11:18 AM, Petri Laihonen wrote:

> To clarify, I understand templating system as separating the main PHP
> code from the design.
> Simplest "templating" system I have seen done with PHP goes along
> these lines.
>
> Designer makes their web pages with "tags" and save as myfile.html
>
> in PHP one just does
> $original_file = get_file_contents('myfile.html');
> $new_file = str_replace("tag1",$whatever_var,$original_file);
> echo $new_file;
>
> Often the replacement arrays work nicely.
> str_replace($repl_arry,$repl_with_arry,$original_file);
>
> I still have some websites (designed by 2 fine German "space"
> engineers)
> which use completely custom made templating system and additionally
> the
> site construction is extremely complex. (Ridiculously complex and then
> some) Even after several years, I still do not know how to make some
> desired changes in the site to work on all pages. Also, how to make a
> working link from a banner on the site to go to specified content
> category within the site. It is going to be the day of joy when I
> have
> time to redo the entire site with a lot simpler PHP + smarty as
> template. Same PHP code will work for both mobile and desktop
> browsing.
>
> Petri

___________________
Nolug mailing list
nolug@nolug.org
Received on 04/18/08

This archive was generated by hypermail 2.2.0 : 12/19/08 EST