UPDATED: Sunday, 22-Jul-2001 11:28:01 EDT
THIS IS THE OLD SITE: Site Updated
Listed by date of release or update, most recent first.
UPDATE: July 20, 1999: First PHP4 wierdness found. PHP4 does not like the {$ combinations within FT's parse() routine. Here's the diff:
--- class.FastTemplate.php3 Sun Jun 27 13:44:47 1999
+++ php4.FastTemplate.php3 Tue Jul 20 10:49:25 1999
@@ -196,8 +196,10 @@
settype($val,"string");
}
- $template = ereg_replace("{$key}","$val","$template");
- //$template = str_replace("{$key}","$val","$template");
+ // php4 doesn't like '{$' combinations.
+ $key = '{'."$key".'}';
+ $template = ereg_replace("$key","$val","$template");
+ //$template = str_replace("$key","$val","$template");
}
}
@@ -410,7 +412,7 @@
}
if($end)
{
- $newParent .= "{$MacroName}\n";
+ $newParent .= '{'."$MacroName}\n";
}
// Next line please
if($end) { $end = false; }
UPDATE: July 19, 1999: PHP4/Zend has finally been released into public Beta. If anyone running PHP4 runs into a problem under the new environment, let me know. I should have the majority of my code tested for PHP4 by the end of this week. If I run into any major weirdness I'll release an updated class file asap.
UPDATE: June 28 1999: Two things. First:I built PHP 3.0.11
this morning and they've apparently fixed the str_replace() bug in PHP. If
you run PHP 3.0.11 you can safely edit the FT source and change it to use
str_replace() (Just do a search for it in the code - there's only one line,
just uncomment the str_replace() line and comment the ereg_replace() line)
Don't do this on pre 3.0.11 builds of PHP as it'll core dump Apache when you
try it). See the CHANGELOG for more details.
Second: FastTemplate 0.8 is available if you really want it.
Apologies to the Freshmeat link-followers that are getting the 404
error. I didn't make the announcement on Freshmeat, and FT 0.8 does have a
few bugs so it's better if you use 1.1.0 anyway. Pop me a note if you want an older version of
any of the classes here.
Latest Version 1.1.0: FastTemplate-1_1_0.tar.gz
Release Date: Sunday, 22-Jul-2001 10:51:48 EDT
View the source Luke: Pretty or Plain
RTFM Please: FastTemplate Htmlized Man Page
View the CHANGELOG
Ported From: CGI::FastTemplate
Hey, that PHP Guru Sascha Schumann wrote up a nice FastTemplate Tutorial. Check it out!
Note: If you've got an anal build of PHP you might receive the
following warning:
Warning: Uninitialized variable or array index or property (????) in
class.FastTemplate.php3 on line 299
If this happens, make the following changes (add 1 line):
--- class.FastTemplate.php3~ Tue Jun 29 08:40:14 1999
+++ class.FastTemplate.php3 Tue Jun 29 08:41:06 1999
@@ -296,6 +296,7 @@
if($append)
{
+ if(!isset($this->$ReturnVar)) { $this->$ReturnVar = ""; }
$this->$ReturnVar .= $this->parse_template($this->$val,$this->PARSEVARS);
}
else
Latest Version 1.0: File-1_0.tar.gz
Release Date: Sunday, 22-Jul-2001 10:51:49 EDT
View the source Luke: Pretty or Plain
RTFM Please: File Htmlized Man Page
Ported From: Based very loosely on the various perl File modules.
Latest Version 1.3: ConfigReader-1_3.tar.gz
Release Date: Sunday, 22-Jul-2001 10:51:46 EDT
View the source Luke: Pretty or Plain
RTFM Please: ConfigReader Htmlized man page
Ported From: Original Work
Questions? Comments? cdi@thewebmasters.net