Go Back   vb.org Archive > vBulletin Modifications > Archive > Modification Graveyard
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Page Output Compression - Whitespace stripper. Details »»
Page Output Compression - Whitespace stripper.
Version: 1.00, by buro9 buro9 is offline
Developer Last Online: Jul 2012 Show Printable Version Email this Page

Category: Board Optimization - Version: 3.0.6 Rating:
Released: 09-22-2004 Last Update: Never Installs: 70
 
No support by the author.

No longer supported by the author.

Show Your Support

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

Comments
  #92  
Old 02-25-2005, 06:23 PM
BigCheeze BigCheeze is offline
 
Join Date: Oct 2002
Location: Lost in Colorado
Posts: 48
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Installed and seems to be working nicely on a "patched" 3.0.6
Reply With Quote
  #93  
Old 02-28-2005, 10:54 PM
Stryker[X] Stryker[X] is offline
 
Join Date: Sep 2004
Posts: 18
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Help! I installed it and got an error so I removed the code and now I get this on any page of the forums!

Parse error: parse error, unexpected $, expecting ',' or ';' in /homepages/15/d110888008/htdocs/thegamernation.com/forums/includes/functions.php on line 3734
Reply With Quote
  #94  
Old 03-01-2005, 12:03 AM
Gunshot Gunshot is offline
 
Join Date: Feb 2005
Posts: 119
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Very nice boost in speed on all pages

thank you
Reply With Quote
  #95  
Old 03-05-2005, 12:34 AM
moppenet moppenet is offline
 
Join Date: Jan 2005
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is this fixed in 3.0.7?
Reply With Quote
  #96  
Old 03-28-2005, 04:35 AM
Mosh's Avatar
Mosh Mosh is offline
 
Join Date: Aug 2004
Location: Melbourne, Australia
Posts: 1,968
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by moppenet
Is this fixed in 3.0.7?
If you are asking if this hack works with 3.0.7, then the answer is yes it works, I have it installed myself both the aggressive and lite versions combined.

If that is not what you are asking, can you please clarify what you are referring to please.

Thanks,

jd
Reply With Quote
  #97  
Old 04-08-2005, 03:38 AM
JulianD's Avatar
JulianD JulianD is offline
 
Join Date: Jan 2002
Posts: 455
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Installed this hack with no modification at all.

Just add this to your phpinclude_end template:

PHP Code:
$thisscriptis = array(
    
'editpost',
    
'register',
    
'newreply',
    
'newthread',
    
'sendmessage',
    
'private',
);
if (!
in_array(THIS_SCRIPT$thisscriptis)) {
    
$patterns = array('/\>\s+\</''/^\s*/m');
    
$replace = array('> <''');
    
$output preg_replace($patterns$replace$output);
} else {
    
$output preg_replace('/\>\s+\</''> <'$output);

Reply With Quote
  #98  
Old 04-08-2005, 01:20 PM
Zero Tolerance's Avatar
Zero Tolerance Zero Tolerance is offline
 
Join Date: Feb 2004
Location: England
Posts: 813
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

To save execution time, wouldn't it be better to do this upon "saving" a template to the database? That way it has already been stripped, and it doesn't need to be done upon page load, i know it won't make much of a performance difference, but if i page uses a LOT of HTML and a LOT of templates combined, it might take longer to load by a little bit.

Also seen as how vBulletin saves the template to the database in 2 forms, you just strip the whitespaces and such for the actual template shown on the site, while the default remains the same for when you edit it via the ACP?

Nice addition none the less, just thought that implementation could make it better

- Zero Tolerance
Reply With Quote
  #99  
Old 04-08-2005, 01:31 PM
buro9 buro9 is offline
 
Join Date: Feb 2002
Location: London, UK
Posts: 585
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Interesting.

Where's the second stored instance?

The datastore stores styles but not templates. The template table has too columns that look good contenders... is the first 'template' the one I should modify?

Hmmm... I should also do bbcodeparse too shouldn't I, to get the content.

Certainly possible, but not as simple to install and support as this one Which is a large part of how I now like to write stuff
Reply With Quote
  #100  
Old 04-08-2005, 02:07 PM
Zero Tolerance's Avatar
Zero Tolerance Zero Tolerance is offline
 
Join Date: Feb 2004
Location: England
Posts: 813
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

In the table "template", there are 2 fields, one is: "template", and the other is "template_un". The first one is the one displayed on the forums, and already parsed (phrase tags, if conditionals, etc..), and the second one is the one un-parsed, for when editing via the ACP (it meant that vB didn't have to waste execution time to unparse the template upon editing/search/find & replace). My idea was that you modified the ACP style control file, so after saving a template, the data that gets saved to "template" has white spaces stripped.

- Zero Tolerance
Reply With Quote
  #101  
Old 04-14-2005, 08:37 AM
sross sross is offline
 
Join Date: Mar 2004
Posts: 355
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

So let me get this right. for the lite version I place in the includes file:

Quote:
// HACK : START : COMPRESS
$vartext = preg_replace('/\>\s+\</', '> <', $vartext);
// HACK : END : COMPRESS
Questions.. does this alter all my files or is it only changing whats output? I mean if I open my files via ftp will they be all compressed?
-If something goes wrong can I back out of this by just removing the code? What happened to that guy above who tried to back out and is toast? I'd like to install this but am scared it will screw something up beyond repair? thanks!
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 04:49 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.09384 seconds
  • Memory Usage 2,308KB
  • Queries Executed 25 (?)
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_php
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)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