hmmm, no idea. i use the "green" theme and the "Deutsch" language. the error-popup only says "error: " so i have no idea, if it ist javascript. there's a yellow icon left to the "error:".i don't want to try it out too often, in order not to make too many damage:i removed a discussion which was hidden, got the error, clicked on the (should-be-removed) discussion to "unhide" it and then clicked "hide" again, but now others can see and click on the discussion, but there's only the header shown, without the first comment.in my admin-account (where i can see hidden discussions and comments) i still see the first comment, but with a small text-notice (i translate from german:) "this comment was hidden from (me) before xx hours"

just in case someone wonders:yes, i have two fields, one "delete" and one "remove". i used the "delete" to hide/unhide and tried the "remove" to remove, so there's no mismatch from the "user's" side ;-)

ok, i'm a bit stupid. of course i still have to hide the discussion. not only the comment/post. so that works now.

next is, it has really something to do with javascript (the remove-button), because when i try to remove a post using the browser "opera", the system error message hat "javascript" in the title. do i have to change any options in the browser?

When I delete a private discussion to myself, the "discussions started" count in my profile page stays the same.
Shouldn't the 'discussions started' be updated as well, after a discussion has been deleted?

Only for admins and mods, as far as I can tell. There are delete comments and delete discussions permissions, but they are for anyone's comments and discussions. I can't find any settings anywhere that will allow normal members to delete (delete as in hide) their own comments.

Yes, but it's per role, not per user, and full access to delete any post. I am looking for a per-user way to their own posts/discussions on their end. This extension works great but I'd rather keep the post in the database if possible.

On another note, the javascript is included on all pages, which seems a bit unessesary. Perhaps a check like this could be added: if($Context->SelfUrl == 'comments.php' && $Context->Session->UserID > 0) { all the funky stuff, including the AddScript }

+1 for bjrn, as stated in this page every extension coder should try to pay attention to this.

Feature or feature request ?I don't have much time to test this extension now, but is ANY comment removable? I'd love my users to be able to remove a comment only if this comment is the last of a discussion. What do you think?

grahack, this would be quite doable, you could probably rip the code for it straight from my clever edit extension for determining the last comment and for removing buttons and enforcing restrictions on certain comments, though it might be a little more complex.

hmm, good point about the javascript, I seemed to have forgotten that...

And yes, if you enable the settings, users will be able to remove their own comments and, when there are no replies, discussions. Modifying it to only allow users to remove their comment only if it is the last one should be a relatively trivial manner: in CommentOptions_AddDeleteButton, you can check the comment # (note that that's the number in the discussion, /not/ the id) against the total number of comments to determine if the comment is last (eg. $IsLastComment = ($GLOBALS['CommentGrid']->CurrentPage - 1) * $GLOBALS['Context']->Configuration['COMMENTS_PER_PAGE']
+ $Form->DelegateParameters['RowNumber'] == $GLOBALS['CommentGrid']->Discussion->CountComments;); in ajax.php, you can modify the sql query so as to retrieve any comments (which are valid to that user) that have a CommentId greater than or equal to the one in question (naturally ordering by id asc), then check if you have more than one result (>1 result indicates comments with a greater id have been found, and hence this one isn't the last).

hi, i think you should use$Context->SetDefinition(...)instead of$Context->Dictionary[...] = ...

Here's a working version wich will get translated correctly in vanilla 1.*:$Context->SetDefinition('PERMISSION_REMOVE_COMMENTS', 'Can remove any comment and discussion');
$Context->SetDefinition('PERMISSION_REMOVE_OWN_COMMENTS', 'Can remove their own comments and discussions (with no replies)');
$Context->SetDefinition('remove', 'remove');
$Context->SetDefinition('VerifyDiscussionRemoval', 'Are you quite sure you want to permanently remove this discussion?');
$Context->SetDefinition('VerifyCommentRemoval', 'Are you quite sure you want to permanently remove this comment?');

This extension contains a serious bug. When removes a whispered comment it does not updates tables DiscussionUserWhisperFrom and DiscussionUserWhisperTo. As a result, vanilla counts comments in discussions incorrectly and makes link to non-existing comments page number.

For example. We have 50 comments and 1 removed whispered comment. Vanilla will point us to ?page=2 and there are no any comments.