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
  #62  
Old 09-05-2003, 12:25 PM
Akex Akex is offline
 
Join Date: Jul 2003
Location: France
Posts: 111
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thx a lot, il will save bandwith
Reply With Quote
  #63  
Old 09-05-2003, 02:47 PM
Mickie D Mickie D is offline
 
Join Date: Jun 2002
Posts: 430
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thanks logician

i always look forward to your releases
Reply With Quote
  #64  
Old 09-05-2003, 09:55 PM
Erwin's Avatar
Erwin Erwin is offline
 
Join Date: Jan 2002
Posts: 7,604
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
09-04-03 at 06:23 PM insanctus said this in Post #56
Hmm it only changed the spacing of my page links in threads, rest was not effected.
Easily fix - just edit the pagenav templates and move the space from OUTSIDE the <a link tags to WITHIN the <a link tags.
Reply With Quote
  #65  
Old 09-06-2003, 08:48 AM
Crinos's Avatar
Crinos Crinos is offline
 
Join Date: Oct 2001
Location: Los Angeles, CA
Posts: 151
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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 &nbsp; ... 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
Reply With Quote
  #66  
Old 09-07-2003, 11:53 PM
tpearl5's Avatar
tpearl5 tpearl5 is offline
 
Join Date: Nov 2001
Location: PA
Posts: 1,014
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

faster load time/less bandwidth usage > a couple spacing issues

Very nice! This will definitely be helpful.
Reply With Quote
  #67  
Old 09-08-2003, 12:07 AM
Crinos's Avatar
Crinos Crinos is offline
 
Join Date: Oct 2001
Location: Los Angeles, CA
Posts: 151
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Today at 05:53 PM tpearl5 said this in Post #65
faster load time/less bandwidth usage > a couple spacing issues
Believe me, if it was just a "couple", installing it would be a no-brainer
Reply With Quote
  #68  
Old 09-08-2003, 05:33 AM
matthew tucker's Avatar
matthew tucker matthew tucker is offline
 
Join Date: Nov 2002
Location: Sydney, Australia
Posts: 36
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I have this code, in a PHP include file called from global.php

PHP Code:
if ( $bbuserinfo['userid'] != )
$contact_but '<a href="../forums/showthread.php?s=' $session['sessionhash'] . '&threadid=125"><img src="../forums/images/top_contact.gif" alt="Contact ASE" border="0"></a>';
  
$reg_ucp '<a href="../forums/usercp.php?s=' $session['sessionhash'] . '"><img border="0" src="../forums/images/top_profile.gif" alt="Here you can view your subscribed threads, work with private messages and edit your profile and preferences"></a>';
  
$memberhead '<a href="../forums/memberlist.php?s=' $session['sessionhash'] . '"><img border="0" src="../forums/images/top_members.gif" alt="Find other users"></a>';
  
$searchhead '<a href="../forums/search.php?s=' $session['sessionhash'] . '"><img border="0" src="../forums/images/top_search.gif" alt="Search"></a>';
  
$logout '<a href="../forums/member.php?s=' $session['sessionhash'] . '&action=logout"><img border="0" src="../forums/images/top_logout.gif" alt="Logout"></a>'
and more like that, its a conditional nav buttons hack. I just put each of the variables and others in my header template

Code:
<td align="center" >
   $home_but
   $forums_but
   $cal_but
   $links_but
   $faq_but
   $contact_but
   $searchhead
   $memberhead
   $reg_ucp ...
and usually the buttons (up to twelve of them depending on who's logged in) just wrap around inside the cell using up whatever rows they need.

But using the compressor. they just stay in one long line and push the cell way off to the right.

Is there anything I can do to fix this so that the compressor doesn't mess this up?
Reply With Quote
  #69  
Old 09-08-2003, 08:47 AM
Logician's Avatar
Logician Logician is offline
 
Join Date: Nov 2001
Location: inside vb code
Posts: 4,449
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

@Matthew: First try to add &nbsp; to your buttons like:
PHP Code:
if ( $bbuserinfo['userid'] != 
$contact_but '<a href="../forums/showthread.php?s=' $session['sessionhash'] . '&threadid=125"><img src="../forums/images/top_contact.gif" alt="Contact ASE" border="0"></a>&nbsp;'
  
$reg_ucp '<a href="../forums/usercp.php?s=' $session['sessionhash'] . '"><img border="0" src="../forums/images/top_profile.gif" alt="Here you can view your subscribed threads, work with private messages and edit your profile and preferences"></a>&nbsp;'
  
$memberhead '<a href="../forums/memberlist.php?s=' $session['sessionhash'] . '"><img border="0" src="../forums/images/top_members.gif" alt="Find other users"></a>&nbsp;'
  
$searchhead '<a href="../forums/search.php?s=' $session['sessionhash'] . '"><img border="0" src="../forums/images/top_search.gif" alt="Search"></a>&nbsp;'
  
$logout '<a href="../forums/member.php?s=' $session['sessionhash'] . '&action=logout"><img border="0" src="../forums/images/top_logout.gif" alt="Logout"></a>&nbsp;'
It should fix the problem. If it does not let us know your source code of your whole page with and without compression.
Reply With Quote
  #70  
Old 09-08-2003, 09:43 AM
lasto lasto is offline
 
Join Date: Jan 2002
Posts: 1,514
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

PHP Code:
&nbsp
does fix the problem logician
Reply With Quote
  #71  
Old 09-08-2003, 11:08 PM
matthew tucker's Avatar
matthew tucker matthew tucker is offline
 
Join Date: Nov 2002
Location: Sydney, Australia
Posts: 36
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nope

I did try that, what it does is just put spaces between the buttons, and they stay in a horizontal line rather than wrapping at the table border.

without compression:

<body bgcolor="#9E93C1" text="#000000" id="all" leftmargin="10" topmargin="10" marginwidth="10" marginheight="10" link="#000020" vlink="#000020" alink="#000020">
<!-- BEGIN TEMPLATE: home_header -->
<!-- logo and buttons -->
<div class="txtcenter">

<table border="0" width="100%" cellspacing="0" cellpadding="0" >

<tr>
<td> </td>
<td> </td>
<td align="right"><bold><font face="verdana, arial, helvetica" size="2" >ASE is sponsored by: &nbsp&nbsp&nbsp&nbsp&nbsp</font></bold></td>
</tr>

<!-- logo -->

<tr>
<td valign="top" align="left" >
<a href="index.php?s="><img src="http://www.screeneditors.com/images/aselogocol-230x76.gif" border="0" alt="Australian Screen Editors Guild" align="left" ></a> </td>

<!-- buttons -->

<td align="center" >
<!-- buttons defined in ./forums/buttons.php -->
<a href="../index.php?s="><img src="../forums/images/top_home.gif" alt="Home" border="0"></a>
<a href="../forums/index.php?s="><img border="0" src="../forums/images/top_forums.gif" alt="Discussion Forums and Archives"></a>
<a href="../forums/calendar.php?s="><img src="../forums/images/top_calendar.gif" alt="Events Calendar" border="0"></a>
<a href="../forums/links.php?s="><img border="0" src="../forums/images/top_links.gif" alt="Useful Links"></a>
<a href="../forums/misc.php?s=&action=faq"><img src="../forums/images/top_faq.gif" alt="Frequently Asked Questions" border="0"></a>
<a href="../forums/showthread.php?s=&threadid=125"><img src="../forums/images/top_contact.gif" alt="Contact ASE" border="0"></a>
<a href="../forums/search.php?s="><img border="0" src="../forums/images/top_search.gif" alt="Search"></a>
<a href="../forums/memberlist.php?s="><img border="0" src="../forums/images/top_members.gif" alt="Find other users"></a>
<a href="../forums/usercp.php?s="><img border="0" src="../forums/images/top_profile.gif" alt="Here you can view your subscribed threads, work with private messages and edit your profile and preferences"></a>
<a href="../forums/member.php?s=&action=logout"><img border="0" src="../forums/images/top_logout.gif" alt="Logout"></a>
<a href="../forums/admin/index.php?s="><img border="0" src="../forums/images/top_admincp.gif" alt="Admincp"></a>
<a href="../forums/mod/index.php?s="><img border="0" src="../forums/images/top_mods.gif" alt="Moderators"></a> <br/>

</td>
<!-- sponsors -->

<td valign="top" align="right"><a href="../sponsors.htm"><img src="forums/logos/Atlab_230x76_1.gif" border="0" alt="Sponsors"></a></td>

</table>

with compression:

<body bgcolor="#9E93C1" text="#000000" id="all" leftmargin="10" topmargin="10" marginwidth="10" marginheight="10" link="#000020" vlink="#000020" alink="#000020"><!-- BEGIN TEMPLATE: home_header --><!-- logo and buttons --><div class="txtcenter"><table border="0" width="100%" cellspacing="0" cellpadding="0" ><tr><td></td><td></td><td align="right"><bold><font face="verdana, arial, helvetica" size="2" >ASE is sponsored by: &nbsp&nbsp&nbsp&nbsp&nbsp</font></bold></td></tr><!-- logo --><tr><td valign="top" align="left" ><a href="index.php?s="><img src="http://www.screeneditors.com/images/aselogocol-230x76.gif" border="0" alt="Australian Screen Editors Guild" align="left" ></a></td><!-- buttons --><td align="center" ><!-- buttons defined in ./forums/buttons.php --><a href="../index.php?s="><img src="../forums/images/top_home.gif" alt="Home" border="0"></a><a href="../forums/index.php?s="><img border="0" src="../forums/images/top_forums.gif" alt="Discussion Forums and Archives"></a><a href="../forums/calendar.php?s="><img src="../forums/images/top_calendar.gif" alt="Events Calendar" border="0"></a><a href="../forums/links.php?s="><img border="0" src="../forums/images/top_links.gif" alt="Useful Links"></a><a href="../forums/misc.php?s=&action=faq"><img src="../forums/images/top_faq.gif" alt="Frequently Asked Questions" border="0"></a><a href="../forums/showthread.php?s=&threadid=125"><img src="../forums/images/top_contact.gif" alt="Contact ASE" border="0"></a><a href="../forums/search.php?s="><img border="0" src="../forums/images/top_search.gif" alt="Search"></a><a href="../forums/memberlist.php?s="><img border="0" src="../forums/images/top_members.gif" alt="Find other users"></a><a href="../forums/usercp.php?s="><img border="0" src="../forums/images/top_profile.gif" alt="Here you can view your subscribed threads, work with private messages and edit your profile and preferences"></a><a href="../forums/member.php?s=&action=logout"><img border="0" src="../forums/images/top_logout.gif" alt="Logout"></a><a href="../forums/admin/index.php?s="><img border="0" src="../forums/images/top_admincp.gif" alt="Admincp"></a><a href="../forums/mod/index.php?s="><img border="0" src="../forums/images/top_mods.gif" alt="Moderators"></a><br/></td><!-- sponsors --><td valign="top" align="right"><a href="../sponsors.htm"><img src="forums/logos/AAV_Australia_230x76_1.jpg" border="0" alt="Sponsors"></a></td></table>

with compress ion and spaces

<body bgcolor="#9E93C1" text="#000000" id="all" leftmargin="10" topmargin="10" marginwidth="10" marginheight="10" link="#000020" vlink="#000020" alink="#000020"><!-- BEGIN TEMPLATE: home_header --><!-- logo and buttons --><div class="txtcenter"><table border="0" width="100%" cellspacing="0" cellpadding="0" ><tr><td></td><td></td><td align="right"><bold><font face="verdana, arial, helvetica" size="2" >ASE is sponsored by: &nbsp&nbsp&nbsp&nbsp&nbsp</font></bold></td></tr><!-- logo --><tr><td valign="top" align="left" ><a href="index.php?s="><img src="http://www.screeneditors.com/images/aselogocol-230x76.gif" border="0" alt="Australian Screen Editors Guild" align="left" ></a></td><!-- buttons --><td align="center" ><!-- buttons defined in ./forums/buttons.php --><a href="../index.php?s="><img src="../forums/images/top_home.gif" alt="Home" border="0"></a>&nbsp;
<a href="../forums/index.php?s="><img border="0" src="../forums/images/top_forums.gif" alt="Discussion Forums and Archives"></a>&nbsp;
<a href="../forums/calendar.php?s="><img src="../forums/images/top_calendar.gif" alt="Events Calendar" border="0"></a>&nbsp;
<a href="../forums/links.php?s="><img border="0" src="../forums/images/top_links.gif" alt="Useful Links"></a>&nbsp;
<a href="../forums/misc.php?s=&action=faq"><img src="../forums/images/top_faq.gif" alt="Frequently Asked Questions" border="0"></a>&nbsp;
<a href="../forums/showthread.php?s=&threadid=125"><img src="../forums/images/top_contact.gif" alt="Contact ASE" border="0"></a>&nbsp;
<a href="../forums/search.php?s="><img border="0" src="../forums/images/top_search.gif" alt="Search"></a>&nbsp;
<a href="../forums/memberlist.php?s="><img border="0" src="../forums/images/top_members.gif" alt="Find other users"></a>&nbsp;
<a href="../forums/usercp.php?s="><img border="0" src="../forums/images/top_profile.gif" alt="Here you can view your subscribed threads, work with private messages and edit your profile and preferences"></a>&nbsp;
<a href="../forums/member.php?s=&action=logout"><img border="0" src="../forums/images/top_logout.gif" alt="Logout"></a>&nbsp;
<a href="../forums/admin/index.php?s="><img border="0" src="../forums/images/top_admincp.gif" alt="Admincp"></a>&nbsp;
<a href="../forums/mod/index.php?s="><img border="0" src="../forums/images/top_mods.gif" alt="Moderators"></a>&nbsp; <br/></td><!-- sponsors --><td valign="top" align="right"><a href="../sponsors.htm"><img src="forums/logos/Quantel_230x76_2.gif" border="0" alt="Sponsors"></a></td></table>
Reply With Quote
  #72  
Old 09-09-2003, 01:01 AM
SmEdD's Avatar
SmEdD SmEdD is offline
 
Join Date: Mar 2003
Location: Ontario, Canada
Posts: 381
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

put nowrap in the <td> area and drop the nbsp;'s
Reply With Quote
  #73  
Old 09-09-2003, 01:27 AM
matthew tucker's Avatar
matthew tucker matthew tucker is offline
 
Join Date: Nov 2002
Location: Sydney, Australia
Posts: 36
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

No that's the OPPOSITE of what I want to do. I WANT the buttons to always wrap ... <td nowrap> forces no wrapping for the cell.
Reply With Quote
  #74  
Old 09-09-2003, 01:58 AM
SmEdD's Avatar
SmEdD SmEdD is offline
 
Join Date: Mar 2003
Location: Ontario, Canada
Posts: 381
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

sorry didn't read you post completely

and this is a wild guess but maybe try adding hspace="#" in your image tags.
Reply With Quote
  #75  
Old 09-09-2003, 09:47 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 05:27 AM matthew tucker said this in Post #72
No that's the OPPOSITE of what I want to do. I WANT the buttons to always wrap ... <td nowrap> forces no wrapping for the cell.
When I put your source code in DreamWeaver then open in a browser, your images wraps at the end of table row just like you want and this applies to all source codes you quoted above.

Maybe you can point me to the page where you are experiencing the problem so that I can see it myself.
Reply With Quote
  #76  
Old 09-19-2003, 07:26 PM
d3nnis d3nnis is offline
 
Join Date: Jun 2003
Location: Singapore
Posts: 211
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i got a problem...

please see my forum :

http://forums.keeptouch.net/forumdis...?s=&forumid=19

Those page numbers are joining together... how to leave this alone?
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:09 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.05541 seconds
  • Memory Usage 2,403KB
  • 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
  • (1)bbcode_code
  • (3)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