Advertisement:

Author Topic: [NEW PLUGIN] Minifyer - Your ad's site will load faster than ever before!  (Read 12401 times)

Jair Milanes

  • Newbie
  • *
  • Posts: 27
  • LayoutzWeb - OsClass Themes & Plugins
New plugin available for download:
Minifyer
for OsClass 3.3 and up!       

This plugin when enabled minifies all your js and css files and caches them so your user does not have to wait the loading of all theses files on every request and your server does not have to work so hard on avery request too, making you site a a hole lot faster.

It uses the PHP Minify library created by Steve Clay.
If you want to know more about the Minify library go to it\'s page at Github - https://github.com/mrclay/minify

For Minifyer download and instructions visit https://sourceforge.net/projects/osclass-minifyer/.

New version ( 1.0.2 ) available at SourceForge
« Last Edit: January 08, 2014, 06:27:44 pm by Jair Milanes »

SmaRTeY

  • Osclass Hero
  • Hero Member
  • *
  • Posts: 2519
Great!!!

Looks like this is what we were waiting for, one question though:
Can we keep on working with the 'full' versions of javascript & css meaning that this plugin will minify and cache changes automatically once installed?  ::)

Thanks a lot Jair!

Jair Milanes

  • Newbie
  • *
  • Posts: 27
  • LayoutzWeb - OsClass Themes & Plugins
Smartey, the plugin has a enable/disable switch, you can have the plugin enabled at osclass but disabled at the plugins configuration, so you could enable only on you production env.

SmaRTeY

  • Osclass Hero
  • Hero Member
  • *
  • Posts: 2519
Thanks, I installed it and even though I already had most script/css minified it does seem to speed up still.
So far so good, all looks good, no css issues or script errors....

Very nice.

SmaRTeY

  • Osclass Hero
  • Hero Member
  • *
  • Posts: 2519
Mmmzzz I spoke to soon.... the plugin is installed and when I 'enable' in plugin config the site css is messed up but if turned off in plugin config the site looks ok and 'feels' faster but that just might be between the ears :)

Quote
you can have the plugin enabled at osclass but disabled at the plugins configuration, so you could enable only on you production env.

I do not understand the on / off, if off in plugin config the site runs minified ?

Could it be that my already minified script/css is messing up my css with the use of this plugin?

Jair Milanes

  • Newbie
  • *
  • Posts: 27
  • LayoutzWeb - OsClass Themes & Plugins
Your css should not mass it up it should work fine, if the plugin is off( switch is red ) it will not minifie only if it's ON, but tell me this, does the hole css gets massed up or only part of it?

Jair Milanes

  • Newbie
  • *
  • Posts: 27
  • LayoutzWeb - OsClass Themes & Plugins
Try to debug the url generated for styles and scripts on your site, copy the url from the source and try to accessit directly, if you can see the minified code the plugin is working fine.
But it has to be enabled to work.

SmaRTeY

  • Osclass Hero
  • Hero Member
  • *
  • Posts: 2519
Looks like everything is being 'hit'.... I attached the screenshots with pluginon and pluginoff so you can see difference....

I am using latest osClass and minimalist theme (work in progress)


Regards,
Eric

SmaRTeY

  • Osclass Hero
  • Hero Member
  • *
  • Posts: 2519
I tried to find that url but I can't find it really....it's like 3 in the morning here so I'm hitting the sack before Sunrise again....;)

Jair Milanes

  • Newbie
  • *
  • Posts: 27
  • LayoutzWeb - OsClass Themes & Plugins
So the plugin seems to be working fine on your site, i've debuged it by acessing the minifyer url directly, for example for your css it generated this:

Code: [Select]
http://www.spulleboel.nl/styles/f=/oc-content/plugins/cookies/cookiecuttr.css,/oc-content/themes/minimalist/css/bootstrap.min.css,/oc-content/themes/minimalist/js/chosen/chosen.css,/oc-content/themes/minimalist/css/style.css,/oc-content/themes/minimalist/js/uniform/default/css/uniform.default.min.css,/oc-content/plugins/slider/responsiveslides.min.css
And for your scripts this:

Code: [Select]
http://www.spulleboel.nl/scripts/f=/oc-includes/osclass/assets/js/jquery.min.js,/oc-content/plugins/location_required/jquery.metadata.js,/oc-content/plugins/watchlist/js/watchlist.js,/oc-content/plugins/cookies/jquery.cookie.js,/oc-content/plugins/cookies/jquery.cookiecuttr.js,/oc-content/plugins/carousel_for_osclass/js/jCarouselLite.js,/oc-includes/osclass/assets/js/jquery-ui.min.js,/oc-content/themes/minimalist/js/chosen/chosen.jquery.min.js,/oc-content/themes/minimalist/js/uniform/jquery.uniform.min.js,/oc-content/themes/minimalist/js/global-pack.js,/oc-includes/osclass/assets/js/tabber-minimized.js,/oc-content/plugins/slider/responsiveslides.min.js
enable the plugin and acess this 2 urls and see.

It's all being compressed as it should be, i'm gassing it could be the order of the files in the queue maybe.
« Last Edit: January 03, 2014, 07:20:50 pm by Jair Milanes »

creat15

  • Full Member
  • ***
  • Posts: 218
Re: [NEW PLUGIN] Minifyer - Your ad's site will load faster than ever before!
« Reply #10 on: January 03, 2014, 08:52:59 am »
hi :)

thank you for plugin :)

i try your plugin, but error

display an error message like this 'Fatal error: Call to undefined function osc_add_route() in ..:\wamp\www\myweb\oc-content\plugins\minifyer\index.php on line 72

can you fix it?

Hussard (Madhouse)

  • Full Member
  • ***
  • Posts: 214
  • Outlaw web developer & padawan designer.
Re: [NEW PLUGIN] Minifyer - Your ad's site will load faster than ever before!
« Reply #11 on: January 03, 2014, 12:09:08 pm »
hi :)

thank you for plugin :)

i try your plugin, but error

display an error message like this 'Fatal error: Call to undefined function osc_add_route() in ..:\wamp\www\myweb\oc-content\plugins\minifyer\index.php on line 72

can you fix it?

Looks like you're not having the last version of Osclass running (at least a version prior to 3.2 where Routes feature have been included). See : New feature in 3.2 : routes, Using routes in Osclass

If you can't upgrade for some reasons, you can use page=ajax&action=custom&ajaxfile={plugin/file}, where plugin/file is the file used in the route. But you really should upgrade since routes will be the only way with Osclass 3.4.

Adrien.

Hussard (Madhouse)

  • Full Member
  • ***
  • Posts: 214
  • Outlaw web developer & padawan designer.
Re: [NEW PLUGIN] Minifyer - Your ad's site will load faster than ever before!
« Reply #12 on: January 03, 2014, 04:16:38 pm »
Great job by the way :) ! Documentation is there where you need it, code is clear.

PS : That's exactly what I had in mind to hook up registering/enqueueing and minification/combination. Do you read in my mind ?! NSA or CIA ?

Adrien.


creat15

  • Full Member
  • ***
  • Posts: 218
Re: [NEW PLUGIN] Minifyer - Your ad's site will load faster than ever before!
« Reply #13 on: January 03, 2014, 04:29:15 pm »
hi :)

thank you for plugin :)

i try your plugin, but error

display an error message like this 'Fatal error: Call to undefined function osc_add_route() in ..:\wamp\www\myweb\oc-content\plugins\minifyer\index.php on line 72

can you fix it?

Looks like you're not having the last version of Osclass running (at least a version prior to 3.2 where Routes feature have been included). See : New feature in 3.2 : routes, Using routes in Osclass

If you can't upgrade for some reasons, you can use page=ajax&action=custom&ajaxfile={plugin/file}, where plugin/file is the file used in the route. But you really should upgrade since routes will be the only way with Osclass 3.4.

Adrien.

thanks for reply

i try for upgrade my osclass version

Hussard (Madhouse)

  • Full Member
  • ***
  • Posts: 214
  • Outlaw web developer & padawan designer.
Re: [NEW PLUGIN] Minifyer - Your ad's site will load faster than ever before!
« Reply #14 on: January 03, 2014, 06:18:41 pm »
Warning : Actually it works for Osclass 3.3 and greater.

Needed to work : routes features and custom_controller hook.

We've spend 3 hours trying to understand why it wouldn't work on our website... We are currently on 3.2.2 and the "custom_controller" hook does not exist yet ;D. So it just do... nothing besides disabling all JS and CSS haha.