JQuery v20-1.6.1

by [-Stash-]

Download Now

This extension adds the jQuery JavaScript library to the header pages of the common Vanilla pages. The idea behind this is:

  1. to enable extension writers to use jQuery simply and easily.
  2. to enable Vanilla admins to easily update jQuery to the latest version.
  3. to keep Vanilla from becoming bogged down with multiple versions/copies of jQuery as extension authors decide they want to use it.

Extension Developers

Calling JQuery for use with your extension

To call JQuery from your extensions use the following code

includeJQuery(); // call JQuery to ensure it's loaded first

Compatibility with Prototype and other libraries

In order to maintain compatibility with other JS libraries jQuery's compatibility mode is enabled by default. This may mean that your jQuery code will not work without wrapping it in the following code:
Read more about this on the jQuery website

jQuery(document).ready(function($){ // other library compatibility ... }); // other library compatibility

Known extension bugs

! None.

To do

+ Test with Vanilla 1.2.1
+ Only have jQuery appear in headers when called. v13-1.2.1
+ Add admin interface. v15-1.2.6
+ Add capability to change between jQuery versions and compression types in a pretty interface. v15-1.2.6
+ Make CKEditor user selectable?
+ Check for HTML Formatter when enabling CKEditor.
+ Add jQuery UI.
+ Add plugins interface v15-1.2.6 and dependency checking.

EXTENSION INSTALLATION INSTRUCTIONS

Download and uncompress the extension files, then upload them to:

/path/to/vanilla/extensions/JQuery/

The path to this extension's default.php file should look like this:

/path/to/vanilla/extensions/JQuery/default.php

To enable the extension you must be logged in with an account that has Administrator privileges. You can enable the extension in Vanilla by clicking on:

Settings > Extensions

Then tick the checkbox for "JQuery"

History

v20-1.6.1 Released 2011-05-20

+ Updated jQuery to version 1.6.1.
+ Updated CKEditor to version 3.6. Seems to run nicely in IE9 now :)
+ Added two toolbars for Vanilla, Min and Full (not the default CKEditor ones), to switch between them you (currently) need to change the line config.toolbar = 'VanillaMin';
+ Further tweaked the CKEditor config to display nicer raw HTML
+ Updated ColorBox to version 1.3.17.
! Bit more general code tidy up.

v19-1.4.2 Released 2010-02-24

+ Updated the JS library to jQuery 1.4.2.
+ Added some more config to CKEditor to force it to display nicer raw HTML
+ Added "Previous Release" option in the admin settings so people can roll back even minor version updates.
! Reworded some of the admin options to try and make it clearer.
! Bit more general code tidy up.

v18-1.4.1 Released 2010-02-19

+ Hid the comment box resizer thanks SubJunk
+ Added ColorBox 1.3.6.
- Removed ThickBox 3.1 - it's very old and is no longer maintained.
! Couple of CKEditor CSS tweaks (Vanilla overrides a lot by default with annoying CSS * selectors).
! General code tidy up, can still be better, but...

v17-1.4.1 Released 2010-02-18

+ Updated the JS library to jQuery 1.4.1.
+ Added "JQuery Plugin" CKEditor 3.1, accessible through the admin interface

  1. You must have HTML Formatter installed and enabled to use CKEditor properly
  2. You must select "HTML" as your comment format when posting/editing
  3. You must change the HTML_CONVERT_NEWLINES option in HTML Formatter to 0 otherwise you will get strange spacing issues.

v16-1.3.2 ReleasedUnreleased

+ Updated the JS library to jQuery 1.3.2.
- Removed "JQuery Plugins" lightbox and Shadowbox - weren't completely working an dI don't have time to make them currently
! Replaced "JQuery Plugins" ScrollToAnchors with SmoothPageScroll accessible through the admin interface

v15-1.2.6 Released 2008-06-18

+ Updated the JS library to jQuery 1.2.6.
+ Added Admin Interface - thanks to SetList!
+ Added "JQuery Plugins" (ThickBox, lightbox, Shadowbox, ScrollToAnchors and HideSpoiler) accessible through the admin interface

v14-1.2.1 Released 2007-09-21

+ jQuery no longer inserts itself into the head unless it is called by another extension! PLEASE NOTE that extensions relying on this extension will no longer work until they are updated to work with this new method.
+ Added commented line to default.php for easy enabling of jQuery 1.1.4 - just in case you're using something incompatible with the 1.2 branch. It isn't elegant, but it works :P
+ added minified, packed, gzipped versions of jQuery 1.1.4 to the /old/ directory.

v13-1.2.1 Released 2007-09-19

+ Updated the JS library to jQuery 1.2.1.
+ Changed the default jQuery library to a minified version instead of packed (for clientside decode speed up). I have also included the packed, original uncompressed and gzip versions of all the above. If gzip works for you, the best one is the gzipped min file (even though it's 1kb bigger than the gzipped pack file). Just edit line 29 to whatever suits you best $Head->AddScript('extensions/JQuery/jquery-1.2.1.min.js');
- Removed the /src/ directory from the package as it is now unecessary.

v12-1.1.4 Released 2007-08-27

+ Updated the JS library to jQuery 1.1.4.
+ Changed the version numbering scheme to a simple RELEASENUMBER-JQUERY_VERSION_NUMBER. So for this release — v12-1.1.4 — the v12 refers to release 12 (count 'em) using version 1.1.4 of the jQuery JS library. Hopefully this will be an improvement and less confusing for people. If you have a view on this one way or another, please leave feedback in the addon discussion.

1.1.6 Released 2007-07-12

+ Updated the JS library to jQuery 1.1.3.1.

1.1.5 Released 2007-06-28

! Fixed a bug that could cause the the extensions/settings.php file to be wiped on busier servers due to the settings being written on every single page load. Thanks to little_peet for pointing this out!

1.1.4 Released 2007-03-20

+ Added the compatibility code to the bottom of jquery.js so all jQuery plugins can be used (with a small modification) along side other JS libraries. Thanks to Dinoboff for pointing me in the right direction.

1.1.3 Released 2007-03-13

! JQuery was causing a JS error and stopping categories and Page Manager pages from being reordered on settings.php and extension.php pages. Until this can be resolved I've disabled JQuery on these pages, sorry.

1.1.2 Released 2007-02-28

+ Fixed to work with SirNot's PreviewPost 2.2.
+ Updated jQuery to 1.1.2.

1.1.1 Released 2007-01-22

+ Updated jQuery to 1.1.1.

1.1.0 Released 2007-01-20

+ Updated jQuery to 1.1 - Please note that older 1.0 plugins may need to be modified/rewritten in order to function as expected with jQuery 1.1.
! JQuery now does not conflict with Prototype and SmoothPageJump :) Ensure that prototype and SPJ are enabled AFTER JQuery. Just wrap your jQuery Javascripts with (function($) { // jQuery functions using $ in here. })(jQuery) See JQThickBox as an example.
- Returned configuration settings to firing on every page as the other code wasn't updating the version numbers.

1.0.3 Released 2007-01-12

+ Made use of JQUERY_PATH, thanks Jazzman.
! Prevented the configuration settings code executing on every page, thanks Jazzman.

1.0.2 Released 2007-01-08

+ Improved readability of the code a little and added a couple more files to the array of pages to have jquery.js added to.
! Fixed a path case typo in the AddScript line.

1.0.1 Released 2007-01-02

+ Added a global configuration settings so other extensions can see if JQuery is installed.

1.0.0 Released 2006-12-19

+ Original release.
! Incompatible with Smooth Page Jump 1.0 by Jazzman :( JQuery and Smooth Page Jump are completely incompatible. Whichever one is activated last works and prevents the other one from working properly.