comments for all object in elgg 1.10.4

Last updated by mariano Comments (4)

1.open engine/lib/navigation.php

in the line 381 replace:

if ($object->canComment()) {

 

for

 

if ($object) {

 

 

2.open actions/comments/save.php

 

and delete this line: 83

add_to_river('river/annotation/generic_comment/create', 'comment', $user->guid, $entity->guid, "", 0, $annotation);

 

 

enjoy :)

  • I am using elgg 1.11.1 an can't find this line

    add_to_river('river/annotation/generic_comment/create', 'comment', $user->guid, $entity->guid, "", 0, $annotation);

    instead i find

        // Add to river
        elgg_create_river_item(array(
            'view' => 'river/object/comment/create',
            'action_type' => 'comment',
            'subject_guid' => $user->guid,
            'object_guid' => $guid,
            'target_guid' => $entity_guid,
        ));

    Shall I delete this one?

     

  • add_to_river() was deprecated by elgg_create_river_item(). So, deletion of the elgg_create_river_item() call seems the correct way. But I don't know if this will be the only step you have to do to reach your goal as there might be other changes in newer Elgg version not considered in the (outdated) instructions you are referring to.

  • I was able to achieve comment functionality just by following step 1.

  • Hi guys, now I've installed Elgg 1.11.2 and i try to add the comments for every object with your methods but i can't do it. Do you have a solution for this version?
    Thank :)