Lost name when editing comments. - Page 2 Lost name when editing comments. - Page 2
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

Lost name when editing comments.

Started by boii, October 15, 2003, 04:57:11 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

Tarique Sani

Quote from: "lasa"No, the actual fix should be something like this :P

NO! the name has to be editable by the admin. - thus the previous post is right

@ lasa now you are on the very fringe of being banned using the sticking tongue out emoticon is considered rude
SANIsoft PHP applications for E Biz

jdbaranger

OK, but if the name is longer than 10 characters, it doesn't work.

I tried to change

<input type=text name=msg_author value={MSG_AUTHOR} class="textinput" size=10>

with

<input type=text name=msg_author value={MSG_AUTHOR} class="textinput" size=25>
but it's the same :

Editing Jean-Denis Baranger's comment changes Jean-Denis Baranger to Jean-Denis.

Any idea ?
Jean-Denis

jdbaranger

In fact, the problem appears when there's a space in the username. Exemples here :
http://www.photo-parade.com/galeries/thumbnails.php?album=lastup&cat=10002
Jean-Denis

jdbaranger

If i replace

<input type=text name=msg_author value={MSG_AUTHOR} class="textinput" size=25>

by

<textarea cols="25" rows="1" class="textinput" name="msg_author" onselect="storeCaret_f{MSG_AUTHOR}(this);" onclick="storeCaret_f{MSG_AUTHOR}(this);" onkeyup="storeCaret_f{MSG_AUTHOR}(this);" style="width: 100%;">{MSG_AUTHOR}</textarea>

The problem corrects, but i still don't understand why spaces disappear with original code.
The result is not very great with this second code, but it seems that nobody as other solution.

Jean-Denis
Jean-Denis

jdbaranger

In fact, the solution was so simple :

Just replace

<input type=text name=msg_author value={MSG_AUTHOR} class="textinput" size=25>
with

<input type=text name=msg_author value="{MSG_AUTHOR}" class="textinput" size=25>
Jean-Denis

Tarique Sani

:lol: I fixed this yesterday OR day before in CVS
SANIsoft PHP applications for E Biz

jdbaranger

Jean-Denis

Joachim Müller

CVS = Concurrent Versions System. It's an app that let's different devs work on the same code base, managing the changes each dev applies.
We chose sourceforge.net to host coppermine on basically because they offer cvs.
Devs can access it in read/write mode, non-devs can access it in read-only mode: http://cvs.sourceforge.net/viewcvs.py/coppermine/

GauGau

jdbaranger

Great ! Next time i'll go to see in CVS before searching...

Thanks!

Jean-Denis
Jean-Denis

korn

I have the same problem (user name disappears, when editing comment, version 1.2.1) using theme FRUITY with smilies enabled. When smilies are disabled everything works fine. Can someone help?

Casper

Update your theme.php to the latest one (1.2.1)  This was changed some time ago.
If you have too many customised bits to do that, post here your code in the section ;

Quote<!-- BEGIN edit_box_smilies -->
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

Casper

On 2nd look, it seems this was missed during the update.

Open your themes/fruity/theme.php, and find this code;
<!-- BEGIN edit_box_smilies -->
                               <table width="100%" cellpadding="0" cellspacing="0">
                                       <tr>
                                               <form name="f{MSG_ID}" method="POST" action="db_input.php">
                                               <input type="hidden" name="event" value="comment_update">
                                               <input type="hidden" name="msg_id" value="{MSG_ID}">
                                               <td width="100%">
                                                       <textarea cols="40" rows="2" class="textinput" name="msg_body" onselect="storeCaret_f{MSG_ID}(this);" onclick="storeCaret_f{MSG_ID}(this);" onkeyup="storeCaret_f{MSG_ID}(this);" style="width: 100%;">{MSG_BODY_RAW}</textarea>
                                               </td>
                                               <td class="tableb_compact">
                                               </td>
                                               <td>
                                                       <input type="submit" class="comment_button" name="submit" value="{OK}">
                                               </td>
                                               </form>
                                       </tr>
                                       <tr>
                                               <td colspan="3"><img src="images/spacer.gif" width="1" height="2" alt="" /><br /></td>
                                       </tr>
                               </table>
                               {SMILIES}
<!-- END edit_box_smilies -->


replace it with;

<!-- BEGIN edit_box_smilies -->
                               <table width="100%" cellpadding="0" cellspacing="0">
                                       <tr>
                                               <form name="f{MSG_ID}" method="POST" action="db_input.php">
                                               <input type="hidden" name="event" value="comment_update">
                                               <input type="hidden" name="msg_id" value="{MSG_ID}">
<td>
                                               <input type=text name=msg_author value={MSG_AUTHOR} class="textinput" size=25>
                                               </td>
                                               <td width="100%">
                                                       <textarea cols="40" rows="2" class="textinput" name="msg_body" onselect="storeCaret_f{MSG_ID}(this);" onclick="storeCaret_f{MSG_ID}(this);" onkeyup="storeCaret_f{MSG_ID}(this);" style="width: 100%;">{MSG_BODY_RAW}</textarea>
                                               </td>
                                               <td class="tableb_compact">
                                               </td>
                                               <td>
                                                       <input type="submit" class="comment_button" name="submit" value="{OK}">
                                               </td>
                                               </form>
                                       </tr>
                                       <tr>
                                               <td colspan="3"><img src="images/spacer.gif" width="1" height="2" alt="" /><br /></td>
                                       </tr>
                               </table>
                               {SMILIES}
<!-- END edit_box_smilies -->
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

korn