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
  #31  
Old 12-05-2004, 11:13 AM
  adpboss's Avatar 
adpboss adpboss is offline
 

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

Default

GM,

Could you post your 4.0 code for us please?
Reply With Quote
  #32  
Old 12-31-2004, 02:19 PM
 
markwhoo markwhoo is offline
 

X-Adept
  
Join Date: Nov 2003
Posts: 799
 

Default

Quote:
Originally Posted by GM
I'm gonna' try it on 4.06 (nice job!)

So tell me, I see your on vs 4.0.9 now. What did you do to the code to make it work for this version?

Will ADP's last post with all of the corrections made do the trick, or is there more to it than that?

Thanks in advance for the help.
__________________
vs 4.1.12
Reply With Quote
  #33  
Old 01-01-2005, 09:50 AM
 
GM GM is offline
 

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

Default

I never changed the original code (NuAlpha revised version) XCart v4.09 and my sight is smokin' ! I'm on a shared server too.But I also applied Boomers Smarty Mod for the flipover.
This is the mod of the year man!

Well.... that's not all... I trimmed out the tags in home.tpl, trashed fancy cats, optimized my graphics, souped up the head.tpl...etc. (Nice Holley four barrel pumper...)
__________________
v. 4.0.14 (GM Style)
O.S. Linux
Build Your Own Diamond Ring
Reply With Quote
  #34  
Old 01-01-2005, 10:44 AM
 
NuAlpha NuAlpha is offline
 

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

Default

And to think, shortly after writing this mod we decided using the HTML catalog was not feasible because of the number of product pages we have. Had to write some complex PHP and MySQL code distributed throughout Xcart to tie in precisely with mod_rewrite code. It all worked so well (after many migraine related bug fixes) our HTML catalog has since been deleted.

The only time this code became a server drain was when the Pompos/dir.com search engine bot brutalized our site, sucking more pages per minute than MSN, Google, Google-Media, Froogle, Yahoo, Teoma, etc. combined. They have since been banned.
__________________
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
  #35  
Old 01-01-2005, 06:55 PM
 
markwhoo markwhoo is offline
 

X-Adept
  
Join Date: Nov 2003
Posts: 799
 

Default

Quote:
Originally Posted by GM
I never changed the original code (NuAlpha revised version) XCart v4.09 and my sight is smokin' ! I'm on a shared server too.But I also applied Boomers Smarty Mod for the flipover.
This is the mod of the year man!

Well.... that's not all... I trimmed out the tags in home.tpl, trashed fancy cats, optimized my graphics, souped up the head.tpl...etc. (Nice Holley four barrel pumper...)

In my cart, I have a few scripts that did not work with the literal tags, so I removed them and they worked. I noticed ADP had a complaint about the script issues up front and then there was a bit of tweaking going on, but if I remember, in the thread I thought I saw a mention of the use of literal tags to keep it working.

With my inability to add the literal tags on the few scripts that didn't work until they were removed, will this Mod work for me without damage to the scripts?

Thanks for the input, I appreciate it.
__________________
vs 4.1.12
Reply With Quote
  #36  
Old 01-01-2005, 11:29 PM
  Stephen Hatton's Avatar 
Stephen Hatton Stephen Hatton is offline
 

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

Default Path Issues in php script

Hi NuAlpha

Thanks for the post - it looks good. I'm having problems with setting the absolute path in the Defining Constants.

My site has the following structure to the catalog:
http://www.eotr.com/Light4Life/catalog

I have created the .php file and put it into the directory, but it keeps complaining about the "is not a directory! Please check the path and try again." for all the path methods I have used so far.

Do we need to set special permissions for the php script and the html files?

I have 1200 files with average size of 200Kbytes each. It would be interesting to see what it does to them

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
  #37  
Old 01-02-2005, 05:10 PM
 
NuAlpha NuAlpha is offline
 

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

Default Re: Path Issues in php script

Quote:
Originally Posted by Stephen Hatton
My site has the following structure to the catalog:
http://www.eotr.com/Light4Life/catalog

You have to enter the absolute file path from root. For instance, most setups would look like-> "/home/user-dir-name/public_html/Light4Life/catalog"

Don't include your domain name or http:// with that directory path. Your absolute file path should start with forward slash, which is root-> "/"

Quote:
Originally Posted by Stephen Hatton
Do we need to set special permissions for the php script and the html files?

Permissions for the catalog directory should be chmod 777.
__________________
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
  #38  
Old 01-02-2005, 05:13 PM
 
NuAlpha NuAlpha is offline
 

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

Default

Quote:
Originally Posted by markwhoo
With my inability to add the literal tags on the few scripts that didn't work until they were removed, will this Mod work for me without damage to the scripts?

The mod I posted is only supposed to be used on the HTML catalog that you generate through Xcart.
__________________
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
  #39  
Old 01-02-2005, 06:05 PM
 
markwhoo markwhoo is offline
 

X-Adept
  
Join Date: Nov 2003
Posts: 799
 

Default

Quote:
Originally Posted by NuAlpha
Quote:
Originally Posted by markwhoo
With my inability to add the literal tags on the few scripts that didn't work until they were removed, will this Mod work for me without damage to the scripts?

The mod I posted is only supposed to be used on the HTML catalog that you generate through Xcart.

Yes I understand that, yet the javascripts I am refering to are based in the customer home.tpl, where this is used to generate those HTML cat pages.

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?

Thanks for the reply
__________________
vs 4.1.12
Reply With Quote
  #40  
Old 01-02-2005, 09:16 PM
 
NuAlpha NuAlpha is offline
 

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

Default

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 being 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.
__________________
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
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 01:46 PM.

   

 
X-Cart forums © 2001-2020