Version: 1.00, by Logician
Developer Last Online: Nov 2023
Version: 2.2.x
Rating:
Released: 08-28-2003
Last Update: Never
Installs: 78
No support by the author.
As you know all vbulletin pages consists of templates and templates consists of HTML (+sometimes javascript) tags.
Nearly in all sites and HTML pages, HTML tags are written in a readable format so that developer can read the source code easily. VB templates abide by this rule too.
However when this "nicely readable" code is called by a visitor, page size unnecessarily increases because of the redundant "spaces" and "line breaks" in the source code which have no useful purpose regarding the page output but is there just for making the source code more readable to the developer.
This hack removes these unnecessary spaces and line breaks from your vbulletin templates AT THE MOMENT they are displayed (in realtime). It does NOT touch your original source code so it is still readable to you when you want to edit it in your admin CP. But it compress the output when they are sent to user's browser.
Removal of these unnecessary characters makes sure:
a) Page output shrinks in all vb pages
b) Thus page loads faster by all visitors
c) You save bandwidth.
Since the removed characters are unnecessary characters, display of your page does NOT change. Please see FAQ below for more info.
Logician, I have to say it again - this is such a great idea! Absolutely minimal server overhead for a huge bandwidth saving! I use And such a simple concept, easily implemented, yet no one else thought of it. Pure genius.
Today at 09:54 AM Erwin said this in Post #41 Logician, I have to say it again - this is such a great idea! Absolutely minimal server overhead for a huge bandwidth saving! I use And such a simple concept, easily implemented, yet no one else thought of it. Pure genius.
08-30-03 at 10:40 AM Logician said this in Post #23 If you are using WebTemplates to manage your "normal pages", the answer is YES. Otherwise no..
Actually, this will just work for EVERY page that you output using vBulletin's doooutput function. That doesn't limit one to Webtemplates at all, most of my entire site is done using vB's dooutput function (and all of KFN 6 will be done using vB3's print_output() function), and as such this hack will apply to all those pages.
works fine in vB3 as well btw, I just placed the code (with tiny changes) in vB3's print_output function in the proper place, works like a charm. Dunno yet if I'm gonna keep it though, unformatted source code might be 'more difficult for people to rip', but usually people don't rip sourcecode, they learn from sourcecode. Lack of proper indenting also looks unprofessional...
One side effect - this hack does remove spaces in between images in the output as well. No big deal, but the buttons in the postbit are cramped next to each other.
Today at 02:44 PM Erwin said this in Post #44 One side effect - this hack does remove spaces in between images in the output as well. No big deal, but the buttons in the postbit are cramped next to each other.
As a matter of fact all these minor side effects can be cured by using
PHP Code:
instead of spaces in the affected templates. It is a better syntax as far as HTML is concerned too.
Quote:
Actually, this will just work for EVERY page that you output using vBulletin's doooutput function. That doesn't limit one to Webtemplates at all, most of my entire site is done using vB's dooutput function (and all of KFN 6 will be done using vB3's print_output() function), and as such this hack will apply to all those pages.
That is right. The hack applies to all VB pages so if your regular pages are vb integrated too, you'll have the compression in them as well. But the question was whether the hack can be applied to regular (non-vb integrated) pages or not and the answer is no unless user uses a vb-integrated solution such as webtemplates.
Excellent, though there seemed to be thousands of instances spanning thirteen styles/skins where I would need to replace relevant spaces with & nbsp;. So I decided to replay the backup functions file.