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:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> Let me know if you find any problems! :) |
Code:
# Initialize variables. I'm testing now! :-) |
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 |
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. :lol: I am suprised that there was no difference in filesize. :? I wonder why not....hmmm. :?: |
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. |
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:
{literal} |
Hmmm...I will have to think about this one. Forgot about the javascript. :(
|
Here is the revised version. This should take care of the javascript problem. :)
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
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. :( |
I am going to be redoing our HTML catalog soon. I will have to work on it then. :?
Not sure what is wrong though. |
All times are GMT -8. The time now is 07:11 PM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.