PDA

View Full Version : Double line breaks


Shanthony
06-21-2006, 09:21 PM
Whenever a commenter pushes enter in their comment it shows up as two <br> which is this really huge space. I would like the space to be smaller and only show up as one <br> in the comment section. Does anyone have this problem. is this a problem with the code or my css?

This is my url

http://www.informedrevolution.com/themagazine/index.php?showimage=10

An example of the huge break is alex's comment. Help me!

indira
06-26-2006, 04:19 PM
Hi!
I'm having the same problem.
using version 1.5 it adds two line breaks everytime a commenter hits ENTER. I checked the index page but cannot find what I should change.
thanks for any help!
Indira

inocuo
07-03-2006, 02:47 PM
Finally i was able to fix it!

What i did is to change 2 lines of the index.php:


// $message $message = clean(nl2br($_POST['message']));
$message = isset($_POST['message']) ? $_POST['message'] : "";
$message = clean_comment($message);
$message = nl2br($message);

change last line for: $message = clean($message);


// $message
$message = isset($_POST['message']) ? $_POST['message'] : "";
$message = clean_comment($message);
$message = nl2br($message);

change last line for: $message = clean($message);

I don't know why. I found it trying (i'm not an expert)... but i think it's working. I'm using it at the moment and i haven't had any problem.
Luck!!

GeoS
07-05-2006, 11:10 PM
About which versions of PP did you all talk??

washy21
07-06-2006, 09:14 AM
Just to let you know that this solution has now worked for me.

PP 1.5

vxt
08-07-2006, 03:26 AM
Just solved mine too. Thanks for sharing!

mauritz
09-02-2006, 07:08 PM
Thanks! You can all just do this, it really works! Even if you type six enters in a row, there's just one white line!

heatheranne
09-03-2006, 12:49 AM
This didn't work for me. I'm running PP 1.5. Any other suggestions?

EDIT: Never mind. I think it's working now. It just wasn't correcting old comments, but it seems to work on new ones.

RAitch
09-03-2006, 03:36 AM
Clear the cache?? I think all comments should format the same after this change.
Just a guess.

inocuo
04-12-2007, 02:24 PM
Anyone knows how to fix it for 1.6 version?

I tryed to do the same as i did with the other versions but seems it doesn't work...

I have done that:

/includes/functions_comments.php (line 74)

// $message
$message = isset($_POST['message']) ? $_POST['message'] : "";
$message = clean_comment($message);
$message = preg_replace("/((\x0D\x0A){3,}|[\x0A]{3,}|[\x0D]{3,})/","\n\n",$message);
$message = nl2br($message);

I have changed the last line to: $message = clean($message);

inocuo
04-12-2007, 02:50 PM
Finally i've done it!

Go to includes/function.php:

LINE 116:
$image_comments .= "<li class=\"admin_comment\">$comment_message<br />$comment_name @ $comment_datetime</li>";

Write:

$image_comments .= "<li class=\"admin_comment\">".nl2br($comment_message)."<br />$comment_name @ $comment_datetime</li>";

LINE 118:
$image_comments .= "<li>$comment_message<br />$comment_name @ $comment_datetime</li>";

Write:

$image_comments .= "<li>".nl2br($comment_message)."<br />$comment_name @ $comment_datetime</li>";

Now i will look for doing the same with the text of each post...

Dennis
04-12-2007, 05:10 PM
what version are you using?

Trauko
04-12-2007, 05:52 PM
What is your version of PP?

My PP 1.6 beta show double new lines. Today I Upgrade to PP1.6 final and the problem is fixed.

El Trauko (http://trauko.org/fotoblog)

Dennis
04-12-2007, 06:10 PM
Trauko, sometimes we do good things :D

inocuo
04-12-2007, 06:50 PM
i have updated today to 1.6 version. I had problems with "image_notes" and with "image_comments" because all is shown in the same line without break lines. I tried to fix it doing the same as in the last version 1.5 but all is different ;)

Now i have fixed the last one as i posted before... But i'm looking for being able to show line breaks in "image_notes".

If you go to any of my posts, you will see that the "image_notes" are in the same line without line breaks: www.fotoxic.org (in the last image, where is written "flickr links" must appear in a new paragraph).

Edit: I have just realized that in my feeds all is shown correctly, but not in my comments page...

And sorry, i thing this thing should has a new topic...

Trauko
04-16-2007, 12:40 PM
Trauko, sometimes we do good things :D

Really I think you have done a beautiful program, compact and well structured.
I don't understand PHP neither HTML, but I can read and understand the code, I can make modifications, and my first template.

The good things are beautiful,
The beautiful things are simple.
PixelPost is it.

Have a nice day, be happy. :)