Thanks again RvR!
Is possible count only unread notifications?
You can try this for unread notifications
$notifications_no = elgg_get_entities_from_metadata(array(
'type' => 'object',
'subtype' => 'site_notification',
'owner_guid' => elgg_get_logged_in_user_entity(),
'metadata_name' => 'read',
'metadata_value' => false,
'count' => true,
));
Simple view (all types\all users):
$content = elgg_list_river('limit' => 10);
echo $content;
For more options look at river.php
Thanks RvR!
elgg_register_plugin_hook_handler should be inside the init() function and change_roles_config should be outside the init() function.
So, your start.php will be like this:
<?php
elgg_register_event_handler('init', 'system', 'plugin_init');
function plugin_init() {
elgg_register_plugin_hook_handler( "roles:config", "role", "change_roles_config", 550 );
}
function change_roles_config( $hook_name, $entity_type, $return_value, $params ) {
....
....
....
}
?>
Rohit. thanks for help, see my start.php in pastebin: http://pastebin.com/qCzRs892
Nothing happens.
Default users still have access to the modules on the dashboard.
Ooops...
Roles Mod on top.
Work Fine.
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.