View Full Version : Miscellaneous Hacks - Minify CSS
Andreas
01-22-2009, 10:00 PM
This Add-on minifies your CSS.
License
This Add-on is based on the famous YUI Compressor and licensed under the BSD License.
Copyright (c) 2009, Yahoo! Inc.
All rights reserved.
Redistribution and use of this software in source and binary forms, with or without modification, are permitted
provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this list of conditions and the
following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions
and the following disclaimer in the documentation and/or other materials provided with the distribution.
* Neither the name of Yahoo! Inc. nor the names of its contributors may be used to endorse or promote products
derived from this software without specific prior written permission of Yahoo! Inc.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
vBulletin Compatiblity
vBulletin 3.7+ is required
PHP 5+ is required
Important Note
To activate the minifcation, you must save the style after installing the product.
In case your CSS is screwed up after using this product, just disable it and save the style again.
KevinL
01-23-2009, 05:36 PM
Ahh I like the sound of this. Thanks! :)
SteamyLightning
01-23-2009, 06:48 PM
I'll try it out. Looks promising.
nexialys
01-23-2009, 06:52 PM
strange, somewhere else, someone told it would be cumbersome to do that... i'm happy some brain acted on it and created it without listening others comments... lol
KevinL
01-23-2009, 07:09 PM
strange, somewhere else, someone told it would be cumbersome to do that... i'm happy some brain acted on it and created it without listening others comments... lol
I saw this post (or one like it) on vb.com from a staff member...
Eh,you stole my idea ;),though mine is using custom code not YUI.
Rene Kriest
01-23-2009, 11:30 PM
Andreas is a vb genius. WORD!
Forum Lover
01-24-2009, 01:31 AM
Newbie question:
What is the benefit of it exactly?
Stormraven
01-24-2009, 02:36 AM
Does this actually work? i would like to know more before i add this, can someone who has already added this give me some feedback please? does it increase speed?
It does not really increase speed,rather saves bandwidth as the size of the css is smaller.
valdet
01-24-2009, 11:16 AM
Guys ! Rest assured, because anything from Andreas is quality.
His TMS is masterpiece, so I believe this mod will also have same positive feedback.
Thanks
buileminh
01-24-2009, 12:09 PM
What does this mod do?
Andreas
01-24-2009, 12:13 PM
This Add-on minifies your CSS.
If you don't know what that means, you don't need this modification - simple as that :)
Sweeks
01-24-2009, 12:26 PM
In what ways does it "minify" the css though?
Installed now, thank you :)
________
Shemale Naomi (http://www.++++tube.com/video/15875/shemale-naomi-with-big-black-++++)
Kihon Kata
01-24-2009, 01:14 PM
*Installs.
Now, how can I test that it's actually working?
Andreas
01-25-2009, 04:52 PM
Now, how can I test that it's actually working?
By looking at your CSS before and after using this modification?
If it's minified now and wasn't before -> it's working, if not -> it's not working.
Simple, huh? ;)
djbaxter
01-25-2009, 05:07 PM
By looking at your CSS before and after using this modification?
If it's minified now and wasn't before -> it's working, if not -> it's not working.
Simple, huh? ;)
Do you mean in a view source for a page?
Andreas
01-25-2009, 05:12 PM
No, just your CSS file.
Example for vBulletin.org style:
https://vborg.vbsupport.ru/clientscript/vbulletin_css/style-b9c5ed00-00023.css
This is not minified. If it was minified, you wouldn't see whitespaces.
Kihon Kata
01-25-2009, 07:17 PM
By looking at your CSS before and after using this modification?
If it's minified now and wasn't before -> it's working, if not -> it's not working.
Simple, huh? ;)
I guess it's not working then :(
I just did this (http://code.google.com/p/minify/) instead
Phaedrus
01-26-2009, 01:37 AM
Does YSLOW still work with this, or do you need to uninstall that?
Andreas
01-26-2009, 04:14 AM
I just did this (http://code.google.com/p/minify/) instead
That should also work and basically produce similar results.
Phaedrus
01-26-2009, 05:03 PM
Does YSLOW still work with this, or do you need to uninstall that?
Never mind. Installed.
PossumX
01-27-2009, 12:58 AM
Excellent work, VERY nice. <<installed>> :up:
Madlike
02-07-2009, 03:05 PM
Have error (While deleting or uploading a product)
Updating style information for each style
* Default Style ... (Şablonlar) (Bi?im ?lc?leri) (Replacement Variables)
Warning: require_once([path]/includes/class_css_minify.php) [function.require-once]: failed to open stream: No such file or directory in [path]/includes/adminfunctions_template.php(1197) : eval()'d code on line 1
Fatal error: require_once() [function.require]: Failed opening required '/home/ultramuz/public_html/forum/includes/class_css_minify.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/ultramuz/public_html/forum/includes/adminfunctions_template.php(1197) : eval()'d code on line 1
JohnBee
02-19-2009, 08:10 AM
If you don't know what that means, you don't need this modification - simple as that :)
That's just pathetic, I don't care who you are...
Why don't you try standing upright and answering the question like a decent person rather than peppering questions with arrogance.
And your logic is just as pathetic as your response as well... everyone should be entitled to performance enhancements regardless of their knowledge level. What ever happened to learning... oh, right... were too big for that nonsense! :rolleyes:
Amenadiel
02-28-2009, 05:01 PM
installed and nominated. Gee this should be a default inclusion in the main branch.
GrendelKhan{TSU
03-02-2009, 08:37 AM
That should also work and basically produce similar results.
I already have yslow installed... will this be an ADDITIONAL benefit.
or should we use just one or the other?
SnakeV
03-10-2009, 03:40 PM
Worked like a charm, thanks!
abdobasha2004
04-05-2009, 08:59 PM
nothing changed
however i like the idea
I have my css on file
the file did not change
ragtek
04-05-2009, 09:06 PM
Have you saved your style after installing this modification?
nomoreturn
05-15-2009, 04:06 AM
installed on 3.8.2 but not working CSS same as before installing i saved style after installing but nothing changed in CSS
mikey1991
05-15-2009, 04:57 AM
installed on 3.8.3 but not working CSS same as before installing i saved style after installing but nothing changed in CSS
3.8.3 isn't out yet?
nomoreturn
05-16-2009, 07:33 AM
ups sorry Its 3.8.2 . 3.8.3 writen by mistake
mikey1991
05-16-2009, 11:10 PM
Are you on PHP 5?
nomoreturn
05-20-2009, 08:51 AM
Are you on PHP 5?
Yes i am on PHP 5
dancue
06-09-2009, 11:33 AM
installed on 3.8.2 but not working CSS same as before installing i saved style after installing but nothing changed in CSS
Same here.
SnakeV
06-20-2009, 06:51 PM
Same here.
Working perfect on 3.8.3
After update go to Main CSS at the bottom and Click Save.
Goomzee
05-11-2010, 05:47 AM
i did but all nothing change
nohuhu
10-06-2010, 09:26 AM
Great mod, installed. However, I've noticed that its effect is only seen in auto-generated main CSS file, leaving vbulletin_important.css untouched. Looking at it, I can see it really needs minifying... Is it possible to include it as well in the minifying routine?
Regards,
nohuhu.
ChiNa
08-25-2012, 04:53 AM
I hope that it will work for me,,, thanks
fxdigi-cash
06-25-2013, 05:51 PM
I tested it on vb4.2 and nothing changed...!
possibly the minification doesn't work properly... i believe using some minify plugin from google page speed would be a lot better... what do yah think?
Zachery
06-25-2013, 06:18 PM
Not sure why you'd think a vBulletin 3.x plugin would work on vBulletin 4.
Alfa1
07-26-2013, 09:19 AM
There is a serious security issue with minify: https://groups.google.com/forum/#!msg/minify/cpN-ncKPFZE/kwYVpLMkfDwJ
OVERVIEW
========
On some systems running Minify, an attacker may be able to reveal the contents of
arbitrary files. You are strongly advised to follow the instructions below to manually
patch your system, and upgrade to Minify 2.1.7 when possible.
PATCH INSTRUCTIONS
------------------
Open /min/index.php. A comment block begins on line 2.
Insert a line break so that the comment begins on line 3.
Copy and paste the following code onto line 2:
if (isset($_GET['f'])) {
$_GET['f'] = str_replace("\x00", '', (string)$_GET['f']);
}
Save the file.
DETAILS
-------
On some PHP systems, file system functions accept parameters containing null bytes
("\x00"), but do not handle them correctly. See:
http://www.php.net/manual/en/security.filesystem.nullbytes.php
An attacker may be able to use Minify to reveal the contents of any file PHP has access to
within the document root, including sensitive configuration files.
Thanks to Matt Mecham for reporting this vulnerability.
MINIFY 2.1.7
------------
You are strongly encouraged to upgrade to Minify 2.1.7, available at these URLS:
* http://code.google.com/p/minify/downloads/detail?name=minify-2.1.7.zip
* https://github.com/mrclay/minify/archive/2.1.7.zip
For further support, email min...@googlegroups.com.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.