PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Autres forums > Forum Programmation & Conception > php.smarty.general > [TIP] popup tag overlib tricky cross platform problem solved
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
[TIP] popup tag overlib tricky cross platform problem solved

Réponse
 
LinkBack Outils de la discussion
Vieux 13/02/2006, 22h28   #1
DC
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut [TIP] popup tag overlib tricky cross platform problem solved

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
  Réponse avec citation
Vieux 13/02/2006, 23h34   #2
Pedro
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: [TIP] popup tag overlib tricky cross platform problem solved

Been there before ;-)
EXACTLY same problem where a dev included in the template ....
not the head tag ..

with there was a require_once_smarty() ;-)

se la vie



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

  Réponse avec citation
Vieux 14/02/2006, 07h39   #3
messju mohr
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: [SMARTY] Re: [TIP] popup tag overlib tricky cross platform problem solved

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

  Réponse avec citation
Vieux 14/02/2006, 16h55   #4
boots
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: [SMARTY] Re: [TIP] popup tag overlib tricky cross platform problem solved

--- 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
  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 23h08.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,12471 seconds with 12 queries