Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Carriage Return on Review


sw0857

Recommended Posts

Posted

is it possible to add carriage return into review edit without implementing HTML/WYSIWYG editor? I'd like to have customers able to change to new lines when they write long review paragraphs. Anyone has done this please let me know.

 

Thanks in advance.

Posted
is it possible to add carriage return into review edit without implementing HTML/WYSIWYG editor? I'd like to have customers able to change to new lines when they write long review paragraphs. Anyone has done this please let me know.

 

there's a php function called nl2br() that you can use on the posted data before inserting it into the database. it might be just what you need.

 

http://us.php.net/manual/en/function.nl2br.php

Posted

Thanks Dave but that doesn't work as I tried. Is there any mod perhaps I could insert into product_review_write.php to do the job? Thanks again.

Posted

Never mind.. Dave. I got it!! I have the code listed below in case anyone needs it. :)

<td valign="top" class="main"><?php echo tep_break_string(nl2br(tep_output_string_protected($reviews['reviews_text'])), 60, '-<br>') . ((strlen($reviews['reviews_text']) >= 99999) ? '..' : '') . '<br>'; ?></td>

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...