Hello everyone,
Please I need help on how the messageboard plugin can disable users from posting on their own message board.
i tried this
$owner = elgg_get_page_owner_entitiy();
if($owner) {
forward('activity');
} else {
$result = messageboard_add(elgg_get_logged_in_user_entity(), $owner, $message_content, $owner->access_id);
}
in messageboard/actions/add.php
but users are still able to post on their message board.
I just want to change the message board to make it look like feedback area for other users.
Please any help is much appreciated.
Thanks.
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.
- Coder@felix

Coder - 0 likes
- Matt Beckett@Beck24

Matt Beckett - 0 likes
- Coder@felix

Coder - 0 likes
- Coder@felix

Coder - 0 likes
- iionly@iionly

iionly - 0 likes
- Coder@felix

Coder - 0 likes
- Cim@manacim

Cim - 0 likes
You must log in to post replies.Please help
Ideally you shouldn't modify the plugin directly: http://docs.elgg.org/wiki/Dont_Modify_Core
In a custom plugin you can hook into the action
Check if the logged in user guid == $owner
If so, register an error telling them why it can't be posted, and return false to stop the action from proceeding
Ok thanks, will try that
solved
Maybe it would be better to not modify the action (or hook into the action) to prevent the profile page owner from making a posting (as it would be slightly annoying to write a posting and only after sending to realize that it won't get added) but to modify the widget content code to not display the add posting from in the first place to profile page owners:
Simply adding the modified content.php to your own custom plugin at mod/<your_plugin>/views/default/widgets/messageboard/content.php should override the core view (i.e. you would not need to modify a core file).
Yes thanks iionly, i took the code you sent me via pm and it worked.
Thanks.
or a better idea would be able to comment directly on the message board below the original comment.