Version 2.1.0 : Released 1st April, 2009
* Implemented LG Addon Updater functionality, to automatically check for updates.
Version 2.0.1 : Released 1st April, 2009
* Finally got around to adding a changelog, huzzah!
* Made minor change to minify path to explicitly include index.php. Prevents problems on some servers that use the “Include” method for removing index.php from URLs.
—
Hello all,
SL Combinator is a plugin and extension that combines and compresses JavaScript files on the fly, reducing page size and minimising HTTP requests. Combined files are saved for later use, and the plugin is smart enough to check for an up-to-date cache file before deciding to create a new one.
The plugin eliminates the hassle of manually combining and compressing multiple JS files for use on a live site. You can have multiple separate JavaScript files for easy editing and debugging, without wasting time combining and compressing files for use on the live site (or forcing your visitors to download uncompressed files).
There is a fix but it’s not for the faint of heart and involves potentially black magic… Have no “_pi” in the filename
Sorry silenz, close but no cigar. That just causes an error on the page using the plugin, because the plugin filename doesn’t match the plugin class name.
In case you’re wondering, the reason the plugin class has “_pi” at the end is to avoid a conflict with the extension class.
Sorry silenz, close but no cigar. That just causes an error on the page using the plugin, because the plugin filename doesn’t match the plugin class name.
Not for me. Anyway, the solution is still to avoid the “_pi”. Rename the class accordingliy.
Not for me. Anyway, the solution is still to avoid the “_pi”. Rename the class accordingliy.
The problem comes when you actually use the plugin (as opposed to just viewing it in the CP); it throws an error on the page.
As for renaming the class, that would cause a conflict in the code with the extension class. I may try renaming the extension class instead, so the plugin can function without the “_pi” suffix.
I seem to get the following error. Anyone know what’s going on?
Parse error: syntax error, unexpected T_CONST, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /nfs/c03/h03/mnt/55445/domains/mydomain.com/html/combine/jsmin-1.1.1.php on line 49
That looks like a problem with the JSMin script (which I utilised for this plugin, rather than wrote), as opposed to the plugin itself. The usual suspect is that your server is using PHP4, not PHP5; is that the case?
If everything goes to plan, I’ll be releasing a new version early next week, which addresses a lot of niggling problems I’ve encountered whilst using JSMin. Assuming the version of PHP isn’t the issue, if you can wait a few days the new version will hopefully solve your problem.
I’ve just rolled out version 2 of this plugin / extension (attached to the first message in this thread). It’s a complete rewrite that now makes use of the spiffy Minify application for all the combining, compressing, and caching.
Here are the highlights:
* Support for CSS! Now you can compress and combine your CSS files on the fly too.
* Less troublesome compression — particularly of jQuery plugins and sIFR — thanks to Minify’s enhanced version of JSMin.
* Greatly improved client-side caching, with HTTP encoding and headers (once again, thanks to Minify).
The new version brings with it some changes to both the filenames, and the plugin syntax, so it’s not a straight “replace old files” upgrade. Apologies for any inconvenience this causes, but hopefully you’ll find that it’s worth the (small) effort.
I’ve posted full instructions for upgrading, installing, and using the plugin / extension to my blog. And of course, if you have any questions, just leave a message on this thread and I’ll do my best to answer it.
This looks to be a fabulous plugin. Unfortunately, I attempted to use the 2.0 release and encountered an HTTP 400 Bad Request error with every execution. I reviewed your installation instructions closely, but remain stumped about the error.
I am using Expression Engine 1.6.6 on PHP Version 5.2.6, Apache 2.
Unfortunately, I attempted to use the 2.0 release and encountered an HTTP 400 Bad Request error with every execution. I reviewed your installation instructions closely, but remain stumped about the error.
I’m a bit confused; where and when is the HTTP error appearing? Could you show me the code you’re using please?
The new version works great for the JS, but when I use the SL Combinator for the CSS, it doesn’t work. The CSS just doesn’t load. When I go to the direct URL for the CSS that’s published by the SL Combinator for the CSS, I get a HTTP 400 Bad Request error.
The new version works great for the JS, but when I use the SL Combinator for the CSS, it doesn’t work. The CSS just doesn’t load. When I go to the direct URL for the CSS that’s published by the SL Combinator for the CSS, I get a HTTP 400 Bad Request error.
I’m guessing that after our previous conversation it’s not a PHP-version issue
Nothing springs to mind immediately, which means I’ll need to do some digging, and try to replicate the problem. I’ll get back to you with a more informed response as soon as I can.
I think I figured out what the problem is. I had my CSS files located in a subdomain, which seems to have been the issue. When I moved the CSS files to root level, everything worked fine. Hope that helps! Thanks so much for the fantastic work!
I think I figured out what the problem is. I had my CSS files located in a subdomain, which seems to have been the issue. When I moved the CSS files to root level, everything worked fine.
Aha, that would be a problem, yes. The plugin can handle files in subdirectories just fine, but not subdomains.
Hope that helps! Thanks so much for the fantastic work!
Good to know you’ve got it sorted, and you’re welcome