Members cannot delete their own posts and activities

Members are not able to delete their own messageboards or any activities for that matter. I can't believe Elgg does not allow for members to delete their own posts or activities such as befriending someone. 

I have tried the following in the start.php of the Facebook_Theme without success:

After the command elgg_unregister_plugin_hook_handler('register', 'menu:river', 'elgg_river_menu_setup');, I put the following: 

elgg_register_plugin_hook_handler('register', 'menu:river', 'elgg_river_menu_setup'); 
function elgg_river_menu_setup($hook, $type, $return, $params) {
if (elgg_is_logged_in()) {
$item = $params['item'];
$object = $item->getObjectEntity(); 

if ($owner) {
$options = array(
'name' => 'delete',
'href' => elgg_add_action_tokens_to_url("action/river/delete?id=$item->id"),
'text' => elgg_view_icon('delete'),
'title' => elgg_echo('delete'),
'confirm' => elgg_echo('deleteconfirm'),
'priority' => 200,
);
$return[] = ElggMenuItem::factory($options);
}
}
return $return;

However, I got Fatal error: Cannot redeclare elgg_river_menu_setup() (previously declared in C:\xampp\htdocs\sites\elgg-1.8.13\engine\lib\navigation.php:345). I need help.

Thanks.

  • You cannot redeclare a function using the same name when it's already defined elsewhere. Give the elgg_river_menu_setup() another name.

    But do you really want to use the Facebook theme? Taking all the comments and support request about this theme into account I would say it's so full of bugs it's not much of use. The problem with members not being able to delete their own content is only one isssue. With Elgg's default theme (and most likely with any other theme apart the Facebook theme) you don't have this problem.

  • You are right iionly. I will go with the original theme with some modifications. Thanks for the pragmatic advice.