Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
RealTime Template Compressor: Reduces page sizes, loads pages faster, saves Bandwidth Details »»
RealTime Template Compressor: Reduces page sizes, loads pages faster, saves Bandwidth
Version: 1.00, by Logician Logician is offline
Developer Last Online: Nov 2023 Show Printable Version Email this Page

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.

This hack is 100% compatible with Teck's Microstat Hack and my Advanced Templates: Dynamic Templates Changing according to different conditions hack and WebTemplates 2.x: VB Integrated Content Management System . It is a very easy to install add (just a few lines in 1 step) yet effective.

I appreciate if you can click INSTALL button, if you use the hack. Thank you. :glasses:

Show Your Support

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

Comments
  #47  
Old 09-01-2003, 12:37 PM
lasto lasto is offline
 
Join Date: Jan 2002
Posts: 1,514
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i noticed the buttons where all together and thought it was me

ok will fix with command above cheers
Reply With Quote
  #48  
Old 09-02-2003, 04:54 AM
StrykerContact StrykerContact is offline
 
Join Date: Feb 2003
Posts: 49
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This is great, I use to use this sort of thing to compress my html pages.
Reply With Quote
  #49  
Old 09-02-2003, 11:25 AM
Kriek's Avatar
Kriek Kriek is offline
 
Join Date: Jul 2002
Location: Florida
Posts: 135
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #50  
Old 09-02-2003, 09:44 PM
Sebastian's Avatar
Sebastian Sebastian is offline
 
Join Date: Oct 2002
Location: America
Posts: 488
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Logician, this is a great hack. However, i will not use it because i am too picky and html must look readable

i know there are many people that like to view the page source, i myself do.

its just a habit by most coders to look at the page source.

you also have to note that 1byte is extremely small, 1,000 bytes is just about 1KB.

there really isn't much you'll be saving, as even a user on 56k would probably not even noticed a difference in 5,000 bytes.

you might save a dollar or two by doing this, but a lot of page source viewers are gonna be like "what a crappy coder"

lol

seriously though, good thought.
i am trying to focus my time in reducing vbulletin queries. that is what kills me.
Reply With Quote
  #51  
Old 09-03-2003, 06:30 AM
Erwin's Avatar
Erwin Erwin is offline
 
Join Date: Jan 2002
Posts: 7,604
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
09-01-03 at 10:17 PM Logician said this in Post #45
As a matter of fact all these minor side effects can be cured by using
PHP Code:
&nbsp
instead of spaces in the affected templates. It is a better syntax as far as HTML is concerned too.
True, except
PHP Code:
&nbsp
creates a wider space than a normal HTML whitespace. However, I still love your hack. 5% savings is equal to many many gigabytes for me per year.
Reply With Quote
  #52  
Old 09-03-2003, 08:56 AM
Logician's Avatar
Logician Logician is offline
 
Join Date: Nov 2001
Location: inside vb code
Posts: 4,449
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Today at 01:44 AM Sebastian said this in Post #49
you also have to note that 1byte is extremely small, 1,000 bytes is just about 1KB.

there really isn't much you'll be saving, as even a user on 56k would probably not even noticed a difference in 5,000 bytes.
I don't agree. If your gain is 5%, this means your speed is also 5% and it is not that trivial considering the fact that it applies to ALL vb pages, not only 1 page.

Besides if you are on a server which you are paying according to your bandwidth consumption (on most dedicated it is so) and you have a high traffic, even %1 or %2 less consumption can make a difference when it comes to paying your server bills especially in the long term.

But if you have a small site eating 2 GB. per month and your host allows you to spend 30 GB. per month, well you may not care about this hack or any other bandwidth related issues which is understandable.

Quote:
you might save a dollar or two by doing this, but a lot of page source viewers are gonna be like "what a crappy coder"
Oh just the contrary! A professional checking your source code will understand the logic behind instantly and such a comment will come from only a newbie.

As a matter of fact when I check source code of pages, I blame the developer if I notice a lot of inlined lines in the HTML code. It shows that dev. is either unaware of the results of these lines or don't care.

So please label the correct person as "the crappy coder". :glasses:
Reply With Quote
  #53  
Old 09-03-2003, 01:19 PM
David Bott David Bott is offline
 
Join Date: Dec 2001
Posts: 215
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I like the idea of this hack very much. On our site this would make a hugh impact in bandwidth seeing we currently to about 1.7 Terabytes a month. (Yes, you read that right.) But I just could not get past some of of the spacing issues created. I did a quick test of it, it worked very well, but during the short test I got 3 e-mails telling me something is wrong with the spaces on the site. (Like the page links)

Oh well....great job non-the-less.

David Bott
AVS Forum
http://www.avsforum.com
Reply With Quote
  #54  
Old 09-03-2003, 02:47 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Another excellent hack by the "Master". Thank you, sir.
Reply With Quote
  #55  
Old 09-04-2003, 06:21 AM
Skyline_GT Skyline_GT is offline
 
Join Date: May 2003
Location: Vancouver, BC
Posts: 482
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

nice hack
Reply With Quote
  #56  
Old 09-04-2003, 07:14 AM
MaDCaT75 MaDCaT75 is offline
 
Join Date: Jul 2003
Location: Southern California
Posts: 718
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Sorry but this just makes everything look weird on my forums.
Reply With Quote
  #57  
Old 09-04-2003, 07:23 AM
insanctus's Avatar
insanctus insanctus is offline
 
Join Date: Feb 2003
Location: Michigan
Posts: 582
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hmm it only changed the spacing of my page links in threads, rest was not effected.
Reply With Quote
  #58  
Old 09-04-2003, 07:24 AM
MaDCaT75 MaDCaT75 is offline
 
Join Date: Jul 2003
Location: Southern California
Posts: 718
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yeah I just didnt like that part :ermm:
Reply With Quote
  #59  
Old 09-04-2003, 07:26 AM
insanctus's Avatar
insanctus insanctus is offline
 
Join Date: Feb 2003
Location: Michigan
Posts: 582
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

all ya have to do as add html code for space, I just do not care enough to lmao.
Reply With Quote
  #60  
Old 09-04-2003, 07:36 AM
MaDCaT75 MaDCaT75 is offline
 
Join Date: Jul 2003
Location: Southern California
Posts: 718
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I did that... it looked really weird :ermm:
Reply With Quote
  #61  
Old 09-04-2003, 07:39 AM
lasto lasto is offline
 
Join Date: Jan 2002
Posts: 1,514
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

all it did to me was make all buttons more compact but the above code fixed that.Besides that i aint noticed nothing weird.
Reply With Quote
Reply


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 07:16 AM.


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.08195 seconds
  • Memory Usage 2,352KB
  • Queries Executed 30 (?)
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
  • (2)bbcode_php
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (16)post_thanks_box
  • (16)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (16)post_thanks_postbit_info
  • (15)postbit
  • (16)postbit_onlinestatus
  • (16)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_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete