Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

compile function

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Smarty Development
View previous topic :: View next topic  
Author Message
shuther
Smarty Rookie


Joined: 04 Jan 2004
Posts: 13

PostPosted: Sat Mar 27, 2004 2:15 pm    Post subject: compile function Reply with quote

I am not sure it is the rigth place for this.
On the Smarty_Compiler class, line around 620 (function _compile_compiler_tag), smarty adds <?php and ?> between the output of the plugins, and I am not sure it should be done. In my case, I want to output directly some html code.Could it be removed?

Also, would it be possible to put every smarty_compile functions in the plugins directory?

Finally, I would like to create modifier/block/... compile functions, is it possible? And how can I do that?

Thank you very much
Back to top
View user's profile Send private message
messju
Administrator


Joined: 16 Apr 2003
Posts: 3336
Location: Oldenburg, Germany

PostPosted: Sun Mar 28, 2004 10:42 am    Post subject: Re: compile function Reply with quote

shuther wrote:
I am not sure it is the rigth place for this.
On the Smarty_Compiler class, line around 620 (function _compile_compiler_tag), smarty adds <?php and ?> between the output of the plugins, and I am not sure it should be done. In my case, I want to output directly some html code.Could it be removed?


you have to return "?>your html<?php" or "echo 'your html';" then.


Quote:
Also, would it be possible to put every smarty_compile functions in the plugins directory?

Finally, I would like to create modifier/block/... compile functions, is it possible? And how can I do that?


you can extend class Smarty_Compiler and configure $smarty with your version of $smarty->compiler_file and $smarty->compiler_class .
this enables you to overload the methods of Smarty_Compiler in question.

HTH
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Smarty Development All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP