Hi There,
I just downloaded Coppermine, and I'm enjoying a lot. But, at the very first contact, I noticed that I can't write multiline comments in the pictures...
So, I searched the forum, and found a topic with a guy asking this same question.
The comment field originally is single line, but when you edit the comment, it becames "multi lined".
If you edit your comment and type a new "multi lined" comment, the comment is inserted normally in the database, with the correct line breaks, although, the comment is displayed as a single line.
So, as I didn't found any solution for this, I made myself this modification,
Now, the comment field is always multiline (<textarea>) for adding / editing and the comment is displayed as they really are (with the line breaks...)
Files to edit:
displayimage.php
/themes/<YOUR THEME>/theme.php
1) Open file displayimage.php
1.1) Find:
'{MSG_BODY}' => &$comment_body,
1.2) Replace with:
'{MSG_BODY}' => nl2br(&$comment_body),
1.3) Find:
'{MSG_BODY_RAW}' => $row['msg_body'],
1.4) Replace with:
'{MSG_BODY_RAW}' => str_replace("<br />","\n",$row['msg_body']),
2) Open file /themes/<YOUR THEME>/theme.php
2.1) Find:
<input type="text" class="textinput" id="message" name="msg_body" onselect="storeCaret_post(this);" onclick="storeCaret_post(this);" onkeyup="storeCaret_post(this);" maxlength="{MAX_COM_LENGTH}" style="width: 100%;" />
2.2) Replace with:
<textarea class="textinput" id="message" name="msg_body" onselect="storeCaret_post(this);" onclick="storeCaret_post(this);" onkeyup="storeCaret_post(this);" maxlength="{MAX_COM_LENGTH}" style="width: 100%;" rows="2"></textarea>
Notice: If you use / allow your users to use more than one theme, so you have to do step 2) for each theme!...
Hope you enjoy and find this useful, as it was for me.
Comments and improvements are welcome!
PS: Sorry for my bad english!!