Changes:
1) The items under "More" are not displayed as main menu items.
2) Change in License. This is an open source plugin.
View Purus's plugins
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.
Hi Purus,
What happens to the more menu items? How to people choose those items? Thanks so much!
Will be listed as ordinary menu items.
Ok. Thanks so much!
Thanks for the plugin Purus. It has a small problem though, it changes the order of the menu items? The items are sorted alphabetically when using the plugin instead of the order set up in admin/appearance/menu_items.
Yes. I am aware of that. I am trying to find a way to show up in correct order. But no luck till now. :(
Hi thanks for this plugin,
I am very new to elgg (couple of hours) also I do not know if this is right place to write
however as a new starter I could not find any solution in side elgg admin setting to show more menu properlly.
If anybody wants to show More menu in ie or chrome please try \views\default\css\ie.php
li:hover > .elgg-menu-site-more {
//display: none;
}
I really did not test ( or because of I do not know how to test).May be it shall be good to put it in to your plugin as option.
Hi erkan,
I am new to ELGG to (2 months).. I will try to see in to your point.
Thanks.
works great!! recommended
Thanks Cheta:)
Hey. I decided to look into the code and found a solution. I don't know if it is the best (I'm new here in Elgg) but works. You can integrate it to your plugin:
First disable the default hook and register a new one:
elgg_unregister_plugin_hook_handler('prepare', 'menu:site', 'elgg_site_menu_setup');
elgg_register_plugin_hook_handler('prepare', 'menu:site', 'tendencia_site_menu_setup');
Then create the function:
function tendencia_site_menu_setup($hook, $type, $return, $params) {
$featured_menu_names = elgg_get_config('site_featured_menu_names');
$custom_menu_items = elgg_get_config('site_custom_menu_items');
if ($featured_menu_names || $custom_menu_items) {
// we have featured or custom menu items
$registered = $return['default'];
// set up featured menu items
$featured = array();
foreach ($featured_menu_names as $name) {
foreach ($registered as $index => $item) {
if ($item->getName() == $name) {
$featured[] = $item;
unset($registered[$index]);
}
}
}
// add custom menu items
$n = 1;
foreach ($custom_menu_items as $title => $url) {
$item = new ElggMenuItem("custom$n", $title, $url);
$featured[] = $item;
$n++;
}
//register the remaining items
foreach ($registered as $index => $item) {
$featured[] = $item;
}
$return['default'] = $featured;
//do not add the "More" button
//$return['more'] = $registered;
} else {
// no featured menu items set
$max_display_items = 10;
// the first n are shown, rest added to more list
// if only one item on more menu, stick it with the rest
$num_menu_items = count($return['default']);
if ($num_menu_items > ($max_display_items + 1)) {
$return['more'] = array_splice($return['default'], $max_display_items);
}
}
return $return;
}
Hope it helps.
Greetings from Colombia
Thanks jacruzca, will try to test that and integrate in the plugin soon.
Thanks again.
Oh thank you, you think like me.
Sometimes "more" is "less".
Hey Purus, now if you can build one that disables draggable widgets...:)
Having "more" without more :)
Trying this now. Who designed that silly more menu anayways....eeek.
jacruzca....... Where i have to put that script.........
Menu Builder plugin allows you to remove "more" as well as build menus.
Thankz TahoeBilly.........
thanks for this @Purus very useful
hi works not under 1.9.x this is the error: http://screenpresso.com/=S45Zd
I don't think this plugin is maintained anymore. But read the error message and update the deprecated function.
Change "register_elgg_event_handler" to "elgg_register_event_handler".
Simple fix, add the following to your theme's main CSS
Use the following code in your start.php file. I am using Elgg 1.12.12