Advanced search  

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

Pages: [1]   Go Down

Author Topic: Load Scripts Plugin for cpg1.5x  (Read 11960 times)

0 Members and 1 Guest are viewing this topic.

mykee

  • Contributor
  • Coppermine frequent poster
  • ***
  • Country: hu
  • Offline Offline
  • Gender: Male
  • Posts: 140
    • One moment from Hungary
Load Scripts Plugin for cpg1.5x
« on: March 31, 2012, 06:23:39 pm »

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!
« Last Edit: September 27, 2014, 03:27:47 pm by mykee »
Logged
My gallery and demo for AnythingSlider, Photocols and CollagePlus plugin: http://foto.acegem.hu/index.php

allvip

  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Posts: 1362
Re: Load Scripts Plugin for cpg1.5x
« Reply #1 on: February 01, 2014, 07:18:47 pm »

Load Scripts plugin and Load jQuery 1.11.0  - Enable

GREAT plugin.
« Last Edit: February 02, 2014, 05:19:41 am by allvip »
Logged

allvip

  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Posts: 1362
Re: Load Scripts Plugin for cpg1.5x
« Reply #2 on: February 01, 2014, 07:22:47 pm »

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?
« Last Edit: February 02, 2014, 05:22:42 am by allvip »
Logged

mykee

  • Contributor
  • Coppermine frequent poster
  • ***
  • Country: hu
  • Offline Offline
  • Gender: Male
  • Posts: 140
    • One moment from Hungary
Re: Load Scripts Plugin for cpg1.5x
« Reply #3 on: February 03, 2014, 08:07:57 am »

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
Logged
My gallery and demo for AnythingSlider, Photocols and CollagePlus plugin: http://foto.acegem.hu/index.php

allvip

  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Posts: 1362
Re: Load Scripts Plugin for cpg1.5x
« Reply #4 on: February 03, 2014, 10:02:35 pm »

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.


« Last Edit: February 03, 2014, 10:16:10 pm by allvip »
Logged

allvip

  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Posts: 1362
Re: Load Scripts Plugin for cpg1.5x
« Reply #5 on: February 03, 2014, 10:15:33 pm »

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???
Logged

mykee

  • Contributor
  • Coppermine frequent poster
  • ***
  • Country: hu
  • Offline Offline
  • Gender: Male
  • Posts: 140
    • One moment from Hungary
Re: Load Scripts Plugin for cpg1.5x
« Reply #6 on: February 04, 2014, 08:14:21 am »

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:
Code: [Select]
jQuery.noConflict();
« Last Edit: February 04, 2014, 08:30:10 am by mykee »
Logged
My gallery and demo for AnythingSlider, Photocols and CollagePlus plugin: http://foto.acegem.hu/index.php

allvip

  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Posts: 1362
Re: Load Scripts Plugin for cpg1.5x
« Reply #7 on: February 04, 2014, 10:47:13 am »

thanks.
Logged

mykee

  • Contributor
  • Coppermine frequent poster
  • ***
  • Country: hu
  • Offline Offline
  • Gender: Male
  • Posts: 140
    • One moment from Hungary
Re: Load Scripts Plugin for cpg1.5x
« Reply #8 on: September 27, 2014, 03:28:29 pm »

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

Page created in 0.028 seconds with 20 queries.