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
  #47  
Old 10-27-2004, 08:25 AM
Oblivion Knight's Avatar
Oblivion Knight Oblivion Knight is offline
 
Join Date: May 2002
Location: Sheffield, UK
Posts: 1,757
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Ghostsuit
Simple and effective. Oh and anyone that has VB3 MicroStats hack installed will not be able to find

Code:
if (DB_QUERIES)
  {
    $pageendtime = microtime();
so place it before

Code:
if (DB_QUERIES)
		{
			$ms = '';
Thats should do the job.
Actually, this is wrong.. Buro stated to add the code ABOVE this:

Code:
	$pageendtime = microtime();
Otherwise, the page loading time will be inaccurate.
Reply With Quote
  #48  
Old 10-29-2004, 04:11 PM
Tradjick Tradjick is offline
 
Join Date: Jan 2004
Posts: 219
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This hack is sooo sweet. It changed my forumhome output from 46.100 bytes to 38.770 bytes which means from 100% to 84% which is a gain of 16% in decreased size. Thanks you!
Reply With Quote
  #49  
Old 10-31-2004, 02:22 AM
Gutspiller's Avatar
Gutspiller Gutspiller is offline
 
Join Date: Dec 2001
Posts: 1,046
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

So after all the discussion in this thread, does this hack screw up when you edit a post?

What about when you are applying a hack and it has you look for certain code? If you do a search for the code from what somebody gives you to search for, if your spaces aren't right, won't the search turn up zero results because you've removed the spacing?
Reply With Quote
  #50  
Old 10-31-2004, 08:23 AM
msimplay's Avatar
msimplay msimplay is offline
 
Join Date: Aug 2002
Location: UK
Posts: 1,059
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

is there a way so formatting where [html] tag doesn't get messed up ?
maybe an if condition ?
Reply With Quote
  #51  
Old 10-31-2004, 09:23 AM
Oblivion Knight's Avatar
Oblivion Knight Oblivion Knight is offline
 
Join Date: May 2002
Location: Sheffield, UK
Posts: 1,757
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If you run a journal system, you may also want to add journal in to the $thisscriptis array..
Reply With Quote
  #52  
Old 10-31-2004, 03:57 PM
Amavisca Amavisca is offline
 
Join Date: Oct 2003
Posts: 59
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

when i try to put 'journal' in, it game an error
Reply With Quote
  #53  
Old 10-31-2004, 04:02 PM
Oblivion Knight's Avatar
Oblivion Knight Oblivion Knight is offline
 
Join Date: May 2002
Location: Sheffield, UK
Posts: 1,757
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Make sure that the line above has a commar after it..

It should look something like this:

Code:
	$thisscriptis = array(
		'editpost',
		'register',
		'newreply',
		'newthread',
		'sendmessage',
		'private',
		'journal'
	);
Reply With Quote
  #54  
Old 10-31-2004, 04:09 PM
Amavisca Amavisca is offline
 
Join Date: Oct 2003
Posts: 59
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thnx for the quick reply ok, yep i forget the comma. I have another question if u can answer: what does this info tell u :
Page generated in 0.53191209 seconds (65.18% PHP - 34.82% MySQL) with 13 queries
DEBUG Mode OFF | GZIP ON (level 1) | 0.41 : 0.40 : 0.37 | No uncached Templates

and btw I just move to a dedicate server but the serverload and memory is very high sometimes, how can i keep it low>?
Reply With Quote
  #55  
Old 10-31-2004, 05:43 PM
msimplay's Avatar
msimplay msimplay is offline
 
Join Date: Aug 2002
Location: UK
Posts: 1,059
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

isn't there a way to just exclude the html tag from the white space stripper ?
Reply With Quote
  #56  
Old 10-31-2004, 05:50 PM
Oblivion Knight's Avatar
Oblivion Knight Oblivion Knight is offline
 
Join Date: May 2002
Location: Sheffield, UK
Posts: 1,757
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Amavisca
what does this info tell u :
Page generated in 0.53191209 seconds (65.18% PHP - 34.82% MySQL) with 13 queries
DEBUG Mode OFF | GZIP ON (level 1) | 0.41 : 0.40 : 0.37 | No uncached Templates

and btw I just move to a dedicate server but the serverload and memory is very high sometimes, how can i keep it low>?
What page are those stats from, and what hacks do you have installed? The page generation time and server loads are both higher than what I'd deem as normal.


Quote:
Originally Posted by msimplay
isn't there a way to just exclude the html tag from the white space stripper ?
If you use the "lite" version; the php, code and html tags shouldn't be affected.
Reply With Quote
  #57  
Old 10-31-2004, 05:53 PM
Deimos Deimos is offline
 
Join Date: Oct 2002
Posts: 529
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Works ok for me, I installed it.
Definite speed improvement.
Reply With Quote
  #58  
Old 10-31-2004, 06:42 PM
Amavisca Amavisca is offline
 
Join Date: Oct 2003
Posts: 59
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
What page are those stats from, and what hacks do you have installed? The page generation time and server loads are both higher than what I'd deem as normal.
It is from my forumhome ( which has quite a few icon image and lots forums ) and I did install the Micro Stat hax.
Reply With Quote
  #59  
Old 10-31-2004, 07:28 PM
msimplay's Avatar
msimplay msimplay is offline
 
Join Date: Aug 2002
Location: UK
Posts: 1,059
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Oblivion Knight


If you use the "lite" version; the php, code and html tags shouldn't be affected.
hmm have u tested this coz for me it did change the way it rendered the page

code and php tags are unaffected but html tag goes haywire

^^ sorry

apparently this works with it great

PHP Code:
    $thisscriptis = array(
        
'editpost',
        
'register',
        
'newreply',
        
'newthread',
        
'sendmessage'
    
);

    if (!
in_array(THIS_SCRIPT$thisscriptis))
    {
        
$patterns = array('/\>\s+\</''/^\s*/m');
        
$replace = array('> <''');
        
$vartext preg_replace($patterns$replace$vartext);
    }
    else
    {
        
$vartext preg_replace('/\>\s+\</''> <'$vartext);
    } 
Reply With Quote
  #60  
Old 10-31-2004, 07:50 PM
Mickie D Mickie D is offline
 
Join Date: Jun 2002
Posts: 430
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

@buro9 feel free to do with it what ever you wish

this hack is great most people want to install games and pets (and i do aswell lol) but when they use vb some more and their sites get busier they will be running to these mods.


@amavisca http://turck-mmcache.sourceforge.net/index_old.html <---- the best software for php (and to all other people you wont be able to use this unless you have ssh access or you have a nice host that will install it for ya)
Reply With Quote
  #61  
Old 11-02-2004, 12:41 PM
buro9 buro9 is offline
 
Join Date: Feb 2002
Location: London, UK
Posts: 585
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Mickie D
@buro9 feel free to do with it what ever you wish

this hack is great most people want to install games and pets (and i do aswell lol) but when they use vb some more and their sites get busier they will be running to these mods.


@amavisca http://turck-mmcache.sourceforge.net/index_old.html <---- the best software for php (and to all other people you wont be able to use this unless you have ssh access or you have a nice host that will install it for ya)
First post adjusted to use the array version (simpler than explaining what is going on with a 'lite' or 'extreme' version).

Also added credit to those in this thread who have helped others resolve problems and questions from others.

Also modified the instruction to say AFTER a chunk of code, rather than BEFORE. As the old version depended on not having microstats installed... the new version should be clearer for all of those who want to install it... microstats or not.
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 01:59 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05301 seconds
  • Memory Usage 2,367KB
  • 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
  • (4)bbcode_code
  • (1)bbcode_php
  • (6)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
  • (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