Editable Comments v1.2

Release Notes

Fixed a deprecated function

  • Its not working with Elgg 1.9.4
    Can it be please updated?

  • It is getting installed properly - no error messages. However no options to edit comment seen anywhere.

  • I wouldn't expect it to work with 1.9 - comments were changed from annotations to full entities in that transition so this plugin will pretty much need to be rewritten.

    This is probably one of the more important ones

  • It might not necessarily be as important as on Elgg 1.8 and older because users can now edit their own comments by default on Elgg 1.9.

  • Iionly, this is very much needed, in fact this is stopping from releasing our actual live sites. Those who have shifted from WP+BP and have multi-user blogs (think of wordpress.com) need it for the blog owners. As it is blog owners cannot queue the comments for approval, at least they need to have the power to edit comments on their individual posts.

  • "NOTE: This functionality is standard in Elgg core as of 1.9
    This plugin is not required or maintained for Elgg 1.9+"

    This is not entirely right, imho. Elgg 1.9.x does not allow a blog owner to edit or delete any bad or abusive comment made on his blog post by another user. Since there is no comment queue or pre-approval of comments like any standard blog (wordpress, drupal, blogger) in Elgg, this plugin was helpful - very helpful to run Elgg as multi-user blog. It is true that the blog-owner can report to the site super admin about a bad comment and the site super admin can then delete it - but its an indirect way and time-consuming for the blog owner.

    Editable Comments that allow blog-owners to edit or at least disapprove/unpublish bad/abusive comments on his blogpost is a serious requirement. Its a request to upgrage this plugin to 1.9

  • That can easily be added with a permissions check hook.  Just return $entity->getContainerEntity()->canEdit()

    I won't be doing anything with this plugin for that.  It's an easy thing to do, even if you're not an experienced dev that's a really good way to start :)

  • In the file actions\comment\delete.php

    I changed
       if (elgg_instanceof($comment, 'object', 'comment') && $comment->canEdit()) {
    to
       if (elgg_instanceof($comment, 'object', 'comment') && $comment->canEdit()  && $entity->getContainerEntity()->canEdit() ) {

    but I cannot see any Edit/delete icon.

  • elgg_register_plugin_hook_handler('permissions_check', 'object', 'myplugin_comment_permissions');

     

    function myplugin_comment_permissions($h, $t, $r, $p) {

        if (elgg_instanceof($p['entity'], 'object', 'comment')) {

            return $p['entity']->getContainerEntity()->canEdit();

        }

        return $r;

    }

    Something like this what you're looking for

  • Thanks Matt but sincerely sorry for being dummy && newbie. In which file do we add this?
    On second read, it seems you are suggesting me to write a new plugin?? :(
    maybe it will be quicker for you to release this plugin - it will immensely benefit a lot of people.

    In the meanwhile I have found that if we comment out the last portion in engine\lib\comments.php that is the portion below
       * By default, only authors can edit their comments.
    Blog owners can edit comments on their own blog posts.

    Apart from the fact that a core file should not be changed, are there any dangers or problems in removing this?

     

Matt Beckett

I'm a self-employed web developer, family man, nerd, scuba diver. Manager/maintainer of this elgg community site, and core Elgg development team member.

Project Info

Stats

  • Category: Communication
  • License: GNU General Public License (GPL) version 2
  • Updated: 2014-11-26
  • Downloads: 2538
  • Recommendations: 11

Other Projects

View Matt Beckett's plugins