Hey guys,
my problem is that after i comment on a post on my elgg site, the comment will not only be shown under the post but it will also create a seperate post which i guess has to do with activity or something like that, but i really don't want that because it's quite lame.
Here's a picture about my problem, it may clarify my confusing explanation :)
http://imagizer.imageshack.us/a/img401/7352/4eam.png
Please help me if you can. Thanks in advance. :)
info@elgg.org
Security issues should be reported to security@elgg.org!
©2014 the Elgg Foundation
Elgg is a registered trademark of Thematic Networks.
Cover image by Raül Utrera is used under Creative Commons license.
Icons by Flaticon and FontAwesome.
That is the default Elgg behavior.
Can it be changed?
How exactly would you like to change it?
Well I don't want comments to appear above as an activity that cannot be liked or commented on. Comments should only be below the actual post i'm commenting on
You may tap to river creation plugin hook https://github.com/Elgg/Elgg/blob/master/engine/lib/river.php#L105 and block creation of entries for comments by checking action type, see https://github.com/Elgg/Elgg/blob/master/actions/comment/save.php#L80
You might also want to bump original river entry, but that's more tricky to do.
Thank you, I'll check it out later :)
I commented out line 59 in version 1.8 and it seems to work perfect. I also see no reason to double post.
//add to river
//add_to_river('river/annotation/generic_comment/create', 'comment', $user->guid, $entity->guid, "", 0, $annotation);
I really don't recommend the suggestion by gmwestrup. The reasons are listed here: http://docs.elgg.org/wiki/Dont_Modify_Core
i would also like to know how to solve this, using elg 1.9.2.
I don't fully understand the sense of preventing the separate river entries on new comments made getting created. It might look (on a testing site) that the separate entry appears immediately over the river entry that the comment has been made on. But this is rather untypical. If a comment is made days / weeks / months after the commented entity has been created this original river entry can already be many pages back on the activity page an no one will will know about the new comment (maybe apart from the member who created the entity that was commented). Also, the list below the river entry will only show the 3 most recent comments but not any earlier comments. Not creating separate entries is quite against the idea of the activity river which is meant to inform the site members about what is going on (has been going on since their last visit).
Nonetheless, the following should work to prevent the separate comment entries getting created in the river (not tested myself though).
In init function of your "river entry customization plugin" add:
and then add the no_comment_entries_in_river() callback function to start.php:
- Previous
- 1
- 2
- Next
You must log in to post replies.