![]() |
xcell67, it looks as if spaces are literally being replaced by the regular expression itself! 8O
If you are using PHP, please post the exact preg_replace() code that you are using including the regular expression and replacement in that code. If you are using EditPad, select the regular expressions option in the search box and use the regex ([ ]{2,}|[\n\r\f\t]+) with the replace {literal}\1{/literal} |
I tried using dreamweaver to do it manually, I put {literal}, pressed enter twice to insert a blank line then ended it with {/literal}
I also tried your method with Editpad but still no luck =( One thing that did manage to work for me was putting <PRE> and ending with </PRE>. That allows the blank lines between text but I don't think its too customer friendly to have those tags in the mails. Can all you lucky people who have managed to get this to work post a sample tpl from your mail folder. Thanks. |
works well for me in 4.0.1 :lol:
|
You *must* place this call after $mail_smarty is instantiated - then it WILL NOT PARSE THE MAILS. :)
Here is my placement and all will be well! # # Smarty object for processing mail templates # $mail_smarty = $smarty; $smarty->load_filter("output","trimwhitespace"); # # WARNING : # Please ensure that you have no whitespaces / empty lines below this message. # Adding a whitespace or an empty line below this line will cause a PHP error. # ?> |
WHOOOOOO! I finally got my mail tpls to work with your solution kind sir.
Thank you and thank you to NuAlpha for helping me with his solution. This is a sweet mod. |
Quote:
That's great - glad to know I could help out! I wish I was monitoring this thread actively - I am now...hopefully it wasn't too late! --al ponte |
Works in 4.0.2, thank you. :)
|
Under PHP 4.3.10, I have found that unless I remove the line $smarty->load_filter('output','trimwhitespace'); from smarty.php then the entire Xcart load process will abort suddenly for some unknown reason.
Has anyone else experienced this? |
This is a great MOD but any HTML invoices received by customers were blank.
Quote:
I tried adding $smarty->load_filter('output','trimwhitespace'); and it caused problems with images on the website. As a result I removed the mod for now until I can find a solution. Anyone have any ideas? |
Sweet
Thanks
|
All times are GMT -8. The time now is 02:49 PM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.