A while back I managed to figure out a way to filter the widgets availible to users according to the profile choice they made, (using "Profile Manager and Dragable_widgets). Now I would like to do something similar with the Tool Menu on the Topbar.
I have tried adding code to check the users profile choices prior to the add_menu statement in the start.php of certain plugins, but maybe the add_menu is being loaded before elgg loads the profile type (not sure about this just a theory).
Has anyone else played with this idea? if so, any ideas to make this work?
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.
- Trajan@Trajan

Trajan - 0 likes
- waya59@waya59

waya59 - 0 likes
- waya59@waya59

waya59 - 0 likes
You must log in to post replies.I don't use profile_manager, I'm using the old usertype plugin. But the code I use to get exactly what you're asking for is this:
This go in relevant plugin start.php
good luck!
Thanks,,,
the code I have tried is:
$p = page_owner_entity();
$pt = $p->custom_profile_type;
if (isloggedin() && $pt == 3) {
add_menu(elgg_echo('mood'), $CONFIG->wwwroot . "mod/mood/everyone.php");
}
Not sure if the ($_SESSION['user']->custom_profile_type == 3) statement would work but I'll read up on it.
Thanks for the idea
That worked Great!
Thanks Man