--- messju mohr <messju@lammfellpuschen.de> wrote:
greets.
> On Mon, Feb 13, 2006 at 11:34:21PM +0000, Pedro wrote:
> > Been there before ;-)
> > EXACTLY same problem where a dev included in the template ....
> > not the head tag ..
> >
> > with there was a require_once_smarty() ;-)
>
> this should be doable for {popup_init}. I would not like to break BC
> and only make {popup_init} perform output once per request in general:
> this would cause problems with scripts that rely on {popup_init}
> working more than once (like scripts that generate multiple pages and
> save them onto disk).
>
> but we could introduce a handle for that, to keep track that
> {popup_init} only dumps it's loot once per request for each distinct
> handle.
>
> like (when used in one request):
>
> {popup_init} *output*
> {popup_init} *output*
> {popup_init handle_once=foo} *output*
> {popup_init handle_once=foo} *no output*
> {popup_init handle_once=true} *output*
> {popup_init handle_once=true} *no output*
> {popup_init handle_once=foo} *no output*
> {popup_init handle_once=true} *no output*
> {popup_init} *output*
>
> every user in a project has you to use the same handle then and always
> the first call to {popup_init handle_once=...} will win.
....and someone who uses multiple instances of Smarty? Yes, I know that they
shouldn't and that that is a problem in their own stack but similarly, Smarty
doesn't have a concept of a "document", so I don't see how this can be done in
a sane way. We can provide "ful hacks" but this is really something that
users ought be coordinating in their own stacks since Smarty's doesn't
generally provide for this. Personally, I'd rather not see this.
2c
xo boots
> > se la vie
>
> ... mon ami
>
> > DC wrote:
> > >Hello,
> > >
> > >I spent today trying to nail down an elusive problem with overlib
> > >(version 421) popups showing on Mac Safari and Firefox but not on
> > >Win2000Pro. In IE6 I was getting a javascript error 'over is null or not
> > >an object'.
> > >
> > >The problem was that I had a duplicate {popup_init src="overlib.js"} tag
> > >in an included template. Once I removed the extra popup_init tag the
> > >problem went away.
> > >
> > >I'm sending this out so that it can make it into the archives and save
> > >someone else the trouble I had.
> > >
> > >BTW, I know it really is an application level problem, but is there a
> > >way to warn smarty users that popup_init has been called twice?
> > >
> > >Cheers,
> > >dc
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com