sw0857 Posted October 14, 2008 Posted October 14, 2008 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.
arietis Posted October 14, 2008 Posted October 14, 2008 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
sw0857 Posted October 14, 2008 Author Posted October 14, 2008 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.
sw0857 Posted October 14, 2008 Author Posted October 14, 2008 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>
Recommended Posts
Archived
This topic is now archived and is closed to further replies.