- based on test_menu by grum (thanks to you) - integration of dynamic menu bar to pwg

- the menubar is composed now of dynamic blocks that can be ordered/hidden
- plugins can add their own blocks 


git-svn-id: http://piwigo.org/svn/trunk@2488 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
rvelices 2008-08-28 00:32:39 +00:00
parent 7f956e71b9
commit abb2f22b2e
44 changed files with 1008 additions and 1718 deletions

View file

@ -772,4 +772,18 @@ function order_by_name($element_ids,$name)
return $ordered_element_ids;
}
/*event handler for menu*/
function register_default_menubar_blocks( $menu_ref_arr )
{
$menu = & $menu_ref_arr[0];
if ($menu->get_id() != 'menubar')
return;
$menu->register_block( new RegisteredBlock( 'mbLinks', 'Links', 'piwigo'));
$menu->register_block( new RegisteredBlock( 'mbCategories', 'Categories', 'piwigo'));
$menu->register_block( new RegisteredBlock( 'mbTags', 'Related tags', 'piwigo'));
$menu->register_block( new RegisteredBlock( 'mbSpecials', 'special_categories', 'piwigo'));
$menu->register_block( new RegisteredBlock( 'mbMenu', 'title_menu', 'piwigo'));
$menu->register_block( new RegisteredBlock( 'mbIdentification', 'identification', 'piwigo') );
}
?>