Re: [SMARTY] standart plugin(s) suggestion

From: Date: Tue, 18 Feb 2003 21:13:38 +0000
Subject: Re: [SMARTY] standart plugin(s) suggestion
References: 1 2 3 4  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-7850@lists.php.net to get a copy of this message
> Nice idea, so I have tried to implement such a plugin function and added it > to the Wikki: > > http://smarty.incutio.com/?page=SmartyPlugins Looks good! Here are a few notes (which are only suggestions, no "laws"-my knowledge about that things are not so good, so I may be wrong :-) - wouldn't it be better to do the $version-tests after converting it to a number? Then you could do tests like "if( $version_nr >= 4 )"; then the code would also work for HTML-version v4.0 (I don't know if there is a difference between a DOCTYPE with 4.0 and one with 4.01) - make the tests for the type case-insensitive: if ( strtolower($type) == "strict" ) - as far as I know, $dtd= true and $html="HTML" and $version >= 4 and no $type set should lead to an "strict"-DTD string - as far as I know, the case of the DOCTYPE-string matters "officially" (but at least Mozilla ignores it as you can read at http://www.mozilla.org/docs/web-developer/quirks/doctypes.html ) But I think it would be best to let the generated string look "officially" :-) (that means write "html" as "HTML"; make sure, that $html is always in uppercase and that $type is always written with first letter in uppercase, the rest in lowercase) with regards, Matthias

« previous php.smarty.general (#7850) next »