true, 'write_cache_function' => 'write_tikiwiki_cache', 'title' => 'TikiWiki menus', 'description' => 'expandable menu reminiscent of the tikiwiki menu', 'web_link' => 'TikiWiki', 'browser_requirements' => 'Most browsers that support javascript should support these menus.', 'edit_label' => 'TikiWiki menus', 'plugin_type' => 'nexus_plugin', 'menu_types' => [ 'heo' => [ 'label' => 'head expands - open', 'note' => 'Head item serves merely as container and clicking on it will expand the underlying items (initial setting is open).' ], 'iho' => [ 'label' => 'head expands (with icon) - open', 'note' => 'Head item serves merely as container and clicking on it will expand the underlying items (initial setting is open). Displays an icon along with it.' ], 'hec' => [ 'label' => 'head expands - closed', 'note' => 'Initial setting is closed.' ], 'ihc' => [ 'label' => 'head expands (with icon) - closed', 'note' => 'Initial setting is closed. Displays an icon along with it.' ], 'ieo' => [ 'label' => 'icon expands - open', 'note' => 'Menu head item serves as link and there is an icon to expand the menu (initial setting is open).' ], 'iec' => [ 'label' => 'icon expands - closed', 'note' => 'Initial setting is closed.' ], ], ]; $gNexusSystem->registerPlugin( NEXUS_PLUGIN_GUID_TIKIWIKI, $pluginParams ); /** * exports tikiwiki style menu * @param $pMenuHash full menu hash * @return full menu string ready for printing (key serves as cache file path) */ function write_tikiwiki_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.'"}'; $data .= ''; // apply state of expandable menus $data .= ''; $data .= '{/bitmodule}'; $ret[$menu_file] = $data; return $ret; } ?>