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

Reply
 
Thread Tools
Combine It - Javascript and CSS optimization Details »»
Combine It - Javascript and CSS optimization
Version: 1.01, by Menewsha Menewsha is offline
Developer Last Online: Dec 2022 Show Printable Version Email this Page

Category: Board Optimization - Version: 3.8.0 Rating:
Released: 12-03-2009 Last Update: 12-08-2009 Installs: 61
Uses Plugins Auto-Templates
Additional Files Translations Is in Beta Stage  
No support by the author.

What does it do?

This mod is designed to automatically merge and minify all CSS and Javascript on the board and cache the result. This helps reduce requests to the server and reduces bandwidth usage.

Installation
  1. Upload contents of upload folder to forum
  2. Create a folder named 'cache' in the forum
  3. Make sure the web server has the appropriate permissions to write to the cache folder
  4. Import product-combineit.xml into vBulletin
  5. Edit options under vBulletin options to reflect how you want the mod to act and to activate it

Notes

This may not work with highly customized CSS or Javascript. If the script can't write to the cache folder this mod will not function. If you find problems with the order a particular script is executing in, add it's filename as a stop word and it'll load as usual.

Download Now

File Type: zip combineit.zip (58.8 KB, 563 views)

Screenshots

File Type: jpg screenshot.jpg (79.6 KB, 0 views)

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #42  
Old 03-19-2011, 10:02 AM
Marvin Hlavac Marvin Hlavac is offline
 
Join Date: Sep 2007
Posts: 102
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi Menewsha,

Many thanks for creating this add-in, and for sharing it with us.

I have combined my .js files recently myself, but I didn't know how to combine my two .css files. I just installed your add-in, configured it to minify and combine only .css, and tested it. It worked!

Now, instead of two .css files, when I check my source I only see one. I'm very much grateful to you for this!

However, I run my site via a CDN (Content Delivery Network), and I need to find a way to change the URL

from:

Code:
www.example.com/cache/

to:
Code:
cdn.example.com/cache/

The method I use for changing URLs of other static content doesn't seem to work for the .css file generated by your product.

For other static content (.js, .jpg, .gif, and even my old .css files), I simply created a Replacement Variable in the Replacement Variable Manager, but creating one for www.example.com/cache/ ---> cdn.example.com/cache/ doesn't change the www to cdn.

Maybe the combineit.php should be edited somehow to address my specific requirement?

I still want the plug-in to save the combined .css to the same directory ( www.example.com/cache/ ), but I need the URL in the html of my page to be cdn.example.com/cache/

Any assistance with this would be greatly appreciated.

Kind regards,

Marvin
Reply With Quote
  #43  
Old 03-19-2011, 11:58 AM
Marvin Hlavac Marvin Hlavac is offline
 
Join Date: Sep 2007
Posts: 102
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I solved the above CDN-related issue by editing the line 101 of the combineit.php as follows:

Code:
$buffer = str_replace($first, '<link type="text/css" rel="stylesheet" href="'.'http://cdn.example.com'.'/cache/'.$hash.'.css" />'."\n", $buffer);

However, I came across an issue with WYSIWYG editor and FireFox web browser. When css files, including inline css, are combined, the WYSIWYG editor is not styled in FireFox (the background is gray instead of white, and fonts are different, too).

I think if it were possible to exclude individual css file(s) from being combined, this issue could perhaps be corrected by excluding vbulletin_editor.css. But I don't know if it would at all be possible to modify this product to exclude individual css files like it is possible to exclude js files.

Any feedback would be much appreciated.
Reply With Quote
  #44  
Old 03-20-2011, 10:44 AM
Marvin Hlavac Marvin Hlavac is offline
 
Join Date: Sep 2007
Posts: 102
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I have found the above mentioned issue, which causes FireFox not to style the reply box, to be related to hosting CSS on a CDN. So this issue is not the fault of this product. This product, as far as I can see, works flawlessly, combining .css files with not a single issue so far on my forum. This product is an unnoticed gem! I can't believe only 43 people marked it as installed to this day!

I may look into using it to also combine my .js files, even though I already combined some of them myself a while ago. I briefly enabled the .js feature, but while it did combine them all, and my pages displayed in my browser just fine, I did notice a yellow exclamation mark in the Internet Explorer's status bar notifying me of errors. This may be related to incompatibility of my own modifications though, so I may look into this at a later date. For now, I'm just very glad I can use it at least for the .css files.

Is anyone using this product successfully for combining .js files? Would you mind sharing your URL, or tell us if it worked for you with or w/out any modification(s) needed?
Reply With Quote
  #45  
Old 04-18-2011, 12:56 AM
Hornstar Hornstar is offline
 
Join Date: Jun 2005
Location: Australia
Posts: 2,469
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yeah I just found this too. Can't believe not more people are wanting such a feature working on their sites.

I will trial this in a little bit and fingers cross it works.
Reply With Quote
  #46  
Old 04-28-2011, 06:25 PM
Marvin Hlavac Marvin Hlavac is offline
 
Join Date: Sep 2007
Posts: 102
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

After 6 weeks of using this add-on to combine just .CSS, I decided to use it also for combining .JS. (Previously I combined my .JS myself, but the way I was doing it wasn't as nice as using this add-in.)

It works. The only slight issue I observed was related to an add-in I use (Geek Auto Linker), but that was easily solved by adding the name of the javascript for Geek Auto Linker (gal.js) as a "stop word" in Combine IT.

So, as a conclusion I can say, Combine IT works, and it works very well. For many (most?) vBulletin installations Combine IT will likely work right out of the box.
Reply With Quote
  #47  
Old 05-01-2011, 09:37 PM
SBlueman SBlueman is offline
 
Join Date: Jan 2006
Posts: 717
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I seem to be having issues where members can't click on any quick reply options. Are others experiencing any issues with the quick reply?
Reply With Quote
  #48  
Old 05-01-2011, 11:31 PM
Marvin Hlavac Marvin Hlavac is offline
 
Join Date: Sep 2007
Posts: 102
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

By "Quick Reply options" do you mean the formatting options such as bold, italic, underline, enter hyperlink, add image, etc? I haven't noticed these issues, and I just tested them on my forum.

To ID the cause if the issue, I'd start by first trying to find out if a .css or a .js file is causing it. Disable .js combining, and test your forum. Let us know.
Reply With Quote
  #49  
Old 05-02-2011, 01:21 AM
SBlueman SBlueman is offline
 
Join Date: Jan 2006
Posts: 717
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yes, those are the options I was referring to. It seems that the issue is resolved once I disable .js combining. However, what to do if you want to combine .js?
Reply With Quote
  #50  
Old 05-02-2011, 08:16 AM
Marvin Hlavac Marvin Hlavac is offline
 
Join Date: Sep 2007
Posts: 102
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You can (should?) specify in Combine It options that you want to combine only files from the same host.

Let is know if that helps.
Reply With Quote
  #51  
Old 05-05-2011, 11:49 PM
SBlueman SBlueman is offline
 
Join Date: Jan 2006
Posts: 717
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I gave your suggestion a shot but unfortunately the issue remains with those settings in place.
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 06:35 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.05289 seconds
  • Memory Usage 2,322KB
  • 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
  • (3)bbcode_code
  • (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
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (2)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
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • 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