RE : [SMARTY] verifying template syntax when using resources
| From: | Christopher Rousseau | Date: | Tue, 29 Apr 2003 08:04:22 +0000 |
| Subject: | RE : [SMARTY] verifying template syntax when using resources | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-9412@lists.php.net to get a copy of this message | ||
I only found this idea :
Load the template in the database then,
Create a page who assign sample data and display the just loaded
template. If you use a frameset you can put some information in a second
frame with link to tell the user that if he don't see the correct
output, he must correct his template.
That's not marvelous but currently Smarty have no way to correctly check
the syntax. Even if the compilation work, you still can have bug in the
final ouput. Only a display of the result can show you if it work (I
think).
There is maybe a way to automatise this by calling the testing page from
php and then checking the ouput with some regexp to found displayed
error ?
-----Message d'origine-----
De : Scott Goodman [mailto:scott@searchbc.com]
Envoyé : lundi 28 avril 2003 23:42
À : smarty-general@lists.php.net
Objet : [SMARTY] verifying template syntax when using resources
Hi,
I have a PHP script which allows users to store smarty templates in a
database. These templates are used to generate email auto-reponse type
messages. I'm having some problems if the user doesn't format the
template correctly. How can I easily verify that the syntax of the
supplied template is correct? Currently the entire script dies when the
syntax error is encountered.
Thanks,
Scott
--
Smarty General Mailing List (http://smarty.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php