Re: [SMARTY] Re: [TIP] popup tag overlib tricky cross platform problem solved

From: Date: Tue, 14 Feb 2006 07:39:44 +0000
Subject: Re: [SMARTY] Re: [TIP] popup tag overlib tricky cross platform problem solved
References: 1 2  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-13323@lists.php.net to get a copy of this message
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. > 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 > > -- > Smarty General Mailing List (http://smarty.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php

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