Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Comment Removal

2»

Comments

  • Sorry to bother but how do I enable the settings (for a group)? Cannot find the option in the admin area..
  • Uploaded version 2.1.2 of Comment Removal.
  • oops, in making the js include more selective I managed to forget that it has settings required for the roles pages... fixed now; you should see the options at the bottom of the role page.
  • Thanks for the quick fix, works like charme :)
  • 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?');
  • i have solved my problem
  • 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.
  • Also, this is extension contains SQL error which happerns when you remove whispered comment which is last in discussion. To fix this you should replace

    $DiscFields['TotalWhisperCount'].' = '.($ComInfo['whisper_count'] - 1).', '.$DiscFields['WhisperToLastUserID'].' = '.$NextCom['whisperto'].', '.$DiscFields['WhisperFromLastUserID'].' = '.$NextCom['whisperuser'].', '.$DiscFields['DateLastWhisper'].' = \''.$NextCom['whispercreated'].'\''

    to

    $DiscFields['TotalWhisperCount'].' = '.($ComInfo['whisper_count'] - 1).', '.$DiscFields['WhisperToLastUserID'].' = '.(int) $NextCom['whisperto'].', '.$DiscFields['WhisperFromLastUserID'].' = '.(int) $NextCom['whisperuser'].', '.$DiscFields['DateLastWhisper'].' = \''.$NextCom['whispercreated'].'\''
  • bookmarked. will come back to this when I find the time
  • You don't respect translators and use poor coding. Every time i want to correct YOURS CODE!!! Because translation for my language don't works if in default.php used $Context->Dictionary.

    PLEASE! Use $Context->SetDefinition instead $Context->Dictionary and be hero.

    P.S.
    Why you use $Context->GetDefinition if you don't set any definition ? ;)
  • I have installed the latest version and it registers ok in the admin section. I have checked the box, but then what? Where can I go to operate this extension? I would like to modify and remove some categories. Any help much appreciated.
  • The Comment Removal add on hasn't got anything to do with editing categories. If you want to edit categories you can do that under Settings > Categories.
  • ok I've finally remembered this. I've fixed the bug you mentioned, gugglegum, and also fixed it to update user bookmarks, user discussion watch and user comment/discussion count. I'll upload it after I sort something out with the sql queries.

    I'm sorry I've pissed you off so much shizo :-P the direct assignments to the dictionary were relics of when there wasn't a SetDefinition function, but I've updated that as well.
This discussion has been closed.