forum.coppermine-gallery.net

Support => cpg1.5 plugins => cpg1.5.x Support => cpg1.5 plugin contributions => Topic started by: Timos-Welt on January 14, 2010, 12:31:01 pm

Title: JSmin for cpg1.5.x - speed up gallery access
Post by: Timos-Welt on January 14, 2010, 12:31:01 pm
What's this?
This plugin compresses javascript files and reduces their number without affecting functionality. The compressed files will be cached. Normally this plugin will make your gallery access faster for visitors. If you update your gallery or any plugins that add javascript stuff, it is very important to manually clear the cache using the button in plugin manager.
Using cpg1.5.x, many javascript files will be loaded by the visitor's browser. There are four files that will always be loaded on every page (jquery-1.3.2.js, scripts.js, jquery.greybox.js, jquery.elastic.js). More files will be loaded depending on the actual page and the plugins you have installed. As long as you're not logged in as administrator, this plugin does the following:


How to install
1. Upload folder jsmin to your plugins folder.
2. The folder plugins/jsmin/cache must be readable by visitors via http, and it must be writable by php (usually chmod to 755).
3. Install via plugin manager.


How to uninstall
1. Uninstall via plugin manager.
2. Remove folder jsmin from your plugins folder.


Maintenance
If you ever update your gallery or any plugins that add javascript stuff, it is very important to manually clear the cache using the button in plugin manager.


Download
http://sourceforge.net/projects/coppermine/files/Plugins/1.5.x/cpg1.5.x_plugin_jsmin_v1.2.zip/download

=========================================================================


Change log:
-----------

v1.1 (2010/01/19)
-----------------
code clean up

v1.0 (2010/01/18)
-----------------
added new algorithm that has the optimal balance between
- few http requests (always exactly 2 per page)
- optimal compression
added docs
stable release

v0.4 (2010/01/16)
-----------------
Using new plugin hook (thanks Andre)
Added check if zlib is available in php for algo 5 + 6

v0.3 (2010/01/16)
-----------------
Added check if browser supports gzip encoding for algorithm 5 + 6

v0.2 (2010/01/15)
-----------------
added two new algorithms with gzip compression for browsers that support it

v0.1 (2010/01/14)
-----------------
First release.
Title: Re: JSmin for cpg1.5.x
Post by: Timos-Welt on January 15, 2010, 02:01:23 pm
Released v0.2.
Title: Re: JSmin for cpg1.5.x
Post by: Timos-Welt on January 16, 2010, 12:06:29 pm
Released v0.3.
Title: Re: JSmin for cpg1.5.x - speed up gallery access
Post by: Timos-Welt on January 18, 2010, 12:47:05 pm
released v1.0
Title: Re: JSmin for cpg1.5.x - speed up gallery access
Post by: papukaija on May 10, 2010, 04:57:24 pm
This plugin sounds promising but it removes the navigation arrows from the filmstrip. I can't post a link because I tested this with my local lamp. I removed all plugins except this one before testing and used the classic theme.
Title: Re: JSmin for cpg1.5.x - speed up gallery access
Post by: m4rcu5 on May 15, 2010, 12:55:34 pm
Unfortunately this plugin does not work correctly with Lighbox. When activated the lightbox will not show up when clicking the image.
When disabled or removed everything works fine again.
Title: Re: JSmin for cpg1.5.x - speed up gallery access
Post by: Jarode on May 18, 2010, 12:24:03 pm
It makes image manipulation plugin doesn't work at all. :-[
Title: Re: JSmin for cpg1.5.x - speed up gallery access
Post by: Timos-Welt on May 19, 2010, 05:26:37 pm
Works perfectly here. Please post links to your galleries with installed plugin, then I'll have a look at it.
Title: Re: JSmin for cpg1.5.x - speed up gallery access
Post by: papukaija on May 24, 2010, 10:55:33 am
Here's a link (http://mcguardians.byethost14.com/displayimage.php?album=1&pid=5#top_display_media) to my gallery. As you can see, there is now navigation arrows. I doubt if any of the javascript is working. The only installed plugin is your jsmin plugin, but all the default plugins are uploaded to the server.

My gallery is using rev 7558. The server automatically sends every ASCII mode file as compressed, but I tested with my local lamp that disabling automatic compression doesn't solve this issue.
Title: Re: JSmin for cpg1.5.x - speed up gallery access
Post by: Timos-Welt on May 24, 2010, 04:53:31 pm
Open codebase.php with a text editor and find this:
Code: [Select]
          // zlib there and browser supports it => suffix is now .js.gz
          $jsmin_suffix = '.js.gz';
and change to
Code: [Select]
          // zlib there and browser supports it => suffix is now .js.gz
          // $jsmin_suffix = '.js.gz';
Don't forget to clear the cache. This should make it work correctly.

regards
Timo
Title: Re: JSmin for cpg1.5.x - speed up gallery access
Post by: papukaija on May 24, 2010, 09:06:43 pm
Thanks. It's working now :)
Title: Re: JSmin for cpg1.5.x - speed up gallery access
Post by: Joachim Müller on June 16, 2010, 11:16:19 am
A user has reported issues with this plugin in relation to a core functionality in the thread "Registed Users Creating albums (http://forum.coppermine-gallery.net/index.php/topic,65526.0.html)".
Title: Re: JSmin for cpg1.5.x - speed up gallery access
Post by: cl9m on September 29, 2010, 08:01:03 pm
Hi,
I've found a probleme  :)  when this plugin is active Members can't upload with swfuploader but administator can upload.
Title: Re: JSmin for cpg1.5.x - speed up gallery access
Post by: grb on February 11, 2011, 05:17:21 am
I installed this plugin, and everything appeared to work. But then I find the following:

I have high resolution, 640x480 resolution and thumbnails. I can see original resolution images, when I click on the picture itself. This is broken with this plugin:(
I uninstalled the plugin, or when I am logged in as admin - everything is normal.

Thanks
Title: Re: JSmin for cpg1.5.x - speed up gallery access
Post by: S.Gerard on June 06, 2011, 11:12:08 pm
Timos, I am planning on using your plug-in on the new version of our beats (http://www.worldhiphopbeats.com) website, and am wondering if running my jscript in "noconflict" mode will cause any problems. Thanks in advance.
Title: Re: JSmin for cpg1.5.x - speed up gallery access
Post by: nelsonmclester on July 02, 2011, 12:17:50 pm
This plugin sounds promising but it removes the navigation arrows from the filmstrip. I can't post a link because I tested this with my local lamp. I removed all plugins except this one before testing and used the classic theme.
Title: Re: JSmin for cpg1.5.x - speed up gallery access
Post by: mathewdeavers on July 12, 2011, 07:37:41 am
Unfortunately this plugin does not work correctly with Lighbox. When activated the lightbox will not show up when clicking the image.
When disabled or removed everything works fine again.
Title: Re: JSmin for cpg1.5.x - speed up gallery access
Post by: Timos-Welt on July 12, 2011, 10:27:23 am
Did you try this (http://forum.coppermine-gallery.net/index.php/topic,63223.msg323209.html#msg323209)?
Title: Re: JSmin for cpg1.5.x - speed up gallery access
Post by: Timos-Welt on August 02, 2011, 10:16:47 am
Gesundheit!

I don't speak french, sorry.
Title: Re: JSmin for cpg1.5.x - speed up gallery access
Post by: Sweely on August 03, 2011, 10:19:11 am
Great plugin! I'm loving it. Thanks :)
Title: Re: JSmin for cpg1.5.x - speed up gallery access
Post by: samso on November 13, 2011, 01:19:16 pm
Really nice Tutorial! Thanks for
Title: Re: JSmin for cpg1.5.x - speed up gallery access
Post by: mindphaser2000 on April 05, 2012, 08:57:57 pm
Yes, this plugin is really great, I've used it a lot.