Re: [SMARTY] Re: Should I use Prefilter or Plugin for "advanced" popups?

From: Date: Sat, 24 Apr 2004 18:15:17 +0000
Subject: Re: [SMARTY] Re: Should I use Prefilter or Plugin for "advanced" popups?
References: 1 2  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-11303@lists.php.net to get a copy of this message
just write a wrapper (plugin) function that calls the smarty plugin which {pop_up} refers to and wraps its output with the link you want before returning the whole string. no need to prefilter. ps - plugin is the overall description of all things that extend Smarty (in the context of Smarty) - there are various kinds. functions modifiers shared prefilter postfiler not sure if files relevant to the last 2 should also reside in the plugins dir. Tommy Ipsen wrote:
Tommy Ipsen wrote:
I thought the following would suffice for the templates: {TI_Help_popup helpid="helpitemidentifier" header="caption" helptext="This is a short message!"} And it should generate this code: <a href="/admin/helppopup.php?id=helpid" target="ticmshelp" onclick="link_popup(this);return false" {popup delay=300 caption="caption" text="This is a short message!"}><img class="helpicon" src="/admin/images/icon_help.gif" alt="" /></a> Which in turn should generate the following html: <a href="/admin/helppopup.php?id=helpid" target="ticmshelp" onclick="link_popup(this);return false" onmouseover="return overlib('This is a short message!',DELAY,'300',CAPTION,'caption');" onmouseout="nd();"><img class="helpicon" src="/admin/images/icon_help.gif" alt="" /></a>
My guess is that it will be a problem with a plugin/modifier generating code which is dependent of another modifier? (ie. "TI_Help_popup" generating code containing the smarty modifier "popup") How would this work - would the popup modifier be parsed afterwards? Regards, Tommy Ipsen


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