[RFC|Merged] Include and use jQuery (originally for 3.2)

These requests for comments/change have lead to an implemented feature that has been successfully merged into the 3.1/Ascraeus branch. Everything listed in this forum will be available in phpBB 3.1.
Post Reply
User avatar
RMcGirr83
Registered User
Posts: 360
Joined: Fri Mar 09, 2007 1:51 am
Contact:

Re: [RFC|Accepted] Include and use jQuery

Post by RMcGirr83 »

Wasn't it you that said to me once "C'mon Rich show me your js skills" to which I replied "Why reinvent the wheel!" :P

:)
Do not hire Christian Bullock he won't finish the job and will keep your money

User avatar
MattF
Extension Customisations
Extension Customisations
Posts: 675
Joined: Mon Mar 08, 2010 9:18 am

Re: [RFC|Accepted] Include and use jQuery

Post by MattF »

RMcGirr83 wrote:Wasn't it you that said to me once "C'mon Rich show me your js skills" to which I replied "Why reinvent the wheel!" :P

:)
Yes :oops:
Has an irascible disposition.

Oleg
Posts: 1150
Joined: Tue Feb 23, 2010 2:38 am
Contact:

Re: [RFC|Accepted] Include and use jQuery

Post by Oleg »

To clarify, I meant replacing $ with jQuery in the diff posted so far for all code that runs in global scope (including inline event handlers).

User avatar
MattF
Extension Customisations
Extension Customisations
Posts: 675
Joined: Mon Mar 08, 2010 9:18 am

Re: [RFC|Accepted] Include and use jQuery

Post by MattF »

I think jQuery in phpBB could have a few basic options:
-User can choose a specific version to use
-User can choose their preferred hosting method.

Here are some screenshots of that implemented in the ACP (I have implemented this in a MOD I developed, but have not released. It's pretty easy, and I can submit the code wherever if interested).

Version Select:
screen1.jpg
screen1.jpg (26.07 KiB) Viewed 18833 times
Hosting method select:
screen2.jpg
screen2.jpg (26.68 KiB) Viewed 18833 times
Has an irascible disposition.

User avatar
RMcGirr83
Registered User
Posts: 360
Joined: Fri Mar 09, 2007 1:51 am
Contact:

Re: [RFC|Accepted] Include and use jQuery

Post by RMcGirr83 »

IIRC, it must be hosted locally, no CDN, etc.
Do not hire Christian Bullock he won't finish the job and will keep your money

User avatar
Sierron
Registered User
Posts: 62
Joined: Wed Aug 25, 2010 11:41 am
Contact:

Re: [RFC|Accepted] Include and use jQuery

Post by Sierron »

RMcGirr83 wrote:IIRC, it must be hosted locally, no CDN, etc.
Yep, I wouldn't want it to be hosted by google. I google is down, you whole site laggs because of that or doesn't work probably. (And yes, google can go down.)

User avatar
MattF
Extension Customisations
Extension Customisations
Posts: 675
Joined: Mon Mar 08, 2010 9:18 am

Re: [RFC|Accepted] Include and use jQuery

Post by MattF »

RMcGirr83 wrote:IIRC, it must be hosted locally, no CDN, etc.
As you can see in my previous post - give users the choice.

I just think it is cooler and more professional to add the option to choose. phpBB has so many restrictions/limitations as it is (it's why we MOD it so heavily).

Let the Admins determine what is the best way they want to serve up jQuery.

Otherwise, somebody will just create a MOD to make it do this anyways ;) I already did (just haven't made it public since it looks like jQuery is coming to phpBB)
Has an irascible disposition.

Oleg
Posts: 1150
Joined: Tue Feb 23, 2010 2:38 am
Contact:

Re: [RFC|Accepted] Include and use jQuery

Post by Oleg »

VSE+ wrote:I think jQuery in phpBB could have a few basic options:
-User can choose a specific version to use
The core code will be compatible with some specific version. Therefore that particular version should be loaded. In the event of a security issue we will update the bundled version and the new version will be loaded from then on.
VSE+ wrote: -User can choose their preferred hosting method.
This seems useful.

Oleg
Posts: 1150
Joined: Tue Feb 23, 2010 2:38 am
Contact:

Re: [RFC|Accepted] Include and use jQuery

Post by Oleg »

igorw wrote: I'm not very familiar with the API history of jQuery. But I believe there have been hardly any API breakages so far. Thus, I would suggest sticking with the latest 1.x. I'm not really a fan of having the version in the file name, because it means you have to change it in several places when a new version comes out.
We have to know which version to target, even if the file name is just "jquery.js". This information needs to go into somewhere where it can be found - coding guidelines perhaps? (Although I think coding guidelines now cover a lot more than just coding guidelines.)

Does jquery provide documentation for a particular version? That is, if 1.5 is currently the most recent release and 1.6 is released next month, two months from now can I browse the documentation of 1.5 (reasonably easily) to see what features I can or cannot use?

Perhaps someone can go to jquery support and inquire about backwards compatibility breaks in the 1.x line, as well as what their official policies are on this matter.

User avatar
MattF
Extension Customisations
Extension Customisations
Posts: 675
Joined: Mon Mar 08, 2010 9:18 am

Re: [RFC|Accepted] Include and use jQuery

Post by MattF »

nn- wrote:Does jquery provide documentation for a particular version? That is, if 1.5 is currently the most recent release and 1.6 is released next month, two months from now can I browse the documentation of 1.5 (reasonably easily) to see what features I can or cannot use?
All versions and changelogs and release notes can be found here.

http://docs.jquery.com/Downloading_jQuery
Has an irascible disposition.

Post Reply