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)
-   -   Board Optimization - Combine It - Javascript and CSS optimization (https://vborg.vbsupport.ru/showthread.php?t=229530)

Marvin Hlavac 03-19-2011 10:02 AM

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

Marvin Hlavac 03-19-2011 11:58 AM

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.

Marvin Hlavac 03-20-2011 10:44 AM

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?

Hornstar 04-18-2011 12:56 AM

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.

Marvin Hlavac 04-28-2011 06:25 PM

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.

SBlueman 05-01-2011 09:37 PM

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?

Marvin Hlavac 05-01-2011 11:31 PM

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.

SBlueman 05-02-2011 01:21 AM

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?

Marvin Hlavac 05-02-2011 08:16 AM

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.

SBlueman 05-05-2011 11:49 PM

I gave your suggestion a shot but unfortunately the issue remains with those settings in place.

Marvin Hlavac 05-06-2011 11:48 AM

The next step would be to determine which .js file causes the issue. One by one, place the names of the .js files, which load when you access your thread pages, to the list of Combine It stop words, till the issue goes away. My guess is that the .js file is related to some add-on you have. Let us know.

SBlueman 05-15-2011 12:57 AM

How can I find the names of the .js files to test?

Marvin Hlavac 05-15-2011 08:52 AM

One way to find out which .js files load when a page opens is to 1. Open the page in a web browser, 2. View the source code by clicking View > Source on the menu bar of your web browser, and 3. Search (Ctrl+F) the source page for instances of .js

muratcan25 05-15-2011 04:05 PM

Thank you

A.Chakery 05-30-2011 03:33 PM

when I enable this plugin, my website doesnt load, any help is appreciated.

Regards...

A.Chakery 05-30-2011 04:27 PM

Now I get this :



Quote:

Fatal error: Uncaught exception 'JSMinException' with message 'Unterminated string literal.' in /home/user/public_html/includes/php-min.php:94 Stack trace: #0 /home/user/public_html/includes/php-min.php(235): JSMin->action(1) #1 /home/user/public_html/includes/php-min.php(64): JSMin->min() #2 /home/user/public_html/includes/combineit.php(177): JSMin::minify('<!DOCTYPE html ...') #3 /home/user/public_html/includes/functions.php(5737) : eval()'d code(9): combineJS('<!DOCTYPE html ...') #4 /home/user/public_html/includes/functions.php(5737): eval() #5 /home/user/public_html/index.php(599) : eval()'d code(303): print_output('<!DOCTYPE html ...') #6 /home/user/public_html/index.php(599): eval() #7 /home/user/public_html/vbseo.php(1397): require('/home/user/...') #8 {main} thrown in /home/user/public_html/includes/php-min.php on line 94

Marvin Hlavac 05-30-2011 04:40 PM

Ali, try to disable the combining of .js (combine just .css). See if that works. If yes, then the next step will be to find out which .js file is causing problems. Likely it will be one of an add-on, or something that doesn't originate from vBulleting itself. You will be able to place such file(s) on the "do not combine" list.

A.Chakery 05-30-2011 07:24 PM

oh, thanks for the tip marvin, I am gonna go for it.

regards.

iask 06-08-2011 03:40 PM

Work for vb 4 ?

Cyrez 07-04-2011 02:47 PM

We need this for vb4.. Anything extra we can use to optimize.. we need!

final kaoss 07-20-2011 03:00 PM

Agreed. Bumps

lolly01 08-17-2011 12:39 AM

vb4 compatible?

Kolbi 10-19-2011 09:33 AM

*push*

vB 4?

K!nG 12-23-2011 01:11 AM

vbulletin 4 ????? Update coming up or /?? ?

thecore762 01-03-2012 06:33 AM

Bump, I'd like to see a similar addon for vb4.

Rolgabu 04-12-2012 08:29 PM

i've made a v4x version of this addon.
gonna upload it at some point.

added cdn integration feature (rewrites urls inside css)

Rolgabu 04-12-2012 08:58 PM

well. ive used the idea from his script, but the code is written from scratch.
dont think i need a premission to post script written by me.

or if so, i'll ask him.
i dont think thats gonna be a problem.

Deafmute 08-03-2012 10:45 AM

tanx dude

ChiNa 08-11-2012 02:34 AM

I am sorry to say, but this is one if the most disapointing mods I have seen on here! First thing when I ran this, just running my CMP_INDEX.PHP page, I got 500 bytes of JS CACHE! and the page was running 100 times slower! I used it for 2 hours, checking and checking! Never ever seen a mod with so less power, and so much damage!

But the Idea is totally great, I am just disapointed that it does not work for me!
Keep up the good job!

final kaoss 04-19-2018 07:23 PM

does not work properly unfortunately.

This would be great to have for vbulletin 4, so I'm putting in a mod request (unpaid). Unfortunately, this mod author hasn't logged in since 2013.

One glaring problem is that it seems to create multiple css files (perhaps one per unique visitor?) in the cache folder. This should be changed to have only one css per template/style to rule them all instead of winding up with thousands of css files. Plus it also seemed to mess up with some css, disfiguring the appearance.


All times are GMT. The time now is 10:11 PM.

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.01172 seconds
  • Memory Usage 1,799KB
  • 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
  • (3)bbcode_code_printable
  • (1)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
  • (30)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