Prevent multiple inclusions of jQuery UI

Note: We are moving the topics of this forum and it will be deleted at some point

Publish your own request for comments/change or patches for the next version of phpBB. Discuss the contributions and proposals of others. Upcoming releases are 3.2/Rhea and 3.3.
Danielx64
Registered User
Posts: 304
Joined: Mon Feb 08, 2010 3:42 am

Re: Prevent multiple inclusions of jQuery UI

Post by Danielx64 »

What happen if one extension turn it off for some reason? There may be a conflict as to if it should be on or not.

User avatar
brunoais
Registered User
Posts: 964
Joined: Fri Dec 18, 2009 3:55 pm

Re: Prevent multiple inclusions of jQuery UI

Post by brunoais »

*Daniel wrote:What happen if one extension turn it off for some reason?
The extension is not validated?

Danielx64
Registered User
Posts: 304
Joined: Mon Feb 08, 2010 3:42 am

Re: Prevent multiple inclusions of jQuery UI

Post by Danielx64 »

Well yes but what if there a need to have it disabled because someone decided to use a different library for some reason? (just thinking outside the box, it may not happen but you never know)

User avatar
brunoais
Registered User
Posts: 964
Joined: Fri Dec 18, 2009 3:55 pm

Re: Prevent multiple inclusions of jQuery UI

Post by brunoais »

noConflict()?

keith10456
Registered User
Posts: 523
Joined: Sat Apr 22, 2006 10:29 pm
Contact:

Re: Prevent multiple inclusions of jQuery UI

Post by keith10456 »

nickvergessen wrote:... What we could do easy is something like:
<!-- IF $LOAD_JQUERY_UI --><!-- INCLUDEJS jquery.ui.js --><!-- ENDIF -->

This way, ext authors can easily load it (by just setting $LOAD_JQUERY_UI to true) and it does not waste resources when its not used.
Having it in the core (+1) and using the above mentioned solution seems like the best and most logical way to go.

What's wrong with this solution?

User avatar
emosbat
Registered User
Posts: 43
Joined: Fri Aug 24, 2012 8:49 am

Re: Prevent multiple inclusions of jQuery UI

Post by emosbat »

I made a mod for this problem you may interested in:

https://www.phpbb.com/customise/db/mod/ ... for_phpbb/

User avatar
nickvergessen
Former Team Member
Posts: 733
Joined: Sun Oct 07, 2007 11:54 am
Location: Stuttgart, Germany
Contact:

Re: Prevent multiple inclusions of jQuery UI

Post by nickvergessen »

imkingdavid wrote:Of course, you need to set $LOAD_JQUERY_UI once you've included it.
No, its the other way round. Its included in the core and you set that var, when you want the core to load it.
Member of the Development-TeamNo Support via PM

User avatar
imkingdavid
Registered User
Posts: 1050
Joined: Thu Jul 30, 2009 12:06 pm

Re: Prevent multiple inclusions of jQuery UI

Post by imkingdavid »

Ahh, I see. I misunderstood. That works better. :)
I do custom MODs. PM for a quote!
View My: MODs | Portfolio
Please do NOT contact for support via PM or email.
Remember, the enemy's gate is down.

User avatar
neufke
Registered User
Posts: 59
Joined: Thu Jan 02, 2014 10:08 am

Re: Prevent multiple inclusions of jQuery UI

Post by neufke »

OK, registered with my own nick, works a lot better i think... ;-)

This thread stopped about six weeks ago and i haven';t seen any RFC or anything suggesting that there is a follow-up on this topic. I would like the jQueryUI to be included in the core, simply because the pros outweigh the cons a lot.

Therre is a lot of talk in the new 3.1 series to ajaxify things, there are ajaxified alerts already in (some) place(s) etc. If all ajax that will be needed for all those functions bundle into a selective jQuery bundle then it wouldn't be any "heavier" than all the js that is currently developed or will be developed in the near future.

So i am kind of curious what is decided here... ;-)

User avatar
Darkness_demoN
Registered User
Posts: 89
Joined: Mon Jul 29, 2013 1:48 pm
Contact:

Re: Prevent multiple inclusions of jQuery UI

Post by Darkness_demoN »

+1

I thin it will be better to be include in the core. There are alot of jquery functions over the internet. At now almost evry site use jquery inside. I think ( and i hope ) alot of theme makers will make themes with good animations wich need to use jquery.

So that are my reasons :)

Post Reply