Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Double Line Breaks <br> in Text Area

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 01-27-2004, 09:37 AM
 
zacsmith zacsmith is offline
 

Member
  
Join Date: Sep 2003
Location: Atlanta, GA USA
Posts: 11
 

Default Double Line Breaks <br> in Text Area

I'm loading up my site with content and have been working on the Category Description text areas.

When I try to put in some HTML text, all line breaks are doubled, that is, regardless of whether I use a </p> or
at the end of the line, a new
is put in at the beginning of the next line. The effect is all lines are double-spaced.

Other HTML tags, such as [i] and table commands work just fine.

I've searched the forums and can't find anything addressing this issue. Any thoughts or advice?

Thanks!

Gary
__________________
Gary Smith, Wells-Smith Partners
Publishers of: Your Employee Handbook; www.youremployeehandbook.com

X-Cart 3.4.8; PHP 4.34; MySQL 4.0.15; Apache 1.3.28 Linux
Reply With Quote
  #2  
Old 01-28-2004, 06:27 AM
 
zacsmith zacsmith is offline
 

Member
  
Join Date: Sep 2003
Location: Atlanta, GA USA
Posts: 11
 

Default

OK, I've found some references in the forum in which files such as product_modify.php supposedly have a function that replaces "\n" with "
", so I looked through all the files pertaining to categories I could find to see if something similar was happening.

No joy, yet. I am not finding the function (not that I really know what I am looking for...just looking for
commands within the code).

I'd really like to see if X-Cart can sell my products any better than the SHTML/Paypal hacks I currently have, but I am beginning to have doubts because of things like this.

Anyone have ideas ... anyone?

gary
__________________
Gary Smith, Wells-Smith Partners
Publishers of: Your Employee Handbook; www.youremployeehandbook.com

X-Cart 3.4.8; PHP 4.34; MySQL 4.0.15; Apache 1.3.28 Linux
Reply With Quote
  #3  
Old 01-28-2004, 08:15 AM
  shan's Avatar 
shan shan is offline
 

X-Guru
  
Join Date: Sep 2002
Location: Birmingham, UK
Posts: 6,163
 

Default

visit http://smarty.php.net and search for regex or replace.

Youll see how its done there
__________________
Looking for a reliable X-cart host ?
You wont go wrong with either of these.

EWD Hosting
Hands On Hosting
Reply With Quote
  #4  
Old 01-28-2004, 08:36 AM
 
zacsmith zacsmith is offline
 

Member
  
Join Date: Sep 2003
Location: Atlanta, GA USA
Posts: 11
 

Default

Thanks, I'm off to see the wizard of Smarty!
__________________
Gary Smith, Wells-Smith Partners
Publishers of: Your Employee Handbook; www.youremployeehandbook.com

X-Cart 3.4.8; PHP 4.34; MySQL 4.0.15; Apache 1.3.28 Linux
Reply With Quote
  #5  
Old 01-28-2004, 09:16 AM
 
zacsmith zacsmith is offline
 

Member
  
Join Date: Sep 2003
Location: Atlanta, GA USA
Posts: 11
 

Default

Just got back from smarty.php.net and found a regex_replace in the subcategories.tpl file. Took out the
that was to be put in at each new line and it worked like a charm.

Thanks very much!

Plus, the Smarty site is fascinating. I can see I'm going to spend a lot of time there!

gary
__________________
Gary Smith, Wells-Smith Partners
Publishers of: Your Employee Handbook; www.youremployeehandbook.com

X-Cart 3.4.8; PHP 4.34; MySQL 4.0.15; Apache 1.3.28 Linux
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



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 10:19 PM.

   

 
X-Cart forums © 2001-2020