[pLog-svn] r2055 - plog/branches/plog-1.0.1/class/template/smarty

Allan Sun sunajia at gmail.com
Mon May 23 14:43:51 GMT 2005


The default Smarty comes with Plog 1.0 should already be compatible with 
regular expression, I've used it with my personal project, so it should not 
be necessary to change any of the Smarty compiler class.
 Regards,
Allan

 On 23/05/05, francesc at devel.plogworld.net <francesc at devel.plogworld.net> 
wrote: 
> 
> Author: francesc
> Date: 2005-05-23 14:27:06 +0000 (Mon, 23 May 2005)
> New Revision: 2055
> 
> Modified:
> plog/branches/plog-1.0.1/class/template/smarty/Smarty_Compiler.class.php
> Log:
> Added ldelim & rdelim functions in order to use regexp on templates
> 
> Modified: plog/branches/plog-1.0.1
> /class/template/smarty/Smarty_Compiler.class.php
> ===================================================================
> --- plog/branches/plog-1.0.1/class/template/smarty/Smarty_Compiler.class.php 
> 2005-05-23 14:24:52 UTC (rev 2054)
> +++ plog/branches/plog-1.0.1/class/template/smarty/Smarty_Compiler.class.php 
> 2005-05-23 14:27:06 UTC (rev 2055)
> @@ -546,7 +546,7 @@
> } else if ($this->_compile_block_tag($tag_command, $tag_args, 
> $tag_modifier, $output)) {
> return $output;
> } else if ($this->_compile_custom_tag($tag_command, $tag_args, 
> $tag_modifier, $output)) {
> - return $output;
> + return $output;
> } else {
> $this->_syntax_error("unrecognized tag '$tag_command'", E_USER_ERROR, 
> __FILE__, __LINE__);
> }
> @@ -2027,6 +2027,14 @@
> $_max_index = 3;
> break;
> 
> + case 'ldelim':
> + $compiled_ref = "'$this->left_delimiter'";
> + break;
> +
> + case 'rdelim':
> + $compiled_ref = "'$this->right_delimiter'";
> + break;
> +
> default:
> $this->_syntax_error('$smarty.' . $_ref . ' is an unknown reference', 
> E_USER_ERROR, __FILE__, __LINE__);
> break;
> 
> _______________________________________________
> pLog-svn mailing list
> pLog-svn at devel.plogworld.net
> http://devel.plogworld.net/mailman/listinfo/plog-svn
> 



-- 
With kind regards,
Allan Sun

ÎÞÃûСϺ

07900984568
Sunajia at cninuk.com

================================
Chief Editor,
CNINUK Online Magazine

30 Whitton Walk
London
SE5 0DS

www.cninuk.com <http://www.cninuk.com>
È«Ó¢»ªÈ˶àάÉçÇø
=================================
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.plogworld.net/pipermail/plog-svn/attachments/20050523/aed4fbf0/attachment.html


More information about the pLog-svn mailing list