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
  #21  
Old 10-10-2004, 09:40 PM
 
wallachee wallachee is offline
 

Senior Member
  
Join Date: Feb 2003
Posts: 102
 

Default

Same problem here in 3.5.10...parse error line2.....If you take take out the lines:

<?php
б═ б═ini_set('zlib.output_compression', 'Off'); // Turn off zlib compression, if On, to prevent Mozilla output problems.
?>


It gives a parse error on line 44....any ideas?
__________________
Version 4.1.9
Reply With Quote
  #22  
Old 10-12-2004, 12:25 PM
  B00MER's Avatar 
B00MER B00MER is offline
 

X-Guru
  
Join Date: Sep 2002
Location: Keller, TX (Cart-Lab.com)
Posts: 3,165
 

Default

Smarty has this built-in
Code:
$smarty->load_filter('output','trimwhitespace');
Details:
http://smarty.incutio.com/?page=SmartyTips
__________________
Cart-Lab - 100+ Social Bookmarks for X-Cart.
Reply With Quote
  #23  
Old 10-12-2004, 12:34 PM
 
NuAlpha NuAlpha is offline
 

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

Default

Quote:
Originally Posted by B00MER
Smarty has this built-in
Code:
$smarty->load_filter('output','trimwhitespace');
Details:
http://smarty.incutio.com/?page=SmartyTips

Yep, but it doesn't clear out the white spaces in the HTML catalog. It also won't remove all excess white space just multiples of the same kind. All of our templates are enclosed ing {strip} tags and our pages download as one long line of code. Remove the tags and turn on that output filter, and the code remains multi-line.

As for the problem people are having here with the code I posted, I haven't a clue what could be wrong as I verified the code in Zend Studio and everything checks out fine. The one I have is the same version and runs just fine.
__________________
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
  #24  
Old 10-12-2004, 03:20 PM
 
wallachee wallachee is offline
 

Senior Member
  
Join Date: Feb 2003
Posts: 102
 

Default

I figured it out. The problem is that when you copy the file there is a lot of white space before some lines. Take out all of that space, and the code works great. Awesome mod. It stripped 391,200 white spaces from my catalog

-Bradley
__________________
Version 4.1.9
Reply With Quote
  #25  
Old 10-12-2004, 04:14 PM
 
wallachee wallachee is offline
 

Senior Member
  
Join Date: Feb 2003
Posts: 102
 

Default

Will this mod have any affect on Google spidering (positive or negative?)

-Bradley
__________________
Version 4.1.9
Reply With Quote
  #26  
Old 10-12-2004, 04:27 PM
 
NuAlpha NuAlpha is offline
 

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

Default

Quote:
Originally Posted by wallachee
Will this mod have any affect on Google spidering (positive or negative?)

Positive in that the pages will download somewhat faster. Other than that I do not know.
__________________
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
  #27  
Old 11-11-2004, 05:31 AM
 
alpine alpine is offline
 

Member
  
Join Date: Jul 2004
Posts: 12
 

Default Compatibal with 4.0.6?

Will this work with 4.0.6?
__________________
R Nixon
X-Cart 4.0.6
PHP 4.3.8
MySQL Server 4.0.20
MySQL Client 3.23.49
Linux/Apache
Net::SSLeay 1.25
Reply With Quote
  #28  
Old 11-12-2004, 03:31 PM
 
GM GM is offline
 

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

Default

I'm gonna' try it on 4.06 (nice job!)
__________________
v. 4.0.14 (GM Style)
O.S. Linux
Build Your Own Diamond Ring
Reply With Quote
  #29  
Old 11-24-2004, 06:08 PM
 
Metal-X-Man Metal-X-Man is offline
 

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

Default

X-Cart Version 3.5.4

Mod is very sick! Worked like a clock!

Here's the data:
-----------------------------------------------------
There were 82,069 successful cleanings and 1 failures out of a total of 82,070 files.

Your HTML Catalog files had a total combined length of 2,500,312,154 characters.
They now have a total length of 2,009,804,777 characters.
That is a total of 490,507,377 excess white spaces removed from your files.

-----------------------------------------------------

Never mind the failure - it was garbage in the database. Anyone had more whitespaces removed than I have?

Metal-X
Reply With Quote
  #30  
Old 12-02-2004, 11:15 PM
 
GM GM is offline
 

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

Default

Works like a charm! Nice one!
__________________
v. 4.0.14 (GM Style)
O.S. Linux
Build Your Own Diamond Ring
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 06:14 PM.

   

 
X-Cart forums © 2001-2020