Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases

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
  #102  
Old 12-31-2003, 03:01 PM
Princeton's Avatar
Princeton Princeton is offline
 
Join Date: Nov 2001
Location: Vineland, NJ
Posts: 6,693
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

In vB3, you have more control of Search and Replace.
It's only a headache if you don't know how to use it properly. (It takes some time to get use to it.)

In vB3, you'll find that it has a lot of javascript/comments and "empty" space (found in rendered html source) caused by conditionals. Remove all these space/lines/comments and your site will load quicker and save on bandwidth.

- every little bit counts
Reply With Quote
  #103  
Old 02-28-2004, 10:10 PM
EricGT EricGT is offline
 
Join Date: Jan 2004
Posts: 56
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Crinos
There are a lot more "spacing" issues then the ones mentioned above ... the "down arrow" button marking new posts also loses its spacing in forumdisplay ... the postbit buttons all become cramped together in some areas ... forum text links separated by white space all get smashed together, etc ...

I am giving this hack a chance, I really am, by hunting all templates in my test forum that contain visible white space and grumpily replacing them with   ... just incorporating the hack isn't enough if you like your page to not look amateurish with all the lost white space...

Even the slightest misalignment makes me cringe, what more for squished links
It seems to me that there is a pretty simple way to deal with this spacing issue. In the preg_replace statement, instead of eliminating all white-space characters between html tags, replace all white-space characters between html tags with one space. The addition to the file size would be minimal and this would deal with the spacing problem. This is what I did on my site and it is working great.

Thanks for a very helpful hack. My site is using 80 - 90% of two T-1's and a 5% or 6% reduction is bandwidth is meaningful. Eric
Reply With Quote
  #104  
Old 03-07-2004, 09:40 AM
Bulent Tekcan Bulent Tekcan is offline
 
Join Date: Oct 2003
Location: TURKEY - Istanbul
Posts: 437
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Sorry

Is it available VB3 RC4 ?

Thanks
Reply With Quote
  #105  
Old 03-07-2004, 10:25 AM
Logician's Avatar
Logician Logician is offline
 
Join Date: Nov 2001
Location: inside vb code
Posts: 4,449
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by turkeyforum
Is it available VB3 RC4 ?
I don't use VB3 so not yet.. But will be..
Reply With Quote
  #106  
Old 04-20-2004, 11:30 PM
Rampag33's Avatar
Rampag33 Rampag33 is offline
 
Join Date: Jun 2002
Location: Houston, Texas
Posts: 162
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

How do you implement this in VB3 gold?
Reply With Quote
  #107  
Old 12-02-2004, 10:38 AM
jthorpe jthorpe is offline
 
Join Date: Jun 2002
Posts: 27
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Welp, this screwed up my board a good bit so I removed it, and now many of my templates have added spaces when they didn't before. So now I have to spend a number of hours going back to fix them. On top of that, my CMPS templates have screwed up colors in IE now. Since I'm running Gzip, I don't see the benefit. I guess I should have realized that before installing this hack.
Reply With Quote
  #108  
Old 12-02-2004, 07:00 PM
Logician's Avatar
Logician Logician is offline
 
Join Date: Nov 2001
Location: inside vb code
Posts: 4,449
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by jthorpe
Welp, this screwed up my board a good bit so I removed it, and now many of my templates have added spaces when they didn't before. So now I have to spend a number of hours going back to fix them. On top of that, my CMPS templates have screwed up colors in IE now. Since I'm running Gzip, I don't see the benefit. I guess I should have realized that before installing this hack.
The version I released in the first post of this thread can not cause such effects if you managed to install it successfully. For starters its compression is in "real time" (ie on the fly) so no templates are actually changed. Hence it is impossible that templates have added spaces even after the removal of the hack.
Reply With Quote
  #109  
Old 12-02-2004, 07:20 PM
jthorpe jthorpe is offline
 
Join Date: Jun 2002
Posts: 27
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

hmmm, interesting. It wasn't happening before the hack, and everything is still screwed up after removing it. I haven't missed anything on the install or removal so I know the hack is completely gone, yet some of my formatting is still messed up. It has obviously done SOMETHING to my forum. Whatever that is yet, I have yet to discover. I'm not sure if mmcache could be having an issue or not but when I put the hack back, the stuff that's screwed up now goes back to normal, and of course I lose spaces all over the place on the other stuff. Don't know what to tell ya, but the hack did cause this problem.
Reply With Quote
  #110  
Old 12-18-2004, 09:34 AM
alqadir alqadir is offline
 
Join Date: Aug 2004
Posts: 36
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This question might not belong here, so if it does not please remove it.
Let's say I wanted to remove empty excessive white space. So in the code if you see <br /> <br /> <br /> (ie <br /> three times in a row) how would you remove it so that you can have a max of two in a row.

I need this because, everytime the editor edits an html marked up post, at the end of each line it adds <br /> making the post huge if edited a few times
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 04:43 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.06813 seconds
  • Memory Usage 2,293KB
  • Queries Executed 24 (?)
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_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
  • (2)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (10)postbit_onlinestatus
  • (10)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