Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Edit Timeout

TiGRTiGR
edited July 2010 in Vanilla 2.0 - 2.8
Edit Timeout

Comments

  • SS ✭✭
    This plugin just hide edit button. I can manually type url http://vanillaforums.org/post/EditComment/94100 and edit my post.
    Need use permission PostController::EditComment() + some other events AfterSaveComment, maybe other...
    Regular expression to remove edit button - overkill - will not work for custom theme.
  • @S, if you read description or readme.txt, the problem of not preventing edition by manual linking is a known issue.

    If you can think of a better way than regular expression - let me know (it could be hidden via custom css, something like #Comment_X EditComment or EditDiscussion, but it's not much better really).

    Permission PostController::EditComment() won't work, since these permissions are hard-coded in view helper_functions.php:
    if ($Session->UserID == $Object->InsertUserID || $Session->CheckPermission('Vanilla.Discussions.Edit', TRUE, 'Category', $CategoryID)) $Sender->Options .= '<span>'.Anchor(T('Edit'), '/vanilla/post/editdiscussion/'.$Object->DiscussionID, 'EditDiscussion').'</span>';
    So, there are no "nice" ways to achieve this.
  • BTW, hiding links via display:none won't work, since you have to remove spans also, but you can't do that with css.

    Another way is to use JS, but if user has js disabled he'd have all edit links at their places.
  • And AfterSaveComment is a bit too late :)
  • SS ✭✭
    AfterSaveComment is useless anyway. It fires only for new (insert), not update (editing).
    You can ask to add any event in any place: use pull request @ github or try luck here http://vanillaforums.org/discussion/comment/96266/
  • New version uploaded. No more forms are shown for timed out messages.

    @S, yes, I am on my way to add BeforeSaveComment event to vanilla code.
  • This plugin seems to be no longer necessary, according to latest git commits, this feature would be built into Vanilla core.
Sign In or Register to comment.