Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

HTML Catalog Cleaner - Removes excess white space

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions
 
Thread Tools Search this Thread
  #41  
Old 01-02-2005, 09:50 PM
 
markwhoo markwhoo is offline
 

X-Adept
  
Join Date: Nov 2003
Posts: 799
 

Default

Quote:
Originally Posted by NuAlpha
Quote:
Originally Posted by markwhoo
So, when the catalog generation has been completed, and this mod has run to remove white spaces, the code embedded in the html pages, will it be damaged?

If you are refering to the javascript deing damaged by striping the whitespaces, then no that code won't be damaged. The javascript is accounted for and allowed to have extra whitespaces.

As for any other non-javascript code encased in {literal} tags, there is no way to prevent spaces from being striped as they are written purely as HTML once the catalog has run, not in Smarty template form.

Is this what you were refering to? Sorry if I over/under explained myself.

Excelent!

I was hoping I would be ok with the java issue without literal tags.

I thought that ALL java had to be wrapped in the literals, but I am fidning that there are a few exceptions to the rule.

So, I will proceed to your last "total Code Post" snag it, load it up and give it a try!

I really appreciate the time and efforts of your work.

If I can get it installed correctly, This should be an excellent mod and one worth using for sure.

Thanks again!
__________________
vs 4.1.12
Reply With Quote
  #42  
Old 01-05-2005, 01:42 PM
 
GM GM is offline
 

eXpert
  
Join Date: Mar 2004
Location: Canada
Posts: 293
 

Default

I've got {literal} tags flying around all over my site and no problems at all???? Yea it freaks out a bit at some of the custom html pages I made but I have never had a problem functionally.
__________________
v. 4.0.14 (GM Style)
O.S. Linux
Build Your Own Diamond Ring
Reply With Quote
  #43  
Old 01-05-2005, 04:52 PM
  Stephen Hatton's Avatar 
Stephen Hatton Stephen Hatton is offline
 

Senior Member
  
Join Date: Mar 2004
Location: Melbourne, Australia
Posts: 182
 

Default Flying

Hi All

Thanks NuAlpha, the script rocks and burns the ethernet hwy.

Your answer gave me clues on the path name - I have a host (and not my own server), so I normally don't use that path name normally.
Here is a summary of what your script did (for others to see):
It took 150seconds to clean up the files (the failed ones were 0 Byte files that are pages not completed yet)

************************************************** ****************************
************************************************** ****************************
Stripping the HTML files of excess spaces...
|||||||||||||||||||||||||||||||||||||||||||||||||| |||||||||||||||||||||||||||||||||||||||||||||||||| |||||||||||||||||||||||||||||||||||||||||||||||||| |||||||||||||||||||||||||||||||||||||||||||||||||| |||||||||||||||||||||||||||||||||||||||||||||||||| |||||||||||||||||||||||||||||||||||||||||||||||

There were 900 successful cleanings and 288 failures out of a total of 1,188 files.

Your HTML Catalog files had a total combined length of 172,069,659 characters.
They now have a total length of 162,685,621 characters.
That is a total of 9,384,038 excess white spaces removed from your files.


The following files could not be written to:
---- it then lists all the files that couldn't be cleaned ------
************************************************** ****************************
************************************************** ****************************


After removing the 0 byte files, it took a total 35 seconds to do second time.

************************************************** ****************************
************************************************** ****************************
Stripping the HTML files of excess spaces...
|||||||||||||||||||||||||||||||||||||||||||||||||| |||||||||||||||||||||||||||||||||||||||||||||||||| |||||||||||||||||||||||||||||||||||||||||||||||||| |||||||||||||||||||||||||||||||||||||||||||||||||| |||||||||||||||||||||||||

There were 900 successful cleanings and 0 failures out of a total of 900 files.

Your HTML Catalog files had a total combined length of 162,164,288 characters.
They now have a total length of 162,164,288 characters.
That is a total of 0 excess white spaces removed from your files.
************************************************** ****************************
************************************************** ****************************

The site is not finished and all the pages have not been completed (I have a lot of hidden pages). Thats why 0byte files exist.

It compares well with all the compression methods I have tried on my site
(approximately 10% or more comression), but the HTML files load a lot quicker than the direct shopping cart queries.

It is so fast, I wouldn't bother with the manual method any more (over a 1200 files!): Your program is too hot .

For everbody else: It is THE SCRIPT TO GET to clean up your HTML files.

Great Job

Regards
Ing. Stephen Hatton
__________________
Apache Linux V1.3.33
PERL version: 5.8.0
PHP version: 4.3.11
MySQL version: 4.0.22-standard
X-cart V4.0.17: Addons: X-PConfig, X-Giftreg, X-Fancycat, X-AOM
Reply With Quote
  #44  
Old 01-05-2005, 05:30 PM
 
NuAlpha NuAlpha is offline
 

X-Adept
  
Join Date: Aug 2003
Location: US
Posts: 598
 

Default

I am considering rewriting this module and releasing version 2.0. We don't use the HTML catalog but it seems that plenty of people do and could really use the features I planned on adding.

There is a fair amount of unnecessary HTML code that could be removed if you are not worried about XHTML compliance and want speed above all. The next version would also specifically state what is wrong and where and how it could possibly be improved/optimized if the script can't do so automatically.

I will have to see if I can find time. Might sell version 2.0 as a $5-10 module just to cover the costs of company time.

Give me a show of hands if anyone is really interested and I will see if the benefits of the modifications I have in mind would really make a difference or be truly useful.
__________________
X-Cart Pro 4.5.5 Platinum
X-Payments 1.0.6
PHP 5.3.14
MySQL 5.1.68
Apache 2.2.23
Reply With Quote
  #45  
Old 01-05-2005, 05:35 PM
  adpboss's Avatar 
adpboss adpboss is offline
 

X-Man
  
Join Date: Feb 2003
Location: Ontario, Canada
Posts: 2,389
 

Default

http://www.mnsi.net/~anand/hand.jpg
Reply With Quote
  #46  
Old 01-05-2005, 05:36 PM
 
Metal-X-Man Metal-X-Man is offline
 

eXpert
  
Join Date: Mar 2003
Location: Columbus, Ohio
Posts: 204
 

Default

This mod worked great for my old verision 3.5.4

Works perfectly for my 4.0.9 also! I have about 85,000 pages.
__________________
X-Cart Gold
ver. 4.1.3

http://www.musicianslibrary.com
Reply With Quote
  #47  
Old 01-05-2005, 05:38 PM
 
markwhoo markwhoo is offline
 

X-Adept
  
Join Date: Nov 2003
Posts: 799
 

Default

ROFL,

This script is a kicker!

Kudos to NuAlpha for this script
__________________
vs 4.1.12
Reply With Quote
  #48  
Old 01-05-2005, 05:40 PM
  adpboss's Avatar 
adpboss adpboss is offline
 

X-Man
  
Join Date: Feb 2003
Location: Ontario, Canada
Posts: 2,389
 

Default

YES BUT NU ALPHA PLEASE MAKE XCART PHP BETTER. XCART PHP IS SLOW.
Reply With Quote
  #49  
Old 01-05-2005, 05:41 PM
 
NuAlpha NuAlpha is offline
 

X-Adept
  
Join Date: Aug 2003
Location: US
Posts: 598
 

Default

Quote:
Originally Posted by adpboss

Not quite what I meant, but thanks!
__________________
X-Cart Pro 4.5.5 Platinum
X-Payments 1.0.6
PHP 5.3.14
MySQL 5.1.68
Apache 2.2.23
Reply With Quote
  #50  
Old 01-05-2005, 05:45 PM
 
markwhoo markwhoo is offline
 

X-Adept
  
Join Date: Nov 2003
Posts: 799
 

Default

Quote:
Originally Posted by adpboss
YES BUT NU ALPHA PLEASE MAKE XCART PHP BETTER. XCART PHP IS SLOW.

NuAlpha, You do as ADP has requested, and ahem, I think we all would agree, I promise to call it NuApha's XCart!

what ya think? Sound great!
__________________
vs 4.1.12
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 12:39 PM.

   

 
X-Cart forums © 2001-2020