RE: [PHP] Templates, PHP Frameworks, and DB Abstraction?

2006-07-01 Thread Martin Marques

On Fri, 30 Jun 2006, KermodeBear wrote:


http://pear.php.net/package/DB/


This one has no more development, besides bug fixes. It was merged to 
create the one below.



http://pear.php.net/package/MDB2/


--
 21:50:04 up 2 days,  9:07,  0 users,  load average: 0.92, 0.37, 0.18
-
Lic. Martín Marqués |   SELECT 'mmarques' || 
Centro de Telemática|   '@' || 'unl.edu.ar';

Universidad Nacional|   DBA, Programador,
del Litoral |   Administrador
-
-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Templates, PHP Frameworks, and DB Abstraction?

2006-07-01 Thread Martin Marques

On Fri, 30 Jun 2006, Jay Paulson wrote:


I'd like to get some feedback on what the list thinks is a good template
engine other than smarty.


PEARs HTML_Template_IT... or mix it with other HTML_Template*


I'd also like to do some quick prototyping using a PHP framework does anyone
have any recommendations for one that is easy to pick up and run with?


The only important one I know of is Horde (http://www.horde.org).


Finally, does anyone have any suggestions for a good PHP database
abstraction library?


For PHP 5 I've heard wonderfull things about PDO, but the documentation 
sucks.


I personally am working with PEAR::DB which has been merged with MDB to 
make MDB2 (this would be a good start point).


--
 21:50:04 up 2 days,  9:07,  0 users,  load average: 0.92, 0.37, 0.18
-
Lic. Martín Marqués |   SELECT 'mmarques' || 
Centro de Telemática|   '@' || 'unl.edu.ar';

Universidad Nacional|   DBA, Programador,
del Litoral |   Administrador
-
-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Templates, PHP Frameworks, and DB Abstraction?

2006-06-30 Thread KermodeBear
> Finally, does anyone have any suggestions for a good PHP database
> abstraction library?

PHP5 has PDO for database abstraction; check the manual for information on
that one. If you're stuck with PHP4 then PEAR has several offerings:
http://pear.php.net/package/DB/
http://pear.php.net/package/MDB2/

I've used PEAR DB and never had problems with it.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: PHP templates

2004-08-14 Thread Hero Wunders
Hallo!
I have seen that there are many templating systems for PHP. Which is the
most used and the best you have found?
Can you recommend me a free and good templating system?
I like Savant because it is small and intuitive.
You can find more info on:
http://wiki.ciaweb.net/yawiki/index.php?area=Savant
http://wiki.ciaweb.net/yawiki/index.php?area=SavantTwo
HTH
herojoker
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Templates Are Driving me Nuts

2004-07-13 Thread Paul Bissex
On Tue, 13 Jul 2004 10:48:34 -0400, John W. Holmes
<[EMAIL PROTECTED]> wrote:
[snip]
> Everyone has their own ideas on whether this is needed and what kind of
> templates to use. There are a ton of engines out there that you can use.
> Some are simple and some turn into programming languages of their own
> and just present another layer of failure/difficulty. Some people
> recommend just using PHP both in your business and presentation layer as
> this is what PHP was originally designed for.
> 
> Personal preference. :)

Personal preference indeed -- this is likely to be a long thread!

If you're new to this and finding template engines confising, I'd urge
you to start out by just doing "pure PHP" templating, i.e. what John
is describing in the last sentence of his first paragraph. You get the
structural benefits of templating (more readable program logic, more
readable HTML) without having to learn any new syntax.

In a nutshell, this means that you have a script that prepares data,
and another (mostly HTML), included by the first, that presents it. 
The first, let's call it page.php, will be something like this:

  

and page.tpl.php will be something like this:

  
  
  Current foo status: 
  Page created on 
  
  

This is a minimal example, but even without further refinements this
approach will create much more readable and maintainable code than the
big-ball-o-mud interwoven-PHP-and-HTML style of development.

The argument against template engines is well presented here:

  http://phppatterns.com/index.php/article/articleview/4/1/1/

Personally, I use Smarty for sites that need complex templating, and
pure PHP templating for everything else.

pb

-- 
paul bissex, e-scribe.com -- database-driven web development
413.585.8095
69.55.225.29
01061-0847
72°39'71"W 42°19'42"N

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Templates Are Driving me Nuts

2004-07-13 Thread John W. Holmes
EE wrote:
Please help. This template thing is driving my nuts. I though maybe when
I read more articles things will clear up; however, things got even
worse. Every article writer has a different idea. Can anyone explain to
me what are Templates for? What are the advantages of using them? If I
use a third party template, will my site have a different look or is it
only a parser that will take my designed template and data and combine
them. I really don't know.
The whole idea behind templates is to separate your "business logic" 
from your "presentation logic". This means you have a script that does 
all of your processing and data retrieval, etc. This script is generally 
all PHP that performs your business logic. Then you have your template 
that only has code meant to control your presentation. This file is 
mostly HTML, generally, with some special template code or limited PHP 
thrown in to control presentation _only_. The idea is that changes to 
the presentation layer will not require changes to your business layer 
and vice-versa.

Everyone has their own ideas on whether this is needed and what kind of 
templates to use. There are a ton of engines out there that you can use. 
Some are simple and some turn into programming languages of their own 
and just present another layer of failure/difficulty. Some people 
recommend just using PHP both in your business and presentation layer as 
this is what PHP was originally designed for.

Personal preference. :)
--
---John Holmes...
Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/
php|architect: The Magazine for PHP Professionals – www.phparch.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Templates Are Driving me Nuts

2004-07-13 Thread Justin Patrin
A template system allows you to (in most cases) use a special
language, different than PHP, to write your HTML. At the simplest
level, template languages replace special markers with content from
PHP. More complicated types involve looping and other contro
structures (if, then, else, etc.).

Basically a template system allows you to seperate your display code
from the rest, allowing quick and easy updating of the look and feel
of the site without changing any (or much) of your PHP code. This is
assuming you've architected it well, of course. ;-)

On Tue, 13 Jul 2004 16:39:04 +0300, EE <[EMAIL PROTECTED]> wrote:
> Dears,
> 
> Please help. This template thing is driving my nuts. I though maybe when
> I read more articles things will clear up; however, things got even
> worse. Every article writer has a different idea. Can anyone explain to
> me what are Templates for? What are the advantages of using them? If I
> use a third party template, will my site have a different look or is it
> only a parser that will take my designed template and data and combine
> them. I really don't know.
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> !DSPAM:40f3e49a72101927516234!
> 
> 


-- 
DB_DataObject_FormBuilder - The database at your fingertips
http://pear.php.net/package/DB_DataObject_FormBuilder

paperCrane --Justin Patrin--

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Templates Are Driving me Nuts[Scanned]

2004-07-13 Thread Michael Egan
I looked at these briefly a couple of years ago but never really made great use of 
them. I also remember seeing an article in LinuxFormat about them which can be found 
at:

http://www.linuxformat.co.uk/archives/LXF35.tut_php.pdf

My understanding is that they are mainly intended for use in development areas where 
you get both programmers and designers working closely together. My limited experience 
of designers is that they get petrified at the sight of anything that looks like code 
nad personally I get horribly confused when I see some of those fiendishly complicated 
interfaces for graphic design applications.

In theory templates might offer a way of bridging this chasm - though I have my doubts.

Regards,

Michael Egan

-Original Message-
From: EE [mailto:[EMAIL PROTECTED]
Sent: 13 July 2004 14:39
To: php.net
Subject: [PHP] Templates Are Driving me Nuts[Scanned]


Dears,

Please help. This template thing is driving my nuts. I though maybe when
I read more articles things will clear up; however, things got even
worse. Every article writer has a different idea. Can anyone explain to
me what are Templates for? What are the advantages of using them? If I
use a third party template, will my site have a different look or is it
only a parser that will take my designed template and data and combine
them. I really don't know.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php 
  
  
The information contained in this email (and in any attachments sent with it) is 
confidential. It is intended for the addressee only. Access to this email by anyone 
else is unintended and unauthorized.  
If you are not the original addressee, 3tc asks you to please maintain 
confidentiality. If you have received this email in error please notify 3tc 
immediately by replying to it, then destroy any copies and delete it from your 
computer system. 
  
Any use, dissemination, forwarding, printing or copying of this email by anyone except 
the addressee in the normal course of his/her business, is strictly prohibited. 3tc 
owns the copyright in this email and any document created by us and assert the right 
to be identified as the author of it. Copyright has not been transferred to the 
addressee. 
We protect our systems with Sophos Anti-virus -  
www.sophos.com 
 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Templates/Separate content from presentation

2003-11-01 Thread Pedro Pais
Thank you all for the information you gave me! :)
I'll study every one of it and tell you in a short time about my choice :P


Boyan Nedkov wrote:
Harry Fuecks  (phpPaterns(), see the link below) has a quite interesting 
opinion concerning php and the use of templates, with which I generally 
agreed, after spending some hard time to investigate the most suitable 
for me templating ideology/approach/system. I would suggest you first 
read this article and then decide whether to 'succumbing to the lure of 
templates' or to find your best way to use php itself as a template engine.

'Templates and Template Engines'
http://phppatterns.com/index.php/article/articleview/4/1/1/
Some more resources that may help answering your question:

'Compiling a list of PHP Template Engines'
http://www.phppatterns.com/index.php/article/articleview/69/1/11/
http://www.bernhardseefeld.ch/archives/67.html
http://www.phpbuilder.com/mail/php-general/2003042/1730.php
http://www.massassi.com/php/articles/template_engines/old/
http://www.scripps.edu/~jesusmc/cachedtpl/CachedTemplate.html
http://zend.com/zend/trick/tricks-nov-2001.php
Cheers,

Boyan Nedkov
--


Pedro Pais wrote:

Hi!

I've coded in PHP for a while, but I had to leave it for some time. 
Now I'm back, and I'd like to know what's currently being used to 
separate content from presentation, besides Smarty (that seems to be 
Google's top choice)?

Thanx


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Templates/Separate content from presentation

2003-11-01 Thread Boyan Nedkov
Harry Fuecks  (phpPaterns(), see the link below) has a quite interesting 
opinion concerning php and the use of templates, with which I generally 
agreed, after spending some hard time to investigate the most suitable 
for me templating ideology/approach/system. I would suggest you first 
read this article and then decide whether to 'succumbing to the lure of 
templates' or to find your best way to use php itself as a template engine.

'Templates and Template Engines'
http://phppatterns.com/index.php/article/articleview/4/1/1/
Some more resources that may help answering your question:

'Compiling a list of PHP Template Engines'
http://www.phppatterns.com/index.php/article/articleview/69/1/11/
http://www.bernhardseefeld.ch/archives/67.html
http://www.phpbuilder.com/mail/php-general/2003042/1730.php
http://www.massassi.com/php/articles/template_engines/old/
http://www.scripps.edu/~jesusmc/cachedtpl/CachedTemplate.html
http://zend.com/zend/trick/tricks-nov-2001.php
Cheers,

Boyan Nedkov
--


Pedro Pais wrote:

Hi!

I've coded in PHP for a while, but I had to leave it for some time. Now 
I'm back, and I'd like to know what's currently being used to separate 
content from presentation, besides Smarty (that seems to be Google's top 
choice)?

Thanx

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Templates/Separate content from presentation

2003-11-01 Thread Burhan Khalid
Pedro Pais wrote:

Hi!

I've coded in PHP for a while, but I had to leave it for some time. Now 
I'm back, and I'd like to know what's currently being used to separate 
content from presentation, besides Smarty (that seems to be Google's top 
choice)?
http://pear.php.net/package/HTML_Template_Flexy
http://pear.php.net/package/HTML_Template_PHPLIB
http://pear.php.net/package/HTML_Template_Sigma
http://pear.php.net/package/HTML_Template_Xipe
--
Burhan Khalid
phplist[at]meidomus[dot]com
http://www.meidomus.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Templates/Separate content from presentation

2003-10-31 Thread Robert Cummings
On Fri, 2003-10-31 at 22:23, Pedro Pais wrote:
> Hi!
> 
> I've coded in PHP for a while, but I had to leave it for some time. Now 
> I'm back, and I'd like to know what's currently being used to separate 
> content from presentation, besides Smarty (that seems to be Google's top 
> choice)?

TemplateJinn, part of the InterJinn framework. Absolutely fantastic
(bias warning :) Too much to properly give credit in a single email,
feel free to check out the very full docs at the link below:

http://www.interjinn.com/documentation/templateJinn.phtml

Cheers,
Rob.
-- 
..
| InterJinn Application Framework - http://www.interjinn.com |
::
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for   |
| creating re-usable components quickly and easily.  |
`'

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Templates/Separate content from presentation

2003-10-31 Thread Greg Donald
> I've coded in PHP for a while, but I had to leave it for some time. Now
> I'm back, and I'd like to know what's currently being used to separate
> content from presentation, besides Smarty (that seems to be Google's top
> choice)?

I tried Smarty for several weeks and found it was more than I needed, so I
went back to my simpler template system.

I have templates that look like this for example:

> cat userImage.tpl



$userType
$commentsCountHTML
$totalPoints
$timesRated
$averageRating



Then in my php scripts I call a template like this:

$userImage = getTemplate("userImage");
eval("\$userImage = \"$userImage\";");
$html .= $userImage;

The function being:

function getTemplate($template){
global $Site;
  $html = '';
  $file = $Site['TemplatePath'] . '/' . $template . '.tpl';
  if($handle = fopen($file, "r")){
while(!feof($handle)){
  $html .= fgets($handle, 4096);
}
fclose($handle);
$html = str_replace("\\'","'", addslashes($html));
  } else {
die('Fatal: cannot open template ' . $file . '\n');
  }
  return $html;
}

Of course I have no template caching system like Smarty has, but I use
TurkeMM Cache: http://www.turcksoft.com/ and query caching from MySQL 4.  I
also clean my html before output, removing all tabs and newline characters,
and I have zlib.output_compression enabled.  Seems to work well.


--
Greg Donald
http://destiney.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Templates

2003-02-14 Thread David Eisenhart
yeh, I'd totally agree with this. Smarty is fantastic

 The best one imho in PHP is Smarty.
> I'd rank it up there with Template::Toolkit. Take a look:
>
> http://smarty.php.net/
>




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Templates

2003-02-13 Thread php
On 13 Feb 2003 at 17:00, Darren Young wrote:

> I'm looking around for some options on using templates with PHP. I've
> used several Perl solutions in the past, but never tried it in PHP.
> Digging on the web yields several options so I'd love some thoughts or
> comments. The real driver is that the basic site design could change
> over time and I'd like to have the basic HTML in the templates, and the
> real logic in the PHP code.


Well, it seems every Perl programmer at one point or another wrote 
their own templating system. I went from my own to HTML::Template to 
a big fan of Template::Toolkit. The best one imho in PHP is Smarty. 
I'd rank it up there with Template::Toolkit. Take a look:

http://smarty.php.net/

Of course it's very easy to change not only the look and feel but the 
actual layout and everything else about it.

Best thing about not writing your own personal propriertary system is 
you benefit from the world at at large. I haven't used Smarty in a 
awhile as I've been mired in a CMS but I just recently had a chance 
to use it and I see it has been improving.  Take a good look at it. 

Peter
"Reality is that which, when you stop believing in it, doesn't go 
away".
-- Philip K. Dick


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Templates

2003-02-13 Thread Justin French
on 14/02/03 10:20 AM, Darren Young ([EMAIL PROTECTED]) wrote:

> That's pretty much what I'm doing today, header page, menu page, content
> page and a footer. Each of which includes a shared functions file as
> well via require_once(). Only real problem is keeping track of
> tables/rows/columns across all the various files. The 'where was that
>  supposed to be...' kind of thing.

yeah, well a complex layout will kill it pretty quick :)

The other way is go down the route of a 'fusebox' -- one script that shows
all pages within the site.

index.php




Stuff










you can call that script with
p=contact 
p=home
p=about
p=members&action=validate&step=3&favcolor=blue

And just make sure the include files do what they need to.


> Here's another one, there's no way to set a cookie after the headers
> have been sent, true? Any way around this at all or at that point am I
> best to use session variables and/or hidden fields.

Hidden fields, yes.
You are going to have the same problem with sessions... sessions must be set
before the headers are sent too.

You need to either change the logic on your page so that you set the cookie
BEFORE the , or enable output buffering, so that you can set the
cookie or session whenever you like, then do a flush.  Personally, I've
never seen the need to use OB, because I've found a way to work that I'm
comfortable with.

eg:








In otherwords, I execute any code that I need to BEFORE the headers are
sent, to ensure that I CAN set cookies, sessions, or use header()... I set
some simple triggers like $show_form to decide what I want to do in the
body.

Each to their own, but it works great for me over many many applications.


Justin



Justin French


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] Templates

2003-02-13 Thread Darren Young
That's pretty much what I'm doing today, header page, menu page, content
page and a footer. Each of which includes a shared functions file as
well via require_once(). Only real problem is keeping track of
tables/rows/columns across all the various files. The 'where was that
 supposed to be...' kind of thing.

Here's another one, there's no way to set a cookie after the headers
have been sent, true? Any way around this at all or at that point am I
best to use session variables and/or hidden fields.

I haven't done pure web development in a few years and am trying to
catch back up quickly. Any "best practices" assistance would be
appreciated.

Thanks for the response by the way.

/DAY

-Original Message-
From: Justin French [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, February 13, 2003 5:22 PM
To: Darren Young; [EMAIL PROTECTED]
Subject: Re: [PHP] Templates


Go for a complex situation if that's what you want, or consider the
basics:

home.php
 tag //
include('inc/header_html.php'); ?> Welcome to our website! 

contact.php
 tag //
include('inc/header_html.php'); ?> Contact us: [EMAIL PROTECTED] 


If you update any code in any of the 3 include files, you will update
the entire site's look, feel and actions.  It still allows for you to
execute unique PHP code either before or after the HTML starts too.


Strip your site down to what's common, and what's unique to each page,
and see where you go from there.


Justin


on 14/02/03 10:00 AM, Darren Young ([EMAIL PROTECTED]) wrote:

> 
> I'm looking around for some options on using templates with PHP. I've 
> used several Perl solutions in the past, but never tried it in PHP. 
> Digging on the web yields several options so I'd love some thoughts or

> comments. The real driver is that the basic site design could change 
> over time and I'd like to have the basic HTML in the templates, and 
> the real logic in the PHP code.
> 
> Thanks in advance,
> 
> Darren Young
> 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Templates

2003-02-13 Thread Justin French
> If you update any code in any of the 3 include files, you will update the
> entire site's look, feel and actions.  It still allows for you to execute
> unique PHP code either before or after the HTML starts too.

I forgot to mention that a whole heap of your formatting and visial design
can be achieved with CSS too... don't get yourself trapped by making the
content hard to update.

A simple  means that it's just as updateable as the rest
of your code, by tweaking a few lines of CSS in header_html.php


Justin


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Templates

2003-02-13 Thread Justin French
Go for a complex situation if that's what you want, or consider the basics:

home.php
 tag
//
include('inc/header_html.php');
?>
Welcome to our website!


contact.php
 tag
//
include('inc/header_html.php');
?>
Contact us: [EMAIL PROTECTED]



If you update any code in any of the 3 include files, you will update the
entire site's look, feel and actions.  It still allows for you to execute
unique PHP code either before or after the HTML starts too.


Strip your site down to what's common, and what's unique to each page, and
see where you go from there.


Justin


on 14/02/03 10:00 AM, Darren Young ([EMAIL PROTECTED]) wrote:

> 
> I'm looking around for some options on using templates with PHP. I've
> used several Perl solutions in the past, but never tried it in PHP.
> Digging on the web yields several options so I'd love some thoughts or
> comments. The real driver is that the basic site design could change
> over time and I'd like to have the basic HTML in the templates, and the
> real logic in the PHP code.
> 
> Thanks in advance,
> 
> Darren Young
> 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] templates

2002-11-19 Thread Ernest E Vogelsinger
At 19:10 19.11.2002, Adam said:
[snip]
>Thanks, but not sure if this is what i'm looking for
>
>I just want to setup the PHP script so that the variable $filename can be 
>changed via a link such as 'index.php?filename="file.xml"',
>causing the script to parse the appropriate file.
[snip] 

When you execute the URL
   index.php?filename=file.xml
(note - no quotes)
your PHP script will have this value readily accessible as $filename (if
register_globals is on, as outlined in many threads the last days).

With the latest PHP versions, register_globals defaults to off, so you
don't have "$filename" but rather $_GET['filename'] available.

If your PHP host has register_globals off, but you need parameters as
globals, you can put this little script at the beginning of your PHP file:

foreach ($_REQUEST as $varname => $value) {
$var = '$'.$varname;
global $$var;
$$var = $value;
}

You will then be able to access parameters as if register_globals would be on.


-- 
   >O Ernest E. Vogelsinger
   (\)ICQ #13394035
^ http://www.vogelsinger.at/



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] templates

2002-11-19 Thread Adam
Thanks, but not sure if this is what i'm looking for

I just want to setup the PHP script so that the variable $filename can be changed via 
a link such as 'index.php?filename="file.xml"',
causing the script to parse the appropriate file.

Adam.
  - Original Message - 
  From: Ernest E Vogelsinger 
  To: Adam 
  Cc: Jonathan Sharp ; [EMAIL PROTECTED] 
  Sent: Tuesday, November 19, 2002 5:17 PM
  Subject: Re: [PHP] templates


  At 18:04 19.11.2002, Adam spoke out and said:
  [snip]
  >Cheers for replying.
  >
  >I have the menu in place already, it is the PHP end i'm not sure about.
  >Currently I have many php files which only differ in one line:
  >$filename="file.xml";
  >
  >I want to be able to pass this value to the script through a link.
  [snip] 

  How about
  $files = array('file1.xml' => 'Go to file 1',
 'file2.xml' => 'Go to file 2',
 'file3.xml' => 'Go to file 3',
 'file4.xml' => 'Go to file 4');
  foreach ($files as $filename => $text) {
  // you should put your actual menu code here
  echo '', htmlentities($text), '';
  }


  -- 
 >O Ernest E. Vogelsinger 
 (\) ICQ #13394035 
  ^ http://www.vogelsinger.at/





Re: [PHP] templates

2002-11-19 Thread Ernest E Vogelsinger
At 18:04 19.11.2002, Adam spoke out and said:
[snip]
>Cheers for replying.
>
>I have the menu in place already, it is the PHP end i'm not sure about.
>Currently I have many php files which only differ in one line:
>$filename="file.xml";
>
>I want to be able to pass this value to the script through a link.
[snip] 

How about
$files = array('file1.xml' => 'Go to file 1',
   'file2.xml' => 'Go to file 2',
   'file3.xml' => 'Go to file 3',
   'file4.xml' => 'Go to file 4');
foreach ($files as $filename => $text) {
// you should put your actual menu code here
echo '', htmlentities($text), '';
}


-- 
   >O Ernest E. Vogelsinger 
   (\) ICQ #13394035 
^ http://www.vogelsinger.at/



Re: [PHP] templates

2002-11-19 Thread Adam
Cheers for replying.

I have the menu in place already, it is the PHP end i'm not sure about.
Currently I have many php files which only differ in one line:
$filename="file.xml";

I want to be able to pass this value to the script through a link.

A.

- Original Message -
From: "Jonathan Sharp" <[EMAIL PROTECTED]>
To: "Adam" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Tuesday, November 19, 2002 4:33 PM
Subject: Re: [PHP] templates


> I'm assuming you're trying to have a select list.
>
> Try this:
>
>  onChange="window.location='?action=load&file=' +
this.value">
> File XML1
> File foo
> 
>
> Just make sure you test the value you get for file, so that someone
> doesn't pass you /etc/passwd (just an example).
>
> -js
>
>
> Adam wrote:
> > I am developing a site, using XML and PHP for formatting. I want to have
one HTML template and call up the different XML files from a Javascript
menu.
> > Ideally i want to be able to call files from a link, such as:
> > 'index.php?action=load&file="file.xml"'
> >
> > Not sure if this is the right format, but hopefully you get the idea.
> >
> > Cheers,
> > Adam.
> >
>
>
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] templates

2002-11-19 Thread Jonathan Sharp
I'm assuming you're trying to have a select list.

Try this:


File XML1
File foo


Just make sure you test the value you get for file, so that someone
doesn't pass you /etc/passwd (just an example).

-js


Adam wrote:
> I am developing a site, using XML and PHP for formatting. I want to have one HTML 
>template and call up the different XML files from a Javascript menu. 
> Ideally i want to be able to call files from a link, such as:
> 'index.php?action=load&file="file.xml"'
> 
> Not sure if this is the right format, but hopefully you get the idea.
> 
> Cheers,
> Adam.
> 




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] templates and listbox

2002-04-12 Thread Analysis & Solutions

Hey Javier:

On Thu, Apr 11, 2002 at 01:33:10PM -0300, Javier wrote:
> But does it use templates? I want to use templates not functions that
> generates html.

What do you mean, it uses "templates not functions?"  Smarty uses 
functions.  Are you envisioning include files with scripts in them that 
aren't functions?

--Dan

-- 
   PHP classes that make web design easier
SQL Solution  |   Layout Solution   |  Form Solution
sqlsolution.info  | layoutsolution.info |  formsolution.info
 T H E   A N A L Y S I S   A N D   S O L U T I O N S   C O M P A N Y
 4015 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] templates and listbox

2002-04-11 Thread Javier

But does it use templates? I want to use templates not functions that
generates html.

Analysis & Solutions wrote:
> On Wed, Apr 10, 2002 at 06:32:18PM -0300, Javier wrote:
> 
>>Does templates (eg php-templates or Smarty) fill automatically listboxes?
>>Or do I need to code it?
> 
> 
> If your list boxes are coming from data in a MySQL or ODBC database,
> check out my SQL Solution: http://www.sqlsolution.info/.  One of the
> things it does is generate form elements (ie text, checkbox, radio and
> option lists) automatically from your query results.
> 
> --Dan
> 



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] templates and listbox

2002-04-10 Thread Analysis & Solutions

On Wed, Apr 10, 2002 at 06:32:18PM -0300, Javier wrote:
> Does templates (eg php-templates or Smarty) fill automatically listboxes?
> Or do I need to code it?

If your list boxes are coming from data in a MySQL or ODBC database,
check out my SQL Solution: http://www.sqlsolution.info/.  One of the
things it does is generate form elements (ie text, checkbox, radio and
option lists) automatically from your query results.

--Dan

-- 
   PHP classes that make web design easier
SQL Solution  |   Layout Solution   |  Form Solution
sqlsolution.info  | layoutsolution.info |  formsolution.info
 T H E   A N A L Y S I S   A N D   S O L U T I O N S   C O M P A N Y
 4015 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Templates

2002-02-14 Thread Liam MacKenzie

Hey mate,

There's several template engines out there, Take a look around here:
http://www.hotscripts.com/PHP/Scripts_and_Programs/Content_Management/

Hope that helps ya!

  - Lum

- Original Message - 
From: "Truniger, Stefan Martin" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, February 14, 2002 7:46 PM
Subject: [PHP] Templates


Hi every1,
 
I've been playing around with template.inc out of PHPLib.
Now there's just one question dwelling in my head.. is it possible
somehow to get the server to parse any html-file that is requested.
 
example: user requests file index.html, index.html is parsed thru a
standard template to generate the nicely formatted page... 
 
index.html only holds the content of the site and is pure html (maybe
with a tag or two to mark the content and the title or so, but no or
very very little PHP code in it.)
 
I hope  this is more or less understandable... ;oP
 
I'd appreciate any help on that even if you say that it will never
work.. 
 
thanks
 
Stefan

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php







-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] templates

2002-02-08 Thread Kunal Jhunjhunwala

Hey,
Well, I got phplib working.. but i yet think something is missing :) and
have heard a lot of buzz abt smarty... but havent seen any benchmarks...
from the article at devshed.. fast templates should have stayed with perl ;)

anyone else got any suggestions?
Regards,
Kunal Jhunjhunwala

"Minds think with ideas, not information. No amount of data, bandwidth, or
processing power can substitute for inspired thought." - Clifford Stoll
- Original Message -
From: "Nick Wilson" <[EMAIL PROTECTED]>
To: "php-list" <[EMAIL PROTECTED]>
Sent: Saturday, February 09, 2002 1:22 AM
Subject: Re: [PHP] templates


> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
>
> * and then Kunal Jhunjhunwala declared
> > hey,
> > which is the best template library out there? does anyone have any
> > benchmarks? smarty? phplib? any others?
>
> Hehe, still messing with templates kunal?
> There's a good article on PHPLib vs Fastemplate on either devshed or
> phpbuilder but from what I've read PHPLib is the way forward.
> - --
>
> Nick Wilson
>
> Tel: +45 3325 0688
> Fax: +45 3325 0677
> Web: www.explodingnet.com
>
>
>
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.0.6 (GNU/Linux)
>
> iD8DBQE8ZCyEHpvrrTa6L5oRAl4IAJ9HWbjF8fh4nwOV3AAlz2WSNwEbzwCcC6fz
> 3fuFP1328LE9SO2Iabj3jZk=
> =NU8H
> -END PGP SIGNATURE-
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] templates

2002-02-08 Thread Nick Wilson

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1


* and then Kunal Jhunjhunwala declared
> hey,
> which is the best template library out there? does anyone have any
> benchmarks? smarty? phplib? any others?

Hehe, still messing with templates kunal?
There's a good article on PHPLib vs Fastemplate on either devshed or
phpbuilder but from what I've read PHPLib is the way forward.
- -- 

Nick Wilson

Tel:+45 3325 0688
Fax:+45 3325 0677
Web:www.explodingnet.com



-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.6 (GNU/Linux)

iD8DBQE8ZCyEHpvrrTa6L5oRAl4IAJ9HWbjF8fh4nwOV3AAlz2WSNwEbzwCcC6fz
3fuFP1328LE9SO2Iabj3jZk=
=NU8H
-END PGP SIGNATURE-

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] templates

2001-07-23 Thread Jack Sasportas

For future purposes you should set your history to expire some ridiculous time in
the future.  I still reference sites from as far back as 2 years ago...
It's really nice to be able to do that.  I use netscape and my setting is 999
days..

Jack

Kurth Bemis wrote:

> At 11:29 AM 7/23/2001, Jack Sasportas wrote:
>
> I last visited this site about 2 months ago...too long for any history :-(
>
> >Your web browser should have a history option, and you can sift through the
> >list of domains you surfed that approximate time frame ago...Also you can
> >search in some applications like  netscape the history file, and look for key
> >things like templates...
> >
> >Good Luck
> >
> >
> >
> >Kurth Bemis wrote:
> >
> > > i've been looking for a template site that i used and never bookmarked.
> > >
> > > I'll tell you what i remember about the site and hopefully someone will
> > > know what site i'm talking about.  I've spend the last 5 hours looking for
> > > this siteso this is my final stab in the dark.
> > >
> > > The site had 4 categories of templates.  one was business templates and the
> > > other was user templates.
> > >
> > > most of the designs were linkware.
> > >
> > > and most of the templates were in plain html.
> > >
> > > the site had a lot of templates...150+?
> > >
> > > does anybody remember a free template site like that?  I'm pulling my hair
> > > out because ti was a good template site...not one of those cheezy one
> > > design 50 different color template sites.
> > >
> > > ~kurth
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
> >--
> >___
> >Jack Sasportas
> >Innovative Internet Solutions
> >Phone 305.665.2500
> >Fax 305.665.2551
> >www.innovativeinternet.com
> >www.web56.net
> >
> >
> >
> >--
> >PHP General Mailing List (http://www.php.net/)
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
> >To contact the list administrators, e-mail: [EMAIL PROTECTED]

--
___
Jack Sasportas
Innovative Internet Solutions
Phone 305.665.2500
Fax 305.665.2551
www.innovativeinternet.com
www.web56.net



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] templates

2001-07-23 Thread Kurth Bemis

At 11:29 AM 7/23/2001, Jack Sasportas wrote:

I last visited this site about 2 months ago...too long for any history :-(

>Your web browser should have a history option, and you can sift through the
>list of domains you surfed that approximate time frame ago...Also you can
>search in some applications like  netscape the history file, and look for key
>things like templates...
>
>Good Luck
>
>
>
>Kurth Bemis wrote:
>
> > i've been looking for a template site that i used and never bookmarked.
> >
> > I'll tell you what i remember about the site and hopefully someone will
> > know what site i'm talking about.  I've spend the last 5 hours looking for
> > this siteso this is my final stab in the dark.
> >
> > The site had 4 categories of templates.  one was business templates and the
> > other was user templates.
> >
> > most of the designs were linkware.
> >
> > and most of the templates were in plain html.
> >
> > the site had a lot of templates...150+?
> >
> > does anybody remember a free template site like that?  I'm pulling my hair
> > out because ti was a good template site...not one of those cheezy one
> > design 50 different color template sites.
> >
> > ~kurth
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>--
>___
>Jack Sasportas
>Innovative Internet Solutions
>Phone 305.665.2500
>Fax 305.665.2551
>www.innovativeinternet.com
>www.web56.net
>
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] templates

2001-07-23 Thread Jack Sasportas

Your web browser should have a history option, and you can sift through the
list of domains you surfed that approximate time frame ago...Also you can
search in some applications like  netscape the history file, and look for key
things like templates...

Good Luck



Kurth Bemis wrote:

> i've been looking for a template site that i used and never bookmarked.
>
> I'll tell you what i remember about the site and hopefully someone will
> know what site i'm talking about.  I've spend the last 5 hours looking for
> this siteso this is my final stab in the dark.
>
> The site had 4 categories of templates.  one was business templates and the
> other was user templates.
>
> most of the designs were linkware.
>
> and most of the templates were in plain html.
>
> the site had a lot of templates...150+?
>
> does anybody remember a free template site like that?  I'm pulling my hair
> out because ti was a good template site...not one of those cheezy one
> design 50 different color template sites.
>
> ~kurth
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]

--
___
Jack Sasportas
Innovative Internet Solutions
Phone 305.665.2500
Fax 305.665.2551
www.innovativeinternet.com
www.web56.net



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Templates??

2001-06-19 Thread py

"FYI, at the last ThunderLizard web design conference, a presenter speaking
about content management tools said that most sites only need 6 or so
templates ... that there are usually only 6 categories of pages."

Salut,
do you know where we could get more info about that conference? What are his
6 categories of pages?
I am focusing on "Templating" my sites now and I am interested in what was
said there.
py



- Original Message -
From: Les Neste <[EMAIL PROTECTED]>
To: Daniel Guerrier <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Tuesday, June 19, 2001 6:29 AM
Subject: Re: [PHP] Templates??


> The template defines the look and feel for a class of pages.  The
advantage
> is in allowing you to change one file -- the template file -- and have
your
> changes be reflected in all the individual pages that use the template
> WITHOUT having to individually edit all of those pages.
>
> For smaller sites, this may not be a big deal, but, for sites with
> thousands of pages, you clearly want to avoid hand-edits if at all
possible.
>
> I'm personally reworking my online portfolio, and I'm now using templates
> so I can present a different look and feel to suit different potential
> clients.
>
> FYI, at the last ThunderLizard web design conference, a presenter speaking
> about content management tools said that most sites only need 6 or so
> templates ... that there are usually only 6 categories of pages.
>
>
>
> At 05:48 PM 6/18/2001 -0700, Daniel Guerrier wrote:
> >What the true advantage of using templates and where
> >can I get info on using them?
> >
> >__
> >Do You Yahoo!?
> >Spot the hottest trends in music, movies, and more.
> >http://buzz.yahoo.com/
> >
>
>

> Les Neste  678-778-0382  http://www.lesneste.com




Re: [PHP] Templates??

2001-06-19 Thread Les Neste

The template defines the look and feel for a class of pages.  The advantage
is in allowing you to change one file -- the template file -- and have your
changes be reflected in all the individual pages that use the template
WITHOUT having to individually edit all of those pages.  

For smaller sites, this may not be a big deal, but, for sites with
thousands of pages, you clearly want to avoid hand-edits if at all possible.

I'm personally reworking my online portfolio, and I'm now using templates
so I can present a different look and feel to suit different potential
clients.

FYI, at the last ThunderLizard web design conference, a presenter speaking
about content management tools said that most sites only need 6 or so
templates ... that there are usually only 6 categories of pages.



At 05:48 PM 6/18/2001 -0700, Daniel Guerrier wrote:
>What the true advantage of using templates and where
>can I get info on using them?
>
>__
>Do You Yahoo!?
>Spot the hottest trends in music, movies, and more.
>http://buzz.yahoo.com/
>


Les Neste  678-778-0382  http://www.lesneste.com



Re: [PHP] Templates??

2001-06-19 Thread Attila Strauss

Hi,


> What the true advantage of using templates 
Abstraction between PHP and HTML.

>where can I get info on using them?
have a look at the well-known php sites like:

http://www.phpbuilder.com/
http://www.phpdeveloper.org/
http://www.newbienetwork.net/
http://www.evilwalrus.com/






Re: [PHP] Templates/Graphics/Text

2001-05-02 Thread Philip Olson


sounds like you're wanting to do this :

  // get mode from url or preferences or somewhere
  $mode = strtolower($HTTP_GET_VARS['mode']);

  if ($mode == 'text') {

 include 'txt_template.php';

  } else {

 include 'img_template.php';

  }

  include 'content_page.html';

now :

  index.php?mode=text // loads text template
  index.php ...   // anything else loads img template

regarding friendly search-engine pages, have a look at these two tutorials :

  http://www.phpbuilder.com/columns/tim2526.php3
  http://www.zend.com/zend/spotlight/searchengine.php

also, consider sending 'lynx' users to your text templatized pages ;-) and
fyi, the above if/else can be written as follows (ternary conditional
operator) :

 include ($mode == 'text') ? 'txt_template.php' : 'img_template.php';

regards,
philip


On Wed, 2 May 2001, Ashley M. Kirchner wrote:

> 
> I'm trying to figure out what's the best way to do something that
> may be simple, however I can't for the life of me envision it.
> 
> I want to have three files as follows:
> 
> [ NOTE: I may be thinking of this the wrong way (by thinking up
>   three files.)  If someone has a better suggestion, please speak
>   up!  I'm willing to entertain other solutions. ]
> 
> -> img_template.php  (which contains the full, graphical
>   website page, except for the content)
> -> txt_template.php  (which contains the full page, without
>   any of the bells and whistles, graphics
>   javascript and all)
> -> content_page.html (which is the actual content)
> 
> This is where I get stuck.  What to do?  To me, the easiest seems
> to be one single (control) file for the whole site, which then loads
> up the content based on the URI.  For example:
> 
> http://our.web.site/index.php?page_to_load
> - this will grab the img_template.php file, then
> - fetch 'page_to_load.html' and insert it into the template
>   and serve it.
> 
> However, will this pose a problem for search engines?  Or for
> anything else?  I don't know.  Anyone?
> 
> Now, we would also like to have the whole site be in text format
> (really a slimmed down page without all the graphics, roll-overs, easy
>  to print and such).
> 
> I'm thinking, add another variable:
> 
> http://our.web.site/index.php?page_to_load&format=text
> 
> or: http://our.web.site/index.php?page_to_load&format=graphic
> 
> But again, how will search engines handle this?
> 
> And, I would also have to be able to dynamically update any anchor
> links that show up in the content so it knows what it needs to link to
> in terms of format.  Somewhat stupid to have someone click on a
> 'text only' link, and when following another link from that it drops
> back to a graphic based page.
> 
> 
> Call for comments.  Suggestions.  A blow to the head.  Something.
> I'd like to make this so that future site re-designs won't be as
> painful as this one is turning out to be (currently all 500+ pages of
> the site have everything hard coded, so changing something in say a
> menu causes a real problem).
> 
> And yes, I've looked at FastTemplates and I'm, uh, somewhat lost,
> but that may be because I haven't really spent a whole lot of time
> reading up on it.  Also, the stuff on there dates back to 1999 - has
> it not been updated recently?  Or did it not need any?
> 
> AMK4
> 
> --
> W |
>   |  I haven't lost my mind; it's backed up on tape somewhere.
>   |
>   ~
>   Ashley M. Kirchner    .   303.442.6410 x130
>   SysAdmin / Websmith   . 800.441.3873 x130
>   Photo Craft Laboratories, Inc. .eFax 248.671.0909
>   http://www.pcraft.com  . 3550 Arapahoe Ave #6
>   .. .  .  . .   Boulder, CO 80303, USA
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Templates/Graphics/Text

2001-05-02 Thread Ashley M. Kirchner

Chris Anderson wrote:

> Personally I prefer to do the following:
> -Include things like navigation, banners, etc in a nav.inc file. Since
> this is loaded first
> I include meta tags for search engines in here
> -My content goes in individual files, that can be dynamically loaded
> -I have a third "footer" file which includes anything at the end, such
> as table closings and the
> graphics to close up the site

However, wouldn't this mean that if you change something, or add a new
element, you'd have to edit all of your files again to include the new .inc
file, or however you make it?  This is what I want to avoid, having to edit
a zillion files to make changes.  I'd rather have one master template that
dynamically pulls the content in.  This way I can change that template to my
heart's content and not worry about having to edit content files.  Maybe I'm
not seeing it all, but then, this is why I'm asking for suggestions.

Does anyone else have more/other suggestions?

AMK4

--
H | Hi, I'm currently out of my mind.  Please leave a message.  BP!
  +
  Ashley M. Kirchner    .   303.442.6410 x130
  Director of Internet Operations / SysAdmin. 800.441.3873 x130
  Photo Craft Laboratories, Inc.. 3550 Arapahoe Ave, #6
  http://www.pcraft.com . .  ..   Boulder, CO 80303, U.S.A.



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Templates/Graphics/Text

2001-05-02 Thread Chris Anderson

Personally I prefer to do the following:
-Include things like navigation, banners, etc in a nav.inc file. Since
this is loaded first
I include meta tags for search engines in here
-My content goes in individual files, that can be dynamically loaded
-I have a third "footer" file which includes anything at the end, such
as table closings and the
graphics to close up the site

As long as the meta tags are in the main page (ie the nav in my
example), the search engine can parse it out and display it. They just
won't get a url with a ?something=something. I may be wrong though.
That's just how I do it

Chris Anderson   aka "Null"

PHP Developer / Nulltech
PHP-GTK Grunt / gtk.php.net
STA-DoD, TO and DDay Administrator / www.stronger.org
DOD Co-Owner / www.dayofdefeat.com
Zeroping Staff Member / www.zeroping.com
Volition Programmer / www.Volition-net.com
- Original Message -
From: "Ashley M. Kirchner" <[EMAIL PROTECTED]>
To: "PHP-General List" <[EMAIL PROTECTED]>
Sent: Wednesday, May 02, 2001 5:27 PM
Subject: [PHP] Templates/Graphics/Text


|
| I'm trying to figure out what's the best way to do something
that
| may be simple, however I can't for the life of me envision it.
|
| I want to have three files as follows:
|
| [ NOTE: I may be thinking of this the wrong way (by thinking up
|   three files.)  If someone has a better suggestion, please
speak
|   up!  I'm willing to entertain other solutions. ]
|
| -> img_template.php  (which contains the full, graphical
|   website page, except for the content)
| -> txt_template.php  (which contains the full page, without
|   any of the bells and whistles,
graphics
|   javascript and all)
| -> content_page.html (which is the actual content)
|
| This is where I get stuck.  What to do?  To me, the easiest
seems
| to be one single (control) file for the whole site, which then loads
| up the content based on the URI.  For example:
|
| http://our.web.site/index.php?page_to_load
| - this will grab the img_template.php file, then
| - fetch 'page_to_load.html' and insert it into the template
|   and serve it.
|
| However, will this pose a problem for search engines?  Or for
| anything else?  I don't know.  Anyone?
|
| Now, we would also like to have the whole site be in text format
| (really a slimmed down page without all the graphics, roll-overs,
easy
|  to print and such).
|
| I'm thinking, add another variable:
|
| http://our.web.site/index.php?page_to_load&format=text
|
| or: http://our.web.site/index.php?page_to_load&format=graphic
|
| But again, how will search engines handle this?
|
| And, I would also have to be able to dynamically update any
anchor
| links that show up in the content so it knows what it needs to link
to
| in terms of format.  Somewhat stupid to have someone click on a
| 'text only' link, and when following another link from that it drops
| back to a graphic based page.
|
|
| Call for comments.  Suggestions.  A blow to the head.
Something.
| I'd like to make this so that future site re-designs won't be as
| painful as this one is turning out to be (currently all 500+ pages
of
| the site have everything hard coded, so changing something in say a
| menu causes a real problem).
|
| And yes, I've looked at FastTemplates and I'm, uh, somewhat
lost,
| but that may be because I haven't really spent a whole lot of time
| reading up on it.  Also, the stuff on there dates back to 1999 - has
| it not been updated recently?  Or did it not need any?
|
| AMK4
|
| --
| W |
|   |  I haven't lost my mind; it's backed up on tape somewhere.
|
|
|
~
|   Ashley M. Kirchner    .   303.442.6410
x130
|   SysAdmin / Websmith   . 800.441.3873
x130
|   Photo Craft Laboratories, Inc. .eFax
248.671.0909
|   http://www.pcraft.com  . 3550 Arapahoe Ave
#6
|   .. .  .  . .   Boulder, CO 80303,
USA
|
|
|
| --
| PHP General Mailing List (http://www.php.net/)
| To unsubscribe, e-mail: [EMAIL PROTECTED]
| For additional commands, e-mail: [EMAIL PROTECTED]
| To contact the list administrators, e-mail:
[EMAIL PROTECTED]
|
|



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Templates - Perl to PHP

2001-03-06 Thread Michael Kimsal

Hola - your English is mucho better than my Spanish (or is it Portguese in
Brazil?)  sorry!

I assume you're looking for PHP code equivalents for this, correct?

Is there any reason you can't just put the code in your template?


  
  
  
  




That would do it just as well.  Admittedly, there's more < > and ? than you
might like,
but it's as functional (if not more so) and it's one less thing for your script
to process
at the end of the day.


Marco Aurélio wrote:

> Hello!
> ...
> {IF IMAGE}
>   
>   
>   
>   
> {ENDIF}
>
> Thus all code between the if statement will be printed if $image is set else
> nothing will be.
>
> This is very useful when you have a list of elements that someone have some
> elements and others not, eg:
>
> 1) The template without this enhancement:
>
> 
> 
> {NAME}
> {EMAIL}
>
> Thus if the current user doesn't have a image the ,  and 
> tags will be printed in any way.
>
> 2) The template with  the enhancement:
>
> {IF IMAGE}
> 
> 
> 
> 
> {ENDIF}
> {NAME}
> {EMAIL}
>
> Thus if the current user doesn't have a image the ,  and 
> tags will not be printed in any way, maintaining the desired design. THIS IS
> GREAT !!!
>
> Note)
>
> Also, would be excellent if we have the following options on tags:
>
> 1) include a file not parsed (straight include of HTML) (allows php code)
> 2) include a file parsed (parse the include file for tags) (allows php code)
>
> Is possible to convert the Template.pm (see annexed file) by Gossamer
> to php class ???

It probably is, if anyone wants to take a stab, but we generally just use the
method
I described above.




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Templates & PHP

2001-02-23 Thread PHPBeginner.com

try these:

search google for fast templates
templates,

check out sourceforge.net

there's a whole bunch of this applications.


Sincerely,

 Maxim Maletsky
 Founder, Chief Developer

 PHPBeginner.com (Where PHP Begins)
 [EMAIL PROTECTED]
 www.phpbeginner.com




-Original Message-
From: Maamiin [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 23, 2001 4:06 AM
To: PHP General Newslist
Subject: [PHP] Templates & PHP


Where can I find some help, how to make & use page templates on my
webpages??? Needs this some add-ons to my PHP3(Linux-main)/PHP4(win98+pws)?

THNX


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Templates

2001-01-15 Thread Paul K Egell-Johnsen

andrew wrote:
> 
> Sure,
> 
> My understanding of templating engines
> 1.array or item is assigned to a variable
> 2.php placeholders in a html page match in name to above variable.
> 3.a parser separate from php subsitutes the variable values set in (1)
> into (2)
> 
> I've seen plenty of examples where there is a file containing lists of
> variable to item assignment, and thase files are passed to a one of a few
> template pages for layout.
> 
> There must be a way to pass the result set of an SQL query into the set of
> placeholders - the end result would be that you could call whole sites via
> simple queries. All you have to pass in would be the SQL parameter.
> 
> i.e. Table named 'Pvalues'
> 
> Pvalues Sample Row
> --
> page_id contactus.html
> page_name   Contact Us
> page_title  Contact US
> header_text Please send an email
> body_text   [EMAIL PROTECTED]
> footer_text thanks!

Check out http://www.scripps.edu/~jesusmc/cachedtpl/CachedTemplate.html
by Jesus M Castagnetto. His class solves the problem with caching
templates for all the template classes he has found.

One of those he found was a class called XTemplates, that class have
some very good functions, you could write this in your templae page:

{Pvalues.page_id}

and in the php page you could assign the result set directly to Pvalues,
and all items called Pvalues.something would be filled out with the
column of the same name.

The only drawback of XTemplates is that it adds some extra spaces to the
output, which on large pages might amount to quite a bit, but since
you're complentating working something like this out, you might instead
rewrite this class to remove that bit of a problem. (I haven't had the
time to track the bug down myself.)

Some timings I've made have shown that XTemplates on a large result set
seems to be only 10% slower than the templates which comes with PHPLib,
which is pretty good.

Finally it is much easier to use and initalize than any template engine
I've tried.
-- 
Paul K Egell-Johnsen
Developer/PR Manager
zez.org: about code
http://zez.org/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Templates

2001-01-14 Thread Alex Black

well, I suppose it could, but it's pretty weird...

why would you want to directly hook up presentation w/sql queries ? :)

-a


--
Alex Black, Head Monkey
[EMAIL PROTECTED]

The Turing Studio, Inc.
http://www.turingstudio.com

vox+510.666.0074
fax+510.666.0093

Saul Zaentz Film Center
2600 Tenth St Suite 433
Berkeley, CA 94710-2522




> From: [EMAIL PROTECTED] (andrew)
> Newsgroups: php.general
> Date: 13 Jan 2001 17:06:48 -0800
> Subject: Re: [PHP] Templates
> 
> Sure,
> 
> My understanding of templating engines
> 1.array or item is assigned to a variable
> 2.php placeholders in a html page match in name to above variable.
> 3.a parser separate from php subsitutes the variable values set in (1)
> into (2)
> 
> I've seen plenty of examples where there is a file containing lists of
> variable to item assignment, and thase files are passed to a one of a few
> template pages for layout.
> 
> There must be a way to pass the result set of an SQL query into the set of
> placeholders - the end result would be that you could call whole sites via
> simple queries. All you have to pass in would be the SQL parameter.
> 
> i.e. Table named 'Pvalues'
> 
> Pvalues Sample Row
> --
> page_id contactus.html
> page_name   Contact Us
> page_title  Contact US
> header_text Please send an email
> body_text   [EMAIL PROTECTED]
> footer_text thanks!
> 
> 
> You can even generate a list of links dynamically for nav bar via:
> 
> "select page_name, page_id from Pvalues", if you account for performance
> issues.
> 
> If the usre clicks on the "contact us" link, it returns a page_id value of
> contactus.html.  So then:
> 
> "select * from Pvalues where page_id = "contactus.html"
> 
> Then call a templating parser and pass it the values of the select statement
> and which template to use.
> 
> Can this be done, or I am way off base on this?
> 
> regards,
> andrew
> 
> 
> 
> 
> 
> 
> 
> 
> 
> On 1/13/01 7:27 PM, "Michael Kimsal" <[EMAIL PROTECTED]> wrote:
> 
>> I thought I understood your question, but I think I need a clarification.
>> Can you elaborate a bit?  I think I have an answer, but I'm not 100% what
>> you're meaning here.
>> 
>> Thanks.
>> 
>> 
>> andrew wrote:
>> 
>>> Michael,
>>> 
>>> Wouldn't a benefit be that you could pass a database query in via that
>>> variable, either via form submit or value of a clicked link?
>>> 
>>> I know PHP can do this without a separate templating engine, but if you do
>>> use one then you can submit an array to a specific template.  Is there a way
>>> to do this via built in functions without constructing the set of page
>>> object's first, or can you only do this in templates?
>>> 
>>> regards,
>>> andrew
>>> 
>>> On 1/13/01 7:06 PM, "Michael Kimsal" <[EMAIL PROTECTED]> wrote:
>>> 
>>>> 
>>>> 
>>>> [EMAIL PROTECTED] wrote:
>>>> 
>>>>> I looked around the web for templates and founf FastTemplates. Not exactly
>>>>> what i was looking for thoug
>>>>> lets say I have
>>>>> $file = "111"
>>>>> and there is a template "template.txt"
>>>>> and it contains
>>>>> "file #$file is blahlah"
>>>>> 
>>>>> how can I make that a template?
>>>>> 
>>>>> Thanks
>>>>> - Peter
>>>>> 
>>>> 
>>>> Any reason 'template.txt' couldn't just say
>>>> 
>>>> file $ is blahlah
>>>> 
>>>> then include('template.txt'); in your main file?
>>>> 
>>>> Not sure why you'd want to complicate things with
>>>> something like FastTemplates - I understand it has a use
>>>> and purpose, but the only long term benefit I see from
>>>> involved schemes like that won't be realized anyway
>>>> (discussion for another day).
>>>> 
>>>> 
>>>> 
>> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Templates

2001-01-14 Thread Michael Kimsal

Not too similar to the caching issue of template output -
I maybe missing something, but at least in our case, *every* page
made with templates has custom info re: the client (name, etc) which
can't, imo, be cached, unless we started caching multiple bits of the templates
then assembling them - potentially lots more disk access than we'd want.

We *do* cache query results for queries that we know will have
similar results for a long time ('customers not on credit hold' for example -
for one client in particular the results of this query would only change daily, as
they only updated 'credit hold' info daily, so we cache this for a few hours, saving
db hits).



andrew wrote:

> Yup, I believe so - I've been wrestling with this idea for a while and
> trying to figure out how to integrate it into the parser explained in a
> PHPBuilder Article on Cached Modules:
>
> http://www.phpbuilder.net/columns/jprins2201.php3
>
> In the above, I think the point is to create little block templates on a
> page, that can essentially return html.  Now, the article mostly covers how
> to cache this for peformance reasons, but integrating FastTemplates with it
> in the manner below makes sense.
>
> Are you doing something similar?
>
> regards,
> andrew


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Templates

2001-01-13 Thread andrew

Yup, I believe so - I've been wrestling with this idea for a while and
trying to figure out how to integrate it into the parser explained in a
PHPBuilder Article on Cached Modules:

http://www.phpbuilder.net/columns/jprins2201.php3

In the above, I think the point is to create little block templates on a
page, that can essentially return html.  Now, the article mostly covers how
to cache this for peformance reasons, but integrating FastTemplates with it
in the manner below makes sense.

Are you doing something similar?

regards,
andrew



On 1/13/01 8:37 PM, "Michael Kimsal" <[EMAIL PROTECTED]> wrote:

> I'm sure it could be done, just with a bit of planning.
> 
> The notion of passing in sql results is not foreign - we do it
> sometimes to our own 'templates', but our templates are generally
> just HTML with a bit of PHP in there, whereas the initial PHP page
> is PHP with a tiny bit of HTML.  If there's a large result set that needs
> parsing through, we'll normally do it in the PHP code, and write the results
> out to
> a variable, substituted in the 'template'.  You could instead have a 'template
> system' or php itself loop through that in the 'template' itself - whichever
> makes
> more sense to the end coders.
> 
> I'd THINK you could do what you wanted with an array
> 
> $sql = one row of SQL results, in a has.
> 
> Passing $sql to the template, you could then have
> $sql["page_id"]
> $sql["page_name"]
> etc.
> 
> Pulling stuff from the database drivers into an associate array would do this
> -
> is this what you're talking about?
> 
> 
> andrew wrote:
> 
>> Sure,
>> 
>> My understanding of templating engines
>> 1.array or item is assigned to a variable
>> 2.php placeholders in a html page match in name to above variable.
>> 3.a parser separate from php subsitutes the variable values set in (1)
>> into (2)
>> 
>> I've seen plenty of examples where there is a file containing lists of
>> variable to item assignment, and thase files are passed to a one of a few
>> template pages for layout.
>> 
>> There must be a way to pass the result set of an SQL query into the set of
>> placeholders - the end result would be that you could call whole sites via
>> simple queries. All you have to pass in would be the SQL parameter.
>> 
>> i.e. Table named 'Pvalues'
>> 
>> Pvalues Sample Row
>> --
>> page_id contactus.html
>> page_name   Contact Us
>> page_title  Contact US
>> header_text Please send an email
>> body_text   [EMAIL PROTECTED]
>> footer_text thanks!
>> 
>> You can even generate a list of links dynamically for nav bar via:
>> 
>> "select page_name, page_id from Pvalues", if you account for performance
>> issues.
>> 
>> If the usre clicks on the "contact us" link, it returns a page_id value of
>> contactus.html.  So then:
>> 
>> "select * from Pvalues where page_id = "contactus.html"
>> 
>> Then call a templating parser and pass it the values of the select statement
>> and which template to use.
>> 
>> Can this be done, or I am way off base on this?
>> 
>> regards,
>> andrew
> 
> 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Templates

2001-01-13 Thread Michael Kimsal

I'm sure it could be done, just with a bit of planning.

The notion of passing in sql results is not foreign - we do it
sometimes to our own 'templates', but our templates are generally
just HTML with a bit of PHP in there, whereas the initial PHP page
is PHP with a tiny bit of HTML.  If there's a large result set that needs
parsing through, we'll normally do it in the PHP code, and write the results out to
a variable, substituted in the 'template'.  You could instead have a 'template
system' or php itself loop through that in the 'template' itself - whichever makes
more sense to the end coders.

I'd THINK you could do what you wanted with an array

$sql = one row of SQL results, in a has.

Passing $sql to the template, you could then have
$sql["page_id"]
$sql["page_name"]
etc.

Pulling stuff from the database drivers into an associate array would do this -
is this what you're talking about?


andrew wrote:

> Sure,
>
> My understanding of templating engines
> 1.array or item is assigned to a variable
> 2.php placeholders in a html page match in name to above variable.
> 3.a parser separate from php subsitutes the variable values set in (1)
> into (2)
>
> I've seen plenty of examples where there is a file containing lists of
> variable to item assignment, and thase files are passed to a one of a few
> template pages for layout.
>
> There must be a way to pass the result set of an SQL query into the set of
> placeholders - the end result would be that you could call whole sites via
> simple queries. All you have to pass in would be the SQL parameter.
>
> i.e. Table named 'Pvalues'
>
> Pvalues Sample Row
> --
> page_id contactus.html
> page_name   Contact Us
> page_title  Contact US
> header_text Please send an email
> body_text   [EMAIL PROTECTED]
> footer_text thanks!
>
> You can even generate a list of links dynamically for nav bar via:
>
> "select page_name, page_id from Pvalues", if you account for performance
> issues.
>
> If the usre clicks on the "contact us" link, it returns a page_id value of
> contactus.html.  So then:
>
> "select * from Pvalues where page_id = "contactus.html"
>
> Then call a templating parser and pass it the values of the select statement
> and which template to use.
>
> Can this be done, or I am way off base on this?
>
> regards,
> andrew


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Templates

2001-01-13 Thread andrew

Sure,

My understanding of templating engines
1.array or item is assigned to a variable
2.php placeholders in a html page match in name to above variable.
3.a parser separate from php subsitutes the variable values set in (1)
into (2)

I've seen plenty of examples where there is a file containing lists of
variable to item assignment, and thase files are passed to a one of a few
template pages for layout.

There must be a way to pass the result set of an SQL query into the set of
placeholders - the end result would be that you could call whole sites via
simple queries. All you have to pass in would be the SQL parameter.

i.e. Table named 'Pvalues'

Pvalues Sample Row
--
page_id contactus.html
page_name   Contact Us
page_title  Contact US
header_text Please send an email
body_text   [EMAIL PROTECTED]
footer_text thanks!


You can even generate a list of links dynamically for nav bar via:

"select page_name, page_id from Pvalues", if you account for performance
issues.

If the usre clicks on the "contact us" link, it returns a page_id value of
contactus.html.  So then:

"select * from Pvalues where page_id = "contactus.html"

Then call a templating parser and pass it the values of the select statement
and which template to use.

Can this be done, or I am way off base on this?

regards,
andrew









 On 1/13/01 7:27 PM, "Michael Kimsal" <[EMAIL PROTECTED]> wrote:

> I thought I understood your question, but I think I need a clarification.
> Can you elaborate a bit?  I think I have an answer, but I'm not 100% what
> you're meaning here.
> 
> Thanks.
> 
> 
> andrew wrote:
> 
>> Michael,
>> 
>> Wouldn't a benefit be that you could pass a database query in via that
>> variable, either via form submit or value of a clicked link?
>> 
>> I know PHP can do this without a separate templating engine, but if you do
>> use one then you can submit an array to a specific template.  Is there a way
>> to do this via built in functions without constructing the set of page
>> object's first, or can you only do this in templates?
>> 
>> regards,
>> andrew
>> 
>> On 1/13/01 7:06 PM, "Michael Kimsal" <[EMAIL PROTECTED]> wrote:
>> 
>>> 
>>> 
>>> [EMAIL PROTECTED] wrote:
>>> 
 I looked around the web for templates and founf FastTemplates. Not exactly
 what i was looking for thoug
 lets say I have
 $file = "111"
 and there is a template "template.txt"
 and it contains
 "file #$file is blahlah"
 
 how can I make that a template?
 
 Thanks
 - Peter
 
>>> 
>>> Any reason 'template.txt' couldn't just say
>>> 
>>> file $ is blahlah
>>> 
>>> then include('template.txt'); in your main file?
>>> 
>>> Not sure why you'd want to complicate things with
>>> something like FastTemplates - I understand it has a use
>>> and purpose, but the only long term benefit I see from
>>> involved schemes like that won't be realized anyway
>>> (discussion for another day).
>>> 
>>> 
>>> 
> 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Templates

2001-01-13 Thread Michael Kimsal

I thought I understood your question, but I think I need a clarification.
Can you elaborate a bit?  I think I have an answer, but I'm not 100% what
you're meaning here.

Thanks.


andrew wrote:

> Michael,
>
> Wouldn't a benefit be that you could pass a database query in via that
> variable, either via form submit or value of a clicked link?
>
> I know PHP can do this without a separate templating engine, but if you do
> use one then you can submit an array to a specific template.  Is there a way
> to do this via built in functions without constructing the set of page
> object's first, or can you only do this in templates?
>
> regards,
> andrew
>
> On 1/13/01 7:06 PM, "Michael Kimsal" <[EMAIL PROTECTED]> wrote:
>
> >
> >
> > [EMAIL PROTECTED] wrote:
> >
> >> I looked around the web for templates and founf FastTemplates. Not exactly
> >> what i was looking for thoug
> >> lets say I have
> >> $file = "111"
> >> and there is a template "template.txt"
> >> and it contains
> >> "file #$file is blahlah"
> >>
> >> how can I make that a template?
> >>
> >> Thanks
> >> - Peter
> >>
> >
> > Any reason 'template.txt' couldn't just say
> >
> > file $ is blahlah
> >
> > then include('template.txt'); in your main file?
> >
> > Not sure why you'd want to complicate things with
> > something like FastTemplates - I understand it has a use
> > and purpose, but the only long term benefit I see from
> > involved schemes like that won't be realized anyway
> > (discussion for another day).
> >
> >
> >


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Templates

2001-01-13 Thread andrew

Michael,

Wouldn't a benefit be that you could pass a database query in via that
variable, either via form submit or value of a clicked link?

I know PHP can do this without a separate templating engine, but if you do
use one then you can submit an array to a specific template.  Is there a way
to do this via built in functions without constructing the set of page
object's first, or can you only do this in templates?

regards,
andrew



On 1/13/01 7:06 PM, "Michael Kimsal" <[EMAIL PROTECTED]> wrote:

> 
> 
> [EMAIL PROTECTED] wrote:
> 
>> I looked around the web for templates and founf FastTemplates. Not exactly
>> what i was looking for thoug
>> lets say I have
>> $file = "111"
>> and there is a template "template.txt"
>> and it contains
>> "file #$file is blahlah"
>> 
>> how can I make that a template?
>> 
>> Thanks
>> - Peter
>> 
> 
> Any reason 'template.txt' couldn't just say
> 
> file $ is blahlah
> 
> then include('template.txt'); in your main file?
> 
> Not sure why you'd want to complicate things with
> something like FastTemplates - I understand it has a use
> and purpose, but the only long term benefit I see from
> involved schemes like that won't be realized anyway
> (discussion for another day).
> 
> 
> 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Templates

2001-01-13 Thread Michael Kimsal



[EMAIL PROTECTED] wrote:

> I looked around the web for templates and founf FastTemplates. Not exactly
> what i was looking for thoug
> lets say I have
> $file = "111"
> and there is a template "template.txt"
> and it contains
> "file #$file is blahlah"
>
> how can I make that a template?
>
> Thanks
> - Peter
>

Any reason 'template.txt' couldn't just say

file $ is blahlah

then include('template.txt'); in your main file?

Not sure why you'd want to complicate things with
something like FastTemplates - I understand it has a use
and purpose, but the only long term benefit I see from
involved schemes like that won't be realized anyway
(discussion for another day).




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]