It would be very nice to allow the authorized users (e.g. moderators) to edit guestbook entries in addition to commenting them.

Comments

hba’s picture

Assigned: Unassigned » hba

I really consider this a feature, as I don't want admins to be able to pose as users. That's why I have the delete button for admins (to get rid of spam etc.), but not the edit button. Did that sound sane?

lucky a’s picture

It's just that sometimes admins would want to white out a couple of words (e.g. obscenities) instead of deleting the whole post. I guess a good compromise would be additing a toggle in settings to allow/prohibit moderators to edit posts.

An even better solution imho (but probably much harder to implement) would be forcing the edited text to appear italic, or even restricting input characters for editing to a single "star" or something. The idea, of course, is that moderators have the flexibility to "white out", but still cannot pose as someone else.

jdsaward’s picture

I agree an edit facility for administrators would be nice. I'm just now trying out the module, and copying in a set of entries from a pre-Drupal guestbook, and find I need to edit some of the entries as they come in - for example changing the created by date that the module records, to be the same as the originally recorded date in the old guestbook. Of course I can do this be directly editing the database, but it is tiresome.

And I am sure the site owner will eventually contact me asking me how they can alter text - perhaps an embarressing typing mistake that the guset (sorry.. guest. :-)) has emailed them about. I think all sorts of situations might arise where edit is easier than delate and re-create.

Very nice module though.

John

pieterdc’s picture

I wanted this functionality myself. And I kinda managed to code it.
It's functional, but it's not complete (yet).

Which means you can edit the message but you can't edit the submission date (yet)...
I based the edit-link on the delete-link. And I based the edit-form on the "add"-form. And so on.

If someone wants the adjusted piece of code, you may contact me.
If I knew how to produce a patch file, I would have attached it here...

moshe weitzman’s picture

site admins can already edit nodes and comments without any restrictions. guestbooks don't deserve this special protection. i agree that they should be able to edit guestbook entries.

nels’s picture

+1.
I think there are legitimate reasons for being able to edit the guestbook entries.

For instance, I was using the forum on the site as a guestbook, but switched to guestbook. I don't want to loose what (few) entries I had, but if I enter them manually, it looks like everyone visited in a 20 minute block of time some Tuesday.

xl-network’s picture

Editing guestbook entries is a big plus... why don't use regual nodes (with CCK for instance, for the use of extra fields)?

pieterdc’s picture

Status: Active » Needs review
StatusFileSize
new6.89 KB

This is my first patch ever.
Some commenting is in Dutch, next time I'll write it in English.
The main parts are:
An extra op-option in guestbook_page() and two extra fuctions: guestbook_edit_entry_form() and guestbook_edit_entry_form_submit().

Chuck1’s picture

StatusFileSize
new4.97 KB

I also love the patch but I have trouble with drupal 5.3, PHP5 in CGI mode.
I receive the following webserver failure: Premature end of script headers: php5 .....

So I have make a little modifaction in the patch and it works now ;) .

        case "edit": //zelf toegevoegd
-          return guestbook_edit_entry_form($uid, $op_id);
+         return guestbook_edit_entry($uid, $op_id);

+function guestbook_edit_entry($uid, $entry_id) {
+  $output = drupal_get_form('guestbook_edit_entry_form', $uid, $entry_id);
+  return $output;
+}
sun’s picture

Title: Editing guestbook entries. » Allow editing of guestbook entries by guestbook owner and admins
Version: 4.7.x-1.x-dev » 6.x-2.x-dev
Assigned: hba » Unassigned
sun’s picture

Status: Needs review » Needs work

Both patches are unusable! They not only contain non-English comments, but also changes that have nothing to do with this issue.

sun’s picture

Version: 6.x-2.x-dev » 5.x-1.x-dev
Assigned: Unassigned » sun
Status: Needs work » Needs review
StatusFileSize
new5.82 KB

Now re-written for current 5.x version.

Be sure to download the latest development snapshot of Guestbook in front of applying attached patch. After applying the patch you need to grant a user the permission to "edit posts in own guestbook".

sun’s picture

StatusFileSize
new5.3 KB

Re-rolled patch against latest development snapshot.

michelle’s picture

Are you planning on committing this? Or just providing the patch for people who want the functionality?

Michelle

sun’s picture

@Michelle: To clean-up the queue, we have two options: either re-roll all previously submitted patches against current DRUPAL-5 and optimize them until they are RTBC, or dismiss them at all. With regard to other feature requests, I've deliberately implemented this feature as a new user permission. IMHO this one is a reasonable request, and I'm considering to commit it either to a new 5.x-2.x branch (new features should really go into a new branch) or to the current 5.x-1.x branch.

However, this patch needs to be tested.

pieterdc’s picture

Both patches are unusable! They not only contain non-English comments, but also changes that have nothing to do with this issue.

@sun

You don't want me to apologize for my first patch ever, do you? I wouldn't mind a little more appreciation.
However, thanks for reviewing the patch and putting this in the queue for an official release.. I won't need it, but others might.

sun’s picture

Sorry, no, I didn't want to put you down. With regard to the age of this issue and amount of participants, I was just disappointed that obviously no one tried to apply these patches. I overlooked the fact that yours has been your first patch. Sorry for that.

Anyway - anyone out there who wants to test this patch?

millions’s picture

this works great to allow admins to edit posts, but what about a way to edit your post on someone else's guestbook. Since there's no preview, it'd be nice to have a way to edit your comment if you needed to change your original post.

can we add an Edit Own post?

sun’s picture

@xoso: That's a different case and won't be handled by this patch/issue. Please search the issue queue for already existing issues and follow-up there, or create a new feature request for Guestbook.

sun’s picture

Version: 5.x-1.x-dev » 5.x-2.x-dev
StatusFileSize
new5.34 KB

Re-rolled against 2.x.

sun’s picture

Status: Needs review » Fixed
StatusFileSize
new8.91 KB

Committed attached patch to 2.x.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.