true, 'write_cache_function' => 'write_suckerfish_cache', 'title' => 'Suckerfish Menus', 'description' => 'Sophisticated and flexible CSS driven dropdown menus', 'web_link' => 'Sons of Suckerfish Menus', 'browser_requirements' => 'Many modern browsers support suckerfish menus inherently using CSS.', 'edit_label' => 'CSS based menus', 'plugin_type' => 'nexus_plugin', 'menu_types' => [ 'nor' => [ 'label' => 'Normal', 'note' => 'Nested list of menu items using "ul" and "li" HTML tags.' ], 'ver' => [ 'label' => 'Vertical', 'note' => 'Vertical dropdown menu that usually resides in one of the side modules.' ], 'hor' => [ 'label' => 'Horizontal', 'note' => 'Horizontal menu which you can use to insert in or replace the top menu bar.' ], ], ]; $gNexusSystem->registerPlugin( NEXUS_PLUGIN_GUID_SUCKERFISH, $pluginParams ); /** * bloody mad function to write a custom cache file for an individual menu * @param $pMenuHash full menu hash * @return full menu string ready for printing (key serves as cache file path) */ function write_suckerfish_cache( $pMenuHash ) { global $gBitSmarty; $menu_name = preg_replace( "/ +/", "_", trim( $pMenuHash->mInfo['title'] ) ); $menu_name = strtolower( $menu_name ); $menu_file = $pMenuHash->mInfo['cache']['file']; $data = '{bitmodule title="'.$pMenuHash->mInfo['title'].'" name="'.$menu_name.'" classplus="nexus-menu"}'; $data .= '
'; // if a permission has been set, we need to work out when to close the {if} clause $permCloseIds = []; $perm_close = false; $next_cycle = false; $menu_id = 'nexus'.$pMenuHash->mInfo['menu_id'].'-{$moduleParams.layout_area}{$moduleParams.pos}'; foreach( $pMenuHash->mInfo['tree'] as $key => $item ) { if( $item['first'] ) { if( $key == 0 ) { $data .= '
'; $data .= '{/bitmodule}'; $ret[$menu_file] = $data; return $ret; } ?>