vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.8 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=235)
-   -   Miscellaneous Hacks - Minify CSS (https://vborg.vbsupport.ru/showthread.php?t=202843)

Andreas 01-22-2009 10:00 PM

Minify CSS
 
1 Attachment(s)
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

Quote:

Originally Posted by nexialys (Post 1722632)
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...

Ziki 01-23-2009 07:12 PM

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?

RvG2 01-24-2009 01:36 AM

genuis is a talent :D

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?

Ziki 01-24-2009 08:18 AM

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

Quote:

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

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

Quote:

Originally Posted by Kihon Kata (Post 1723264)
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

Quote:

Originally Posted by Andreas (Post 1724421)
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/clientscr...ed00-00023.css
This is not minified. If it was minified, you wouldn't see whitespaces.

Kihon Kata 01-25-2009 07:17 PM

Quote:

Originally Posted by Andreas (Post 1724421)
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 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

Quote:

Originally Posted by Kihon Kata (Post 1724533)
I just did this instead

That should also work and basically produce similar results.

Phaedrus 01-26-2009 05:03 PM

Quote:

Originally Posted by Phaedrus (Post 1724794)
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)

Quote:

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

Quote:

Originally Posted by Andreas (Post 1723228)
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

Quote:

Originally Posted by Andreas (Post 1724863)
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

Quote:

Originally Posted by nomoreturn@hotm (Post 1811031)
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

Quote:

Originally Posted by mikey1991 (Post 1812147)
Are you on PHP 5?

Yes i am on PHP 5

dancue 06-09-2009 11:33 AM

Quote:

Originally Posted by nomoreturn@hotm (Post 1811031)
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

Quote:

Originally Posted by dancue (Post 1826313)
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.


All times are GMT. The time now is 06:03 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01880 seconds
  • Memory Usage 1,816KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (14)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete