coppermine-gallery.com/forum

Support => Older/other versions => cpg1.2 Standalone Support => Topic started by: boii on October 15, 2003, 04:57:11 PM

Title: Lost name when editing comments.
Post by: boii on October 15, 2003, 04:57:11 PM
i dont know if this is theme related (hardwired), but i've upgraded to 1.2 and when i edit a comment already made, it erases the name field. i assume the addition to be able to edit your name now sends an empty result to the db since thers no where to fill in/edit your name..

all edited comments' msg_author ended up as blank fields in the db.

cheers.
ken
Title: Lost name when editing comments.
Post by: Tarique Sani on October 15, 2003, 05:02:46 PM
Can you please try this with the default theme and confirm that this happens - Hardwired was edited once in the last days of RC1

In case you don't want your users to see the default theme you can change the theme just for yourself by adding

?theme=default to the URL of your gallery
Title: Lost name when editing comments.
Post by: boii on October 15, 2003, 05:37:01 PM
it happens in default too.

when you edit a comment, theres no field to edit your name, yet the name field is still sent in the UPDATE query i imagine. so it sets it to nothing.

cheers.
ken
Title: Lost name when editing comments.
Post by: Tarique Sani on October 15, 2003, 05:50:49 PM
Can someone confirm this from the RC2 install - I did a check on the the CVS and cannot replicate this...
Title: Lost name when editing comments.
Post by: jasendorf on October 15, 2003, 05:58:44 PM
I just did an upgrade from 1.1.0 to 1.2.0RC2 (not the CVS but from the actual downloaded RC2 install package) and it works fine in default and hardwired.  Must be a browser specific javascript issue.  I'm using IE6 on WinXP.
Title: Lost name when editing comments.
Post by: boii on October 15, 2003, 06:02:08 PM
ie6 on win2k.

my db_input.php has the right UPDATE msg_author='$msg_author', so im assuming its not being posted from displayimage.php properly.

hmm.
Title: Lost name when editing comments.
Post by: Tarique Sani on October 15, 2003, 06:04:54 PM
Can you post a URL
Title: Lost name when editing comments.
Post by: Rodinou on October 15, 2003, 06:53:48 PM
I have tried with Hardwired, XP, IE 6 SP1

Any problem.
Title: Lost name when editing comments.
Post by: jasendorf on October 15, 2003, 07:26:20 PM
Quote from: "Rodinou"Any problem.
Not sure what "any" problem means.  Does that mean there IS or IS NOT a problem?
Title: Lost name when editing comments.
Post by: Rodinou on October 15, 2003, 09:01:35 PM
Euh ... any problem = NO problem :)
Title: Lost name when editing comments.
Post by: boii on October 16, 2003, 02:26:02 AM
i tried re-uploading, displayimage.php and the hardwired theme.
but it still doesn't work.
tarique, ill pm you my url as i dont want my gallery to be public :D

cheers.
ken
Title: Lost name when editing comments.
Post by: Rodinou on October 16, 2003, 02:27:50 AM
Quote from: "boii"i tried re-uploading, displayimage.php and the hardwired theme.
but it still doesn't work.
tarique, ill pm you my url as i dont want my gallery to be public :D

cheers.
ken

Not cool : it's very important to see our galleries, to progress together :(
Title: Lost name when editing comments.
Post by: boii on October 16, 2003, 02:31:50 AM
Quote from: "Rodinou"Not cool : it's very important to see our galleries, to progress together :(

are you kidding me.

cheers.
ken
Title: Lost name when editing comments.
Post by: Rodinou on October 16, 2003, 02:46:40 AM
No, but the project is "open source" : so you want answers, the minimum is to show us your gallery : no ?
Title: Lost name when editing comments.
Post by: jasendorf on October 16, 2003, 03:51:59 AM
Quote from: "boii"are you kidding me.

Rod means well...  :roll:
Title: Lost name when editing comments.
Post by: boii on October 16, 2003, 03:54:32 AM
im sure  :) open soruce is one thing, ive shared code and mods with the board, i just dont think i need to share my personal life and pictures with it too  :P

anyhow, the other thread i created 'number of views under pictures' was 'moved', but i cant find what forum it was moved to.. anyone know ? id love a solution to that..

cheers.
ken
Title: Lost name when editing comments.
Post by: Tarique Sani on October 16, 2003, 04:02:12 AM
OK this is a bug. Name editing is messed up when smilies are disabled.

Someone please confirm...
Title: Lost name when editing comments.
Post by: boii on October 16, 2003, 04:35:02 AM
heres the fix for the bug:

in your theme.php:

find:
<!-- BEGIN edit_box_no_smilies -->

then under:
<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}">


add:
<tr>
         <td>
         <input type=text name=msg_author value={MSG_AUTHOR} class="textinput" size=10>
         </td>
</tr>


and now you can edt names when smilies are disabled. and it wont send a blank msg_author.

cheers.
ken

edit: obviously this only fixes the themes in which you edit the respective theme.php .. so if in th efuture you add the mod to select language/theme, it wont work unless youve corrected all the theme.php's. oh and ive only done the above for hardwired and never looked at another theme's theme.php file, if they have a different structure.. then make the approporate chnage by lookign above that codeblock no comment editing with enabled smilies and see how its done.
Title: Lost name when editing comments.
Post by: jasendorf on October 16, 2003, 05:17:24 AM
It's a little more involved than that...

gotta fix up the row tags...

Actual fix should be something like:


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


To close the previous row tag (above the text marked as "after") and start the subsequent row tag.
Title: Lost name when editing comments.
Post by: lasa on October 19, 2003, 06:05:37 PM
No, the actual fix should be something like this :P :
                                               <input type="hidden" name="msg_author" value="{MSG_AUTHOR}">


Laurens.
Title: Lost name when editing comments.
Post by: Tarique Sani on October 20, 2003, 04:35:47 AM
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
Title: Lost name when editing comments.
Post by: jdbaranger on October 27, 2003, 03:11:56 PM
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 ?
Title: Lost name when editing comments.
Post by: jdbaranger on October 27, 2003, 03:17:56 PM
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
Title: Lost name when editing comments.
Post by: jdbaranger on November 09, 2003, 01:48:15 PM
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
Title: Lost name when editing comments.
Post by: jdbaranger on November 09, 2003, 02:19:10 PM
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>
Title: Lost name when editing comments.
Post by: Tarique Sani on November 09, 2003, 04:43:54 PM
:lol: I fixed this yesterday OR day before in CVS
Title: Lost name when editing comments.
Post by: jdbaranger on November 09, 2003, 07:21:29 PM
what is CVS  :?:

Jean-Denis
Title: Lost name when editing comments.
Post by: Joachim Müller on November 09, 2003, 07:51:07 PM
CVS = Concurrent Versions System (http://www.cvshome.org/). 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
Title: Lost name when editing comments.
Post by: jdbaranger on November 10, 2003, 08:37:20 AM
Great ! Next time i'll go to see in CVS before searching...

Thanks!

Jean-Denis
Title: Re: Lost name when editing comments.
Post by: korn on May 01, 2004, 08:52:31 AM
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?
Title: Re: Lost name when editing comments.
Post by: Casper on May 01, 2004, 03:06:17 PM
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 -->
Title: Re: Lost name when editing comments.
Post by: Casper on May 01, 2004, 04:20:58 PM
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 -->
Title: Re: Lost name when editing comments.
Post by: korn on May 02, 2004, 11:07:46 AM
Thanks  :)