Post Reply 
Respect Enter button
05-Aug-2011, 07:59 PM
Post: #1
Lightbulb Respect Enter button
Hi, guys, problem is comments box.
When typing a text and push "enter" button on keyboard for line or paragraph break, text displayed in one line. Please help fix this problem.

Thank you.
Huh
Visit this user's website Find all posts by this user
Quote this message in a reply
05-Aug-2011, 08:26 PM
Post: #2
RE: Respect Enter button
Hi,

Have you disabled the 'Line Breaks' setting in Settings -> Processing -> Comment?

Have you completed the interview?
Find all posts by this user
Quote this message in a reply
05-Aug-2011, 08:37 PM
Post: #3
RE: Respect Enter button
check box ticked


Attached File(s) Thumbnail(s)
   
Visit this user's website Find all posts by this user
Quote this message in a reply
05-Aug-2011, 09:00 PM
Post: #4
RE: Respect Enter button
Okay, what is the web address of your page?

Have you completed the interview?
Find all posts by this user
Quote this message in a reply
05-Aug-2011, 09:11 PM
Post: #5
RE: Respect Enter button
(05-Aug-2011 09:00 PM)Steven Wrote:  Okay, what is the web address of your page?

[carclassed[.]com]
Visit this user's website Find all posts by this user
Quote this message in a reply
05-Aug-2011, 09:50 PM
Post: #6
RE: Respect Enter button
Ok I see the problem on your webpage.

For some reason there are no line breaks (<br/> or <p/>) appearing in the source code, so there's something going wrong when it processes the comment.

The first step is to check comments/includes/app/processor.php, line 311:
PHP Code:
$comment cmtx_comment_add_breaks($comment); //add line breaks (<br /> and <p />) 

Then check comments/includes/functions/processor.php, lines 1035- 1045:
PHP Code:
function cmtx_comment_add_breaks ($comment) { //add line breaks
    
    
$comment preg_replace('/(?:(?:\r\n)|\r|\n){3,}/'"<p style='margin-top: 8px; margin-bottom: 0px;'/>"$comment); //replace instances of 2 or more \r\n with just 1 <p />
    
    
$comment preg_replace('/(?:(?:\<br \/\>)|\<br \/\>){3,}/'"<p style='margin-top: 8px; margin-bottom: 0px;'/>"$comment); //replace instances of 2 or more <br />s with just 1 <p />
    
    
$comment str_ireplace("\r\n""<br />"$comment); //replace remaining line breaks with <br />s
    
    
return $comment//return breaked string
    
//end of comment-add-breaks function 

Make sure the code is the same as above.

Another thing is to try this FAQ:
http://www.commentics.org/support/knowle...article=15

Have you completed the interview?
Find all posts by this user
Quote this message in a reply
05-Aug-2011, 10:09 PM
Post: #7
RE: Respect Enter button
(05-Aug-2011 09:50 PM)Steven Wrote:  Ok I see the problem on your webpage.

For some reason there are no line breaks (<br/> or <p/>) appearing in the source code, so there's something going wrong when it processes the comment.

The first step is to check comments/includes/app/processor.php, line 311:
PHP Code:
$comment cmtx_comment_add_breaks($comment); //add line breaks (<br /> and <p />) 

Then check comments/includes/functions/processor.php, lines 1035- 1045:
PHP Code:
function cmtx_comment_add_breaks ($comment) { //add line breaks
    
    
$comment preg_replace('/(?:(?:\r\n)|\r|\n){3,}/'"<p style='margin-top: 8px; margin-bottom: 0px;'/>"$comment); //replace instances of 2 or more \r\n with just 1 <p />
    
    
$comment preg_replace('/(?:(?:\<br \/\>)|\<br \/\>){3,}/'"<p style='margin-top: 8px; margin-bottom: 0px;'/>"$comment); //replace instances of 2 or more <br />s with just 1 <p />
    
    
$comment str_ireplace("\r\n""<br />"$comment); //replace remaining line breaks with <br />s
    
    
return $comment//return breaked string
    
//end of comment-add-breaks function 

Make sure the code is the same as above.

Another thing is to try this FAQ:
http://www.commentics.org/support/knowle...article=15

reinstall commentics fro scratch but same result?!
Visit this user's website Find all posts by this user
Quote this message in a reply
05-Aug-2011, 10:26 PM
Post: #8
RE: Respect Enter button
Have you tried testing it on the example.php page which is included in the zip download?

Doing this may rule out that the problem is to do with your web page.

Have you completed the interview?
Find all posts by this user
Quote this message in a reply
05-Aug-2011, 10:34 PM
Post: #9
RE: Respect Enter button
(05-Aug-2011 10:26 PM)Steven Wrote:  Have you tried testing it on the example.php page which is included in the zip download?

Doing this may rule out that the problem is to do with your web page.

check it [http://www.carclassed[.]com/example.php]
(05-Aug-2011 10:34 PM)arthur1 Wrote:  
(05-Aug-2011 10:26 PM)Steven Wrote:  Have you tried testing it on the example.php page which is included in the zip download?

Doing this may rule out that the problem is to do with your web page.

check it [http://www.carclassed[.]com/example.php]

not problem with my page.
this is what i have in admin page under manage comments:

this is a test<p style='margin-top: 8px; margin-bottom: 0px;'/>this is a test<p style='margin-top: 8px; margin-bottom: 0px;'/>this is a test
Visit this user's website Find all posts by this user
Quote this message in a reply
05-Aug-2011, 11:43 PM
Post: #10
RE: Respect Enter button
Steven, in my contact form script using this:

$headers .= "MIME-Version: 1.0\r\n";
$headers .= "X-Priority: 3\r\n";
$headers .= "X-MSMail-Priority: Normal\r\n";
$headers .= "Content-type: text/plain; charset=\"iso-8859-1\"\r\n";
$headers .= "Date: ".date("m j")."\r\n";
$headers .= "From: ".$yourName." <$mailFrom>\r\n";
if($yourName && $mailFrom) {
$send = mail(_adminemail, _Dsubject.$subject, stripslashes($message), $headers);

and i think this is a problem, so please tell me how to define script like shown above in your script?

Thank you.
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Captcha Audio button CarlyJ 2 338 13-Dec-2011 08:35 AM
Last Post: CarlyJ

Forum Jump:


User(s) browsing this thread: 1 Guest(s)