Load Scripts Plugin for cpg1.5x Load Scripts Plugin for cpg1.5x
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Load Scripts Plugin for cpg1.5x

Started by mykee, March 31, 2012, 06:23:39 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

mykee

Hi all,

I wrote a simple plugin for developers or any users for better load script libraries (like jQuery).
This plugin can
- load Google Libraries for faster script loading
- include jQuery NoConflict command if need (after jQuery loaded)
- can select between Google Libraries or direct google CDN links
- can use compressed or not compressed script versions
- if use Google Libraries, can set latest script version option
- write any version number for all libraries (look version numbers in Google Libraries website, good for any older version load too)
- multilanguage support (english and hungarian language include)

Preview attached. I hope this plugin will help to simpliest developing to Coppermine.

----------------------------
Updated to 2.0 version!

New features and modded:
- Chrome Frame, Google library (google.load) removed
- jQuery Migrate, jQuery Mobile, AngularJS, Three.js added
- Added local script load feature (for manually update) - latest version in js folder (jQuery 1.11.1 version!)
- Can load to head or footer (before close body tag)
- jQuery.noConflict load to $
- admin panel re-grouped

If you have 1.x version, please uninstall and remove it, and then install 2.0 version!
My gallery and demo for AnythingSlider, Photocols and CollagePlus plugin: http://foto.acegem.hu/index.php

allvip

#1
Load Scripts plugin and Load jQuery 1.11.0  - Enable

GREAT plugin.

allvip

#2
with Enable Load Scripts plugin and Load Google Libraries it does not work.
I do not know why.

use custom??? how do I get to choose custom version for Load Google Libraries?

mykee

I uploaded 1.1 (updated) version. This plugin is very simple:
- Enable plugin and what you need
- write a version number what you need and save it!

I don't see short codes on Google website (maybe ended?), please disable Load Google Libraries settings (this was old short codes), and get Google Libraries CDN links.  ;)

Just a tip: if you need Google Libraries (short codes), check this link what versions compatible with this library. Newer versions not include in this script:
https://www.google.com/jsapi
My gallery and demo for AnythingSlider, Photocols and CollagePlus plugin: http://foto.acegem.hu/index.php

allvip

#4
No I don't need short codes.

I don't really understand how to use it.

I updated coppermine to use jquery 1.11.0

http://forum.coppermine-gallery.net/index.php/topic,76858.20.html

But I need to load jquery 1.3.2 for js/jquery.datePicker.js that shows on Ban users page.banning.php uses 1.11.0.

I enabled Load jQuery Version number 1.3.2 and Load jQuery NoConflict but datepicker from ban users is not working.

I thought the plugins allows to load an extra version of jquery for all coppermine pages.



allvip

When I enable  Load jQuery Version number 1.3.2 from where the plugin loads 1.3?
From coppermine js folder,from your plugin code,from google???

mykee

#6
All scripts run from Google (CDN or Library). Plugin not include any local script, because plugin size will be very huge size.
If not use Library option, then use CDN. This very fast server connections and can load any jQuery (or other scripts) versions.

I think you maybe need a Migrate plugin (for JQuery 1.9 or higher), what I not found on Google CDN, and not include this plugin yet.
http://jquery.com/download/
Second tip: check datepicker plugin and upgrade to newer jQuery or write plugin file to noConflict mode (use second example type):
https://api.jquery.com/jQuery.noConflict/

Try use only ONE jQuery library on a page, do not use more than one version, because this get problem (and your site will slower)! My NoConflict option use when you use other libraries too (ex. Mootools). Simple load this code:
jQuery.noConflict();
My gallery and demo for AnythingSlider, Photocols and CollagePlus plugin: http://foto.acegem.hu/index.php

allvip


mykee

Plugin updated to 2.0 version! See instructions and changelog in first post!
My gallery and demo for AnythingSlider, Photocols and CollagePlus plugin: http://foto.acegem.hu/index.php