| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
HTML Catalog Cleaner - Removes excess white space | ||||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
HTML Catalog Cleaner - Removes excess white space
This script acts like a one time {strip} tag, removing all unnecessary white spaces from your .html files generated by the HTML Catalog, thus reducing the bandwidth needed for these files.
At the moment, I don't have a .tpl interface written for it, so you have to call it from your browser. This works on your existing catalog, though I am sure you could pull out the regex code and stick it into admin/html_catalog.php if your so inclined. Here is the code. Put it in whatever directory you wish under whatever name you wish (.php extension of course)... Code:
Let me know if you find any problems!
__________________
X-Cart Pro 4.5.5 Platinum X-Payments 1.0.6 PHP 5.3.14 MySQL 5.1.68 Apache 2.2.23 |
|||||||
#2
|
|||||||||
|
|||||||||
Code:
I'm testing now! |
|||||||||
#3
|
|||||||||
|
|||||||||
The code is cleaned up although the reported initial and finished file size for the work is the same.
Pages are lightning quick. This is a SICK SICK mod. I love it. I just added it as a link under my HTML Catalog link in the menu admin. skin1/admin/menu_admin.tpl |
|||||||||
#4
|
|||||||
|
|||||||
Quote:
I had already done the once over with this mod on our catalog, when at the last second I decided to add the 'filesize difference' code before posting so I never even saw the output. I am suprised that there was no difference in filesize. I wonder why not....hmmm.
__________________
X-Cart Pro 4.5.5 Platinum X-Payments 1.0.6 PHP 5.3.14 MySQL 5.1.68 Apache 2.2.23 |
|||||||
#5
|
|||||||
|
|||||||
By the way adpboss, did you make use of those regular expressions I posted for adding {literal} tags to every space and newline in your plain text emails? I have not gotten a chance to actually test it, but I will be doing so soon as I need plain text labels to print.
Am thinking about writing a customizable mod to allow printing on sheets of Avery style labels.
__________________
X-Cart Pro 4.5.5 Platinum X-Payments 1.0.6 PHP 5.3.14 MySQL 5.1.68 Apache 2.2.23 |
|||||||
#6
|
|||||||||
|
|||||||||
Found a bug, it kills this javascript that I have in my product pages that pops up a new window for detailed images.
So I can't use it as-is, but hopefully I'll find time to play with this and get it to work. Is there a way to PREVENT areas of code from being touched? Code:
|
|||||||||
#7
|
|||||||
|
|||||||
Hmmm...I will have to think about this one. Forgot about the javascript.
__________________
X-Cart Pro 4.5.5 Platinum X-Payments 1.0.6 PHP 5.3.14 MySQL 5.1.68 Apache 2.2.23 |
|||||||
#8
|
|||||||
|
|||||||
Here is the revised version. This should take care of the javascript problem.
Code:
__________________
X-Cart Pro 4.5.5 Platinum X-Payments 1.0.6 PHP 5.3.14 MySQL 5.1.68 Apache 2.2.23 |
|||||||
#9
|
|||||||||
|
|||||||||
Script still kills Javascript and hangs.
I ran it four times tonight and everytime it ran for more than 15 minutes when eventually I had to stop it. |
|||||||||
#10
|
|||||||
|
|||||||
I am going to be redoing our HTML catalog soon. I will have to work on it then.
Not sure what is wrong though.
__________________
X-Cart Pro 4.5.5 Platinum X-Payments 1.0.6 PHP 5.3.14 MySQL 5.1.68 Apache 2.2.23 |
|||||||
|
|||
X-Cart forums © 2001-2020
|