Go Back   vb.org Archive > vBulletin Modifications > vBulletin 4.x Modifications > vBulletin 4.x Add-ons

Reply
 
Thread Tools
vB4 SuperCharged - Optimises CSS, Javascript and HTML Details »»
vB4 SuperCharged - Optimises CSS, Javascript and HTML
Version: 1.51, by Darkimmortal Darkimmortal is offline
Developer Last Online: Oct 2021 Show Printable Version Email this Page

Category: Board Optimization - Version: 4.0.3 Rating:
Released: 12-05-2009 Last Update: 05-12-2010 Installs: 509
Uses Plugins
Additional Files Translations  
No support by the author.

This is designed for vBulletin 4.0.x only.

DO NOT INSTALL on vB 4.1.x or 4.2.x.

Even if it worked correctly, the effect is negligible as vB4 is nowhere near as terrible client-side speed-wise as it once was.

DO NOT ask for fixes, they will not come, I have moved to XenForo.



__________________________________________________ ______________


tl;dr - Significant frontend speed improvements for vBulletin 4

Don't forget to Mark as Installed if you use this mod, and a nomination for MOTM would be nice

__________________________________________________ ______________


Features:


CSS Optimiser: Minifies all CSS files and serves CSS directly, eliminating the PHP overhead from css.php.

Javascript Optimiser:
Intelligently defers Javascript loading (puts script tags just before </body> on the fly) and combines common Javascript files. Also features optional compression with Google Closure Compiler.

HTML Optimiser: Based on HELLCAT's Realtime Page Compressor, and adds complete whitespace removal around block and meta elements and removal of unimportant comments.

Attachment Optimiser: Intended for FastCGI users only - serves attachment thumbnails and images directly rather than through PHP.

All this is done efficiently and on-the-fly - no need for any template edits.

__________________________________________________ ______________


Installation:
  1. Ensure you have CSS stored on the filesystem and not your database. To check this, go to Settings > Options > Style & Language Settings > Store CSS Stylesheets as Files? and ensure it is set to "Yes".
  2. Disable Remote YUI if you have it enabled. To check this, go to Settings > Options > Server Settings and Optimization Options > Use Remote YUI and ensure it is set to "None".
  3. Upload the contents of vbsc.zip to your forum root directory via FTP.
  4. Ensure the files vbsc.js and vbsc.js.gz in /clientscript/ are writable (chmod).
  5. Install product-vbsc.xml as a Product. (Plugins & Products > Manage Products > Add/Import Product)
  6. Run Compress Javascript and Compress CSS under the vB4: SuperCharged Admin CP section.
  7. Check to ensure that all the settings are correct for your forum, as some of the optimisers are likely to conflict with other poorly coded mods, and not all are turned on by default (vB4: SuperCharged > Options).
__________________________________________________ ______________


Conflicts:
  • If you wish to run vBSEO along with the Attachment Optimiser, you must disable Attachment Rewrites under URL Rewrite Settings > Forum URLs. This incompatibility is by design.
  • If you run vBSEO's Cleanup HTML function, you should choose between it and vBSC's HTML Optimiser. Running both at once is a waste of resources and may create conflicts that would not otherwise exist.
__________________________________________________ ______________


Upgrading:
  1. Upload the contents of vbsc.zip to your forum root via FTP. (Overwrite the existing files.)
  2. Install the new product-vbsc.xml, ensuring you have Allow Overwrite set to Yes. (Plugins & Products > Manage Products > Add/Import Product)
  3. Run Compress Javascript and Compress CSS under the vB4: SuperCharged Admin CP section.
__________________________________________________ ______________


Changelog:


1.51:
  • A minor, optional update involving product-vbsc.xml only.
  • Fixed conflict between vBSC, vBSEO and certain language/template customisations which prevented the PM notifications from opening a new window when requested.
1.5:
  • Several changes made to various files - don't forget vbsc.zip when updating.
  • The Javascript Optimiser will now function properly without the Common Javascript Cache enabled, for those of you more concerned about download size than http requests
  • As I've found disabling the Common Javascript Cache can take 500ms off the rendering time in Firefox, it is no longer enabled by default.
  • Fixed Facebook Connect.
  • Fixed compatibility with certain types of Adsense ads
  • Fixed loadvBCss inline javascript calls being incorrectly left alone, screwing up nested CMS Sections among other things.
  • Fixed the removal of the space between "by" and the username in the last post column with the HTML optimiser enabled.
  • Restored modification date check on vbsc.js
1.4:
  • Several changes made to various files - don't forget vbsc.zip when updating.
  • Google Closure Compiler appears to be working again, so you can re-enable that.
  • Fixed error spam and even fatal errors when importing products, possibly at the expense of compatibility with YAFB, but who needs that now anyway?
  • Improved inline Javascript regexes, fixing several VSa mods, and probably others too.
  • Improved descriptions of some settings.
  • HTML Optimiser is no longer on by default (it's pretty resource heavy and pointless).
  • Fixed hard-coded /admincp/ reference in the CSS Auto-Compress hook.
1.3:
  • Several changes made to vbsc.php - don't forget vbsc.zip when updating.
  • Disable Google Closure Compiler if you have it enabled as it no longer works and I'm not sure why yet.
  • The CSS optimiser now overwrites the existing CSS files with the minified equivalents, reducing the amount of regex guesswork needed.
  • Fixed error appearing on the login page with the CSS optimiser enabled.
  • Tested with [AJAX] - Advanced Forum Statistics
1.2:
  • Changes made to various files - don't forget vbsc.zip when updating.
  • Added Advanced Attachment Optimiser for img tags (skips attachment.php altogether rather than simply adding a redirect) and improved the original one (designed to be run together).
  • The DIR constant is now used throughout vBSC.
  • Fixed style00000 bug on redirect pages - now defaults to style id 1.
  • Fixed strange bug in the CSS Optimiser where in some circumstances, css.php style URLs (with commas) would be used in direct links, breaking everything.
  • Removed a pretty pointless check on the modification date of vbsc.js (due to issues). You'd have to be an idiot not to run compress css/js after updating vBulletin :P
1.1:
  • Changes made to various files - don't forget vbsc.zip when updating.
  • No longer works on vBulletin 4.0.0 - supports 4.0.1 only.
  • Removed common css cache - vBulletin's new "-rollup" system only results in a couple of extra requests and less conflicts.
  • Added support for new LTR/RTL vbulletin_css folders to all elements of the CSS Optimiser.
  • Improved support for obscure ways of including CSS that some mods may use.
  • Fixed unnecessary errors when some Javascript files are not present.
  • The appropriate DIR constant is now used when including vbsc_global.php, hopefully fixing the invalid argument supplied for foreach() error.
  • Fixed bug in Compress Javascript for forum-only vBulletin - file_get_contents(./clientscript/).
  • Fixed CSS Optimiser incompatibility with Yay! Another Facebook Bridge, which for some reason breaks write_style_css_directory().
  • CSS Optimiser now uses write_style_css_directory() rather than the full build_style() function.
1.01:
  • Changes made to various files - don't forget vbsc.zip when updating.
  • Fixed compatibility with child styles.
  • Improved Javascript and CSS Optimiser error messages.
1.0:
  • Changes made to various files - don't forget vbsc.zip when updating.
  • Fixed bug in the Javascript Optimiser where the type attribute was required on a script tag - some mods leave this out or put it after src.
  • The monolithic vbsc.js file is now optional, although enabled by default (under the setting Common Javascript Cache). Many people's problems seem to be related to it, and there isn't much difference without it, as long as the loading deferral is still there.
  • The CSS files showthread.css, postbit-lite.css, postbit.css and forumdisplay.css are no longer included in the common CSS cache. This fixes a conflict with Abe1's Post Thank You Hack, along with other incompatibilities. The vBSC CSS hacks that were necessary due to conflicting rules in these files have also been removed.
  • The CSS Files and JS Files settings, along with some other things, have been moved to includes/vbsc_global.php. Due to this, uninstalling before upgrading is no longer strictly necessary.
  • Greatly improved the details given by the Javascript Optimiser fallback warning and steps to take to get it to disappear for people having issues.
  • Fixed compatibility with the Forum-only version of vBulletin.
  • Added some Blog files to the common Javascript cache.
  • vBSC will now detect if you have the CMS or Blog products disabled and skip caching their Javascript files as necessary.
  • Improved descriptions of admin settings.
0.92:
  • Fixed bug in the JS Optimiser causing bits of HTML comments to be visible at the bottom of the page under certain circumstances.
  • Worked around a stupid bug in Latest Posts and Newest Members on Forum Home which somehow doesn't occur during normal operation and only when the HTML is messed with by the HTML optimiser. In other words, not my fault
0.91:
  • Fixed(?) rare issue where reCaptcha would fail to appear with JS Optimiser enabled.
0.9:
  • Changes made to vbsc.php - don't forget vbsc.zip when updating.
  • Added "vbseo" to the inline Javascript whitelist.
  • Fixed compatibility with ibProArcade and any other mods which utilise the css_start hook to add additional CSS.
  • Fixed message about Compress CSS always appearing on certain CMS pages. If the styleid from cms_node is not found, it defaults silently to the board default style, just as vBulletin itself does.
  • Fixed compatibility with Flashchat 6 Integration and any other mod which uses shorthand css.php URLs.
  • Fixed display of topic review with the CSS optimiser enabled.
  • Fixed lack of spaces between usernames in various places.
0.82:
  • Fixed specific issue where the domain name was included before the YUI reset-fonts.css url, causing it to end up included after vbsc.css and screw things up.
0.81:
  • Fixed CSS optimiser not supporting style IDs of > 9.
  • Fixed CSS optimiser not working on some redirection pages, especially after login.
0.8:
  • Changes made to vbsc.php - don't forget vbsc.zip when updating.
  • Added warning if CSS and/or Javascript are not cached correctly, and it now falls back to the normal CSS/JS rather than messing everything up if they aren't.
  • Fixed user style selection not being considered with the CSS Optimiser enabled.
  • Compress CSS now grabs the styles from the database and performs the equivalent rebuilding process to saving a stylevar automatically. This is likely to fix a lot of people's issues
  • Added a whitelist of various vB-related terms to the inline Javascript optimiser, hopefully fixing issues with Google Custom Search and ad providers other than Google (which was previously blacklisted).
  • Fixed broken posting permissions box on newthread/postreply with the CSS Optimiser enabled.
  • Fixed automatic CSS compression 404'ing when running the vB upgrade script.
  • Completely changed how automatic CSS compression is run, resulting in a smoother experience free of iframes. It also only runs once regardless of how many styles you have.
  • Fixed incompatibility with BBR - Resize Images with lytebox, and probably other mods.
  • Tested compatibility with GCBOS 0.6.10.
0.7:
  • Changes made to vbsc.php - don't forget vbsc.zip when updating.
  • Fixed CMS sections widget not working with JS Optimiser enabled. The fix for this will probably also fix other YUI-related issues.
  • Fixed visitor messages being too wide with CSS Optimiser enabled.
0.6:
  • Several changes made to vbsc.php - don't forget vbsc.zip when updating.
  • Added a number of additional Javascript and CSS files - please uninstall vBSC before installing 0.6.
  • Compress JS now makes a small modification to the actual code to workaround a bug which can break a lot of things (most notably inlinemod) and generally screw things up.
  • Fixed links to compressed code in the admin cp.
  • Fixed /clientscript/ -> clientscript/ in the JS optimiser.
  • Closure Compiler is now optional, and defaults to off because it really provides little gain other than download size and takes ages to run. Standard JSMin is now the default form of compression.
  • Added error messages for both compressors.
  • Fixed vbulletin_textedit.js not being filtered out properly due to nearby HTML comments.
  • Tested compatibility with GCBOS and additional_css mods.
0.5:
  • Fixed any prefix to css.php not being removed properly and being displayed as text in the header.
0.4:
  • Fixed references to /clientscript/ instead of clientscript/, which broke support for forums not running in the root of a domain.
  • Fixed incompatibility with new css.php URLs in RC2.
  • Fixed conditional comments around IE Javascript being removed.
  • Fixed weird inlinemod issue.
  • Added popuplist.css - please uninstall before upgrading or add this to your CSS Files list manually.
  • Fixed incompatibility with Google Adsense. Fixes for other ad providers and other inline Javascript will be added on request.
0.3:
  • Added HTML Optimiser
  • Fixed @charset spam in vbsc.css
  • Fixed vbsc_ files not being used due to a regression during release.
  • cpnav_vbsc.xml was accidentally left out in 0.2 :P
  • CSS is now automatically compressed when the files are updated through the StyleVar system, or otherwise. This also fixes the random deletion of vbsc.css and other vbsc_ css files.
0.2:
  • Added JS optimiser
__________________________________________________ ______________

ONLY if you wish to use the Attachment Optimiser, something similar to this is needed in your server config (nginx):

Code:
location /customattachments {
   if ($request_uri ~* \.(png)) {
       add_header Content-Type image/png;
   }
   if ($request_uri ~* \.(jpg|jpeg)) {
       add_header Content-Type image/jpeg;
   }
   if ($request_uri ~* \.(gif)) {
       add_header Content-Type image/gif;
   }
}
(although some browsers will probably be happy enough without these headers)

Download Now

File Type: xml product-vbsc.xml (32.5 KB, 2052 views)
File Type: zip vbsc.zip (26.6 KB, 2633 views)

Screenshots

File Type: png SLA.png (65.1 KB, 0 views)

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.
2 благодарности(ей) от:
millardjb, xrvel

Comments
  #292  
Old 01-15-2010, 02:59 PM
MarkJW's Avatar
MarkJW MarkJW is offline
 
Join Date: Nov 2006
Posts: 39
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm also getting the same error at the top of my pages. When I rebuild my CSS files it says to make sure my CSS is set to be stored as files and that the files are writable (CHMOD 777).

I've double checked. Everything's set up right. The CSS compressor refuses to run. It was working fine back in 0.92. And, yeah, I remembered to upload the files in the vbsc.zip.
Reply With Quote
  #293  
Old 01-16-2010, 02:34 AM
ngkong ngkong is offline
 
Join Date: May 2008
Posts: 20
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

this mod works well on forum, but pop this error msg in CMS. temporary disabled until this get fixed

Quote:
The file /home/adsense/public_html/forums/clientscript/vbulletin_css/style00000l/vbulletin.css is missing. This would indicate your forum is not set to save CSS on the filesystem. If you are certain it is, try running Compress CSS again.

To prevent issues, your forum is currently running without optimised CSS as a fallback.
would be great if you can make the error message only show for admin/moderator.
Reply With Quote
  #294  
Old 01-16-2010, 03:39 AM
argothiusz argothiusz is offline
 
Join Date: Nov 2008
Posts: 175
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Installed on 4.0.1. No error, love the speed

Error: When I enable this modification, the vbulletin blog layout got mess up. The widget sidebar got push (to the right) out of the layout.
Reply With Quote
  #295  
Old 01-16-2010, 06:59 AM
gabned gabned is offline
 
Join Date: Jul 2005
Posts: 7
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by GiveMeABreak View Post
The file forum/clientscript/vbulletin_css/style00000l/vbulletin.css is missing. This would indicate your forum is not set to save CSS on the filesystem. If you are certain it is, try running Compress CSS again.

To prevent issues, your forum is currently running without optimised CSS as a fallback.

this in login redirect page

forum vb 4.0.1
css in files

help
I'm getting the same error. I've seen that is calling a style with a number that doesn't exist (style number 7, but I have only style 6 and 8) Could you please indicate me a fix for this?
Reply With Quote
  #296  
Old 01-16-2010, 01:25 PM
swiftor's Avatar
swiftor swiftor is offline
 
Join Date: Nov 2008
Posts: 118
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi, I upgraded to 4.0.1 this morning and then proceeded to try and upgrade this excellent mod, but got this error:

vB4 Default Style ... (Templates) (StyleVars) (Replacement Variables) (CSS) (Controls)
Fatal error: Call to undefined method stdClass::called() in /home/swiftor/public_html/includes/class_core.php on line 3829

I made sure I uploaded the latest files from the vbsc.zip to the proper directories. I also get the above error when trying to uninstall the mod for a fresh install.

UPDATE: I noticed that after an uninstall, its gone from the list of installed mods (even though its still listed in the left nav bar, I guess because of the failed install), and then uploaded the product file without error, but now the top of all my pages have the url listed twice.

Any suggestions on what I can do to fix this?
Reply With Quote
  #297  
Old 01-16-2010, 01:39 PM
Darkimmortal Darkimmortal is offline
 
Join Date: Apr 2009
Posts: 163
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by swiftor View Post
Hi, I upgraded to 4.0.1 this morning and then proceeded to try and upgrade this excellent mod, but got this error:

vB4 Default Style ... (Templates) (StyleVars) (Replacement Variables) (CSS) (Controls)
Fatal error: Call to undefined method stdClass::called() in /home/swiftor/public_html/includes/class_core.php on line 3829

I made sure I uploaded the latest files from the vbsc.zip to the proper directories. I also get the above error when trying to uninstall the mod for a fresh install.

UPDATE: I noticed that after an uninstall, its gone from the list of installed mods (even though its still listed in the left nav bar, I guess because of the failed install), and then uploaded the product file without error, but now the top of all my pages have the url listed twice.

Any suggestions on what I can do to fix this?
"Yay! Another Facebook Bridge" used to cause that (perhaps it still does?) and I'd imagine it's not the only mod that screws up the css templates.
Reply With Quote
  #298  
Old 01-17-2010, 05:56 PM
SnakeV SnakeV is offline
 
Join Date: Jun 2008
Posts: 61
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

With vBSEO enabled and when i enter to a Subforum or a Thread the CSS code are being bad parsed:

http://www.bburl.com/<link rel="stylesheet" type="text/css" href="clientscript/vbulletin_css/style00048l/vbsc_main-rollup.css" />

The BB Url are being included out of the <link rel="stylesheet".

This only ocurr when Enable CSS Optimiser is enabled, Javascript optimiser works perfect.

Thanks
Reply With Quote
  #299  
Old 01-17-2010, 06:04 PM
Darkimmortal Darkimmortal is offline
 
Join Date: Apr 2009
Posts: 163
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I think it's time I rewrote the CSS optimiser tbh
Reply With Quote
  #300  
Old 01-17-2010, 06:46 PM
ps2wiz ps2wiz is offline
 
Join Date: Apr 2005
Posts: 217
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Darkimmortal View Post
"Yay! Another Facebook Bridge" used to cause that (perhaps it still does?) and I'd imagine it's not the only mod that screws up the css templates.
Does this mod have comparability issues with that facebook plugin? I currently use it, but I also wish to install your mod without any conflicts.
Reply With Quote
  #301  
Old 01-18-2010, 01:19 PM
Quarantine Quarantine is offline
 
Join Date: Jan 2007
Posts: 24
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by GiveMeABreak View Post
The file forum/clientscript/vbulletin_css/style00000l/vbulletin.css is missing. This would indicate your forum is not set to save CSS on the filesystem. If you are certain it is, try running Compress CSS again.

To prevent issues, your forum is currently running without optimised CSS as a fallback.

this in login redirect page

forum vb 4.0.1
css in files

help
I have the same problem after upgrading to vB 4.0.1. Already double-checked my permissions and everything.
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 08:22 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05191 seconds
  • Memory Usage 2,372KB
  • Queries Executed 26 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)bbcode_code
  • (5)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (2)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (2)post_thanks_box_bit
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (3)postbit_attachment
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete