Hello everybody,
I'm pretty new to Elgg and I learnt a lot these past weeks. Your discussions were very helpful to me and I solved lots of questions thanks to previous posts. But now I face a trouble I'm not able to fix so I need your help.
I'm using Elgg 1.10 with Roles plugin. I modified Moderators for Roles plugin to create a new role for my specific need. I want this role hide friends tab in filter menu in 'Files' page and hide 'upload a file' in this same page.
Inspired by the plugin documentation, I tried different solutions, without success :
What is working :
'menus' => array(
'site::members' => array('rule' => 'deny'),
'site::activity' => array('rule' => 'deny'),
'footer::terms' => array('rule' => 'deny'))
OK, i'm able to hide members and activity site menus and terms in footer.
What is not working :
'menus' => array(
'filter::all' => array(
'rule' => 'deny',
'context' => array('file','blog')
),
'title::add' => array(
'rule' => 'deny',
'context' => array('groups','file')
),
Neither Filter::All and Title::Add are working. According to the documentation, it should work. I also tried filter::friends and other things, without success. I also tried to modify the context but it should not be the root cause.
My question is : do Elgg new release modify some things in menu management which prevent me use the plugin ? How could I answer to my need ?
Any help appreciated,
Thank you, Baptiste
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.
- Nikolai Shcherbin@rivervanrain

Nikolai Shcherbin - 0 likes
- Matt Beckett@Beck24

Matt Beckett - 0 likes
- Nikolai Shcherbin@rivervanrain

Nikolai Shcherbin - 0 likes
- Matt Beckett@Beck24

Matt Beckett - 0 likes
- fonly@fateme

fonly - 0 likes
- ihayredinov@ihayredinov

ihayredinov - 0 likes
- Baptiste@baptisteturquet

Baptiste - 0 likes
You must log in to post replies.Where is ')' at the end?
Try this:
Also, try flush the cache after changes
I don't think the filters go through the menu plugin hooks, and if I'm right that means they can't be affected by roles
Manual : See at p.6
I'm not right, the default filter does use the menu system. However it can be overridden with any arbitrary html, so it may be the case that another plugin is overwriting the filter with html that wasn't generated with the menu system.
hi every body i want some information about simple cache url 4example : address / how it work / goal & ... tnx Reply to this Edit HTML
@fateme, don't cross-post and hijack threads.
Hello all,
Thank you for your answers. Actually I found the problem : my syntax, like examples given in the manual was right. But when I put a specific context for a role it doesn't work with the following function declared on lib/roles.php (from roles plugin) : roles_check_context.
I saw that there was an argument to apply another way of checking context, the boolean "strict". I applied it in the roles_menus_permissions function (in start.php), where roles_check_context is called.
So line 207 --> roles_check_context($perm_details, true) works good.
Thank you,
Baptiste