![]() |
Offline Template Compressor
This hack is similar to Logicians Realtime Template Compressor
(https://vborg.vbsupport.ru/showthread.php?t=56589), but uses a slightly different approach: Instead of doing the compression realtime when the pages are generated, it compresses the templates right in the database when they are being saved, so there will be zero overhead during normal operation. The templates will still look normal when you edit them, just the parsed versions will be compressed. Currently this hack does not touch JavaScript, so there should be no issues with that. (JavaScript could also be compressed, but then there must be no comments in it) Results may vary, but this could reduce traffic approx. 5-10%, even if you use GZip (recommended). Details ------- Difficulty: Easy Files to modify: 1 |
Thanks for sharing your hack with the community
|
what improovments on load time ?
|
Nett :)
[high]* MrNase clicks install...[/high] |
How do you create a setting in "vBulletin Options/Server Settings and Optimization Options" ??
|
Quote:
|
great job!
|
So if we purposely used a space anywhere in the templates we will need to make it then to get the space back after compressing?
|
Yes, this might be necessary, although I tried to add some code to preserve spaces that are there intentionally, eg. for layout purposes.
|
I am having trouble getting the files in the phpinclude_start to run. Like the phreak statisick counter and my $banner software.
Any ideas? |
Can you post your phpinclude_start template?
|
Sure can,
PHP Code:
I made a phpinclude.php file and then did and include('phpinclude.php') to my index.php but still not luck. When I View Source of the main page the area where the banners come up is missing the code from the $banner it looks like this: Code:
<td align="left" width="468" height="60"></td> |
Hmm, I don't know why vBulletin does call compile_template() on phpinclude_start as there should be nothing to do in this template ...
Anyway, try to remove PHP Code:
|
That did it, very odd but dosent' matter as long as it work,, right. lol
|
It's not thaaat odd:
As vBulletin calls compile_template() your phpinclude_start template will be compress, so afterwards it will look similar to this: PHP Code:
|
Nice:)
|
Very nice. I feel an Performance +
|
HELP!
I upped the master-style again. And if i reply now on a Thread it looks like here. This failure only comes with every Browser. Everything else went fine. It comes only if your logged in, isnt that strange? Thank you in advance!! ##edit## Here is my newreply template: Code:
$stylevar[htmldoctype] And if i want to start a new Thread it comes up, too. It's really mystical that not all Usergroups are affected by this ( Every Group but not the Guests) Curios. |
Uninstalled now. Sorry.
|
All times are GMT. The time now is 02:53 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|