Thread: [Phplib-users] Re: Phplib-users digest, Vol 1 #409 - 1 msg
Brought to you by:
nhruby,
richardarcher
From: Dennis G. <ge...@cv...> - 2003-03-19 21:31:24
|
Personally, I feel most people are moving to Smarty templates. php...@li... wrote: > Send Phplib-users mailing list submissions to > php...@li... > > To subscribe or unsubscribe via the World Wide Web, visit > https://lists.sourceforge.net/lists/listinfo/phplib-users > or, via email, send a message with subject or body 'help' to > php...@li... > > You can reach the person managing the list at > php...@li... > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of Phplib-users digest..." > > > Today's Topics: > > 1. PEAR phplibtemplate vs phplib teplate.inc (Serghej Petrov) > > --__--__-- > > Message: 1 > Date: Wed, 19 Mar 2003 14:55:30 +0100 > From: "Serghej Petrov" <sp...@ti...> > To: <php...@li...> > Subject: [Phplib-users] PEAR phplibtemplate vs phplib teplate.inc > > > Hello everybody, > Does anybody know which is more updated template version - PEAR PHPLIB > template version or phplib phplib-7.4-pre1 version? > Which version is better to use? > Thanks=20 > Best > > Serghej=20 > > > > --__--__-- > > _______________________________________________ > Phplib-users mailing list > Php...@li... > https://lists.sourceforge.net/lists/listinfo/phplib-users > > > End of Phplib-users Digest > |
From: Richard A. <rh...@ju...> - 2003-03-19 23:10:38
|
> Does anybody know which is more updated template version - PEAR PHPLIB > template version or phplib phplib-7.4-pre1 version? > Which version is better to use? The PEAR version was forked from PHPLIB a long time ago, and has not been carefully maintained since then. There have been *lots* of bugs fixed in the PHPLIB version which are still present in the PEAR version. Check the top of the source file for a list of fixes. I think the most important three of these have been fixed by PEAR too. So, the PHPLIB version is highly recommended. ...Richard. |
From: S. <bj...@th...> - 2003-03-21 08:34:02
|
Hi, * Richard Archer wrote: > There have been *lots* of bugs fixed in the PHPLIB version which > are still present in the PEAR version. That's partially right. Here's my point of view: - didn't implement clear_var() and unset_var() so far as I don't know if that really makes sense. - just fixed the pregs allowing newlines etc. as you have stated in your mail - some weeks ago I fixed one error in the subst() function that is currently present in _your_ template.inc: changed the preg_replace call to str_replace (str_replace is faster here) > So, the PHPLIB version is highly recommended. Can't agree on that. Faults are on both sides - your side and my side. --=20 ThinkPHP / rent-a-phpwizard bj...@th... Sedanstra=DFe 27 Tel: 0931 / 78 43 804 97082 W=FCrzburg Fax: 0931 / 78 43 795 http://www.thinkphp.de/ http://www.rent-a-phpwizard.de/ |
From: Sven <Sv...@Ko...> - 2003-03-21 16:13:08
|
Hello > - just fixed the pregs allowing newlines etc. as you have stated in > your mail > - some weeks ago I fixed one error in the subst() function that is > currently present in _your_ template.inc: changed the preg_replace call > to str_replace (str_replace is faster here) Can you send your changes in this mailinglist? thx -- Ciao Sven --------- http://www.amazon.de/exec/obidos/wishlist/8WTO0DD0O1NY pgpid: 0xF74A4663 434D C7A5 C4D6 01F9 88F6 59B3 381D B526 F74A 4663 |
From: S. <bj...@th...> - 2003-03-21 17:49:11
|
* Sven wrote: > Can you send your changes in this mailinglist? Nope, just look at the CVS logs of PHPLIB.php. --=20 ThinkPHP / rent-a-phpwizard bj...@th... Sedanstra=DFe 27 Tel: 0931 / 78 43 804 97082 W=FCrzburg Fax: 0931 / 78 43 795 http://www.thinkphp.de/ http://www.rent-a-phpwizard.de/ |
From: Richard A. <rh...@ju...> - 2003-03-21 12:10:02
|
At 9:32 +0100 21/3/03, Bj=F6rn Schotte wrote: >That's partially right. Here's my point of view: Bj=F6rn, I suggest you run some thorough tests on your class to see how it fares in the case of strange input. I notice that these three tests fail in my test script: $t->set_var("tendollars", "$10.00"); $t->set_var("slasha", "\\a"); $t->set_var("brblahbr", "{blah}"); Personally, I think you should either commit to merging PHPLIB template.inc changes into the PEAR version, or else fork the class properly and remove PHPLIB from the class name, leaving only an attribution to the class' ancestry in the comments. I also think you are taking a mighty large liberty by removing the NetUSE copyright notice from the file and re-licensing it under a PHP license, but I guess it is up to Kristian to complain about that, not me. >- some weeks ago I fixed one error in the subst() function that is > currently present in _your_ template.inc: changed the preg_replace call > to str_replace (str_replace is faster here) str_replace only supports arrays as arguments in PHP 4.05 and above. PHPLIB still maintains support for PHP3, at the expense of some speed and access to a few new features (like foreach). I suspect that once you have resolved the $ and \ stripping problems, the speed difference between the two classes will be around 20%. ...Richard. |
From: S. <bj...@th...> - 2003-03-21 12:29:51
|
Hi, * Richard Archer wrote: > I suggest you run some thorough tests on your class to see > how it fares in the case of strange input. I notice that > these three tests fail in my test script: > $t->set_var("tendollars", "$10.00"); > $t->set_var("slasha", "\\a"); > $t->set_var("brblahbr", "{blah}"); $t =3D new Template_PHPLIB; $t->setVar(array( "bla" =3D> "$10.00", "slasha" =3D> "\\a", "br" =3D> "{blah}" )); print $t->getVar("bla")."<br>"; print $t->getVar("slasha")."<br>"; print $t->getVar("br"); outputs: $10.00 \a {blah} tested with current CVS version. > I also think you are taking a mighty large liberty by removing I didn't do the initial checkin, but Kristian might mail me in order to ACK or NACK it. > the NetUSE copyright notice from the file and re-licensing it > under a PHP license, but I guess it is up to Kristian to complain > about that, not me. > str_replace only supports arrays as arguments in PHP 4.05 and above. Yep. PHP3 is outdated. > I suspect that once you have resolved the $ and \ stripping problems, There's nothing to resolve, see above. --=20 ThinkPHP / rent-a-phpwizard bj...@th... Sedanstra=DFe 27 Tel: 0931 / 78 43 804 97082 W=FCrzburg Fax: 0931 / 78 43 795 http://www.thinkphp.de/ http://www.rent-a-phpwizard.de/ |
From: Kristian <kr...@ko...> - 2003-03-21 14:08:56
|
On Friday 21 March 2003 13:28, Bj=F6rn Schotte wrote: > > I also think you are taking a mighty large liberty by removing > > the NetUSE copyright notice from the file and re-licensing it > > under a PHP license, but I guess it is up to Kristian to complain > > about that, not me. All of PHPLIB is Copyright NetUSE AG and licensed under the LGPL. Kristian |
From: Richard A. <rh...@ju...> - 2003-03-21 23:50:31
|
At 13:28 +0100 21/3/03, Bj=F6rn Schotte wrote: >outputs: Have you tried using the parse() method? ...R. |