I want to remove the more menu, i found this solution but how do i do this?
I use Release - 2.2.3, Versie - 2015062900 and Theme EasyTheme2
http://www.lieveengeltjesdatactnl.datact.nl/
Where and how can i add this line / option? And will it work in 2.2.3?
Thanks Bas
_________________________________________________
Instead add this in your custom plugin init function:
elgg_unregister_plugin_hook_handler('prepare', 'menu:site', '_elgg_site_menu_setup');
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.
- Hanzolo@Hanzolo
Hanzolo - 0 likes
- ihayredinov@ihayredinov
ihayredinov - 0 likes
- iionly@iionly
iionly - 0 likes
- Bas van Kollenburg@soterios
Bas van Kollenburg - 0 likes
- Nikolai Shcherbin@rivervanrain
Nikolai Shcherbin - 0 likes
- Bas van Kollenburg@soterios
Bas van Kollenburg - 0 likes
You must log in to post replies.Hm, it should be possible to use this plugin and add the line of code above into the start.php there
Create your own plugin that will contain all customizations.
The "init function" refers to the function of a plugin registered to the 'init', 'system' event. Almost every plugin has such an init function and in theory you could add the line to the init function of every plugin. But instead of modifying the code of an existing plugin with such a customization (and therefore making an update of your site difficult to handle) you should create a new plugin ("customization plugin") where you can add this and any other similar customization specifically used on your site. You don't need to create a separate plugin for each of this kind of customization. A single plugin is sufficient.
The minimum code necessary for such a customization plugin is a manifest.xml and a start.php. Take a look at the manifest.xml files of other plugins as a starting point for your plugin. For a start the start.php of your plugin only needs an init function registered for the 'init', 'system' event with the single line of code to unregister the more menu. Then put your customization plugin in the mod folder and activate it. Best would be to place it at the bottom of the plugin list on the plugin page in the admin area. Then you could also add code to your customization plugin at a later time when necessary to modify the behaviour of any other plugin used on your site (that is above your plugin in the plugin list).
This is my start.php whats wrong it won't work?
-----------------------
elgg_register_event_handler('init','system','disable_more_init');
function disable_more_init(){ elgg_unregister_plugin_hook_handler('prepare', 'menu:site', '_elgg_site_menu_setup'); }
------------------------------
Code is correct.
1 - Check manifest.xml (especially tag <id> in there)
2 - Upgrade and flush caches via Administration -> Dashboard
Works ;-) upgrade and flush cache did it