diff options
author | Mario Vavti <mario@mariovavti.com> | 2015-05-10 15:00:18 +0200 |
---|---|---|
committer | Mario Vavti <mario@mariovavti.com> | 2015-05-10 15:00:18 +0200 |
commit | 616338c17e9eabc6355e27694c9e49f1f4586055 (patch) | |
tree | dca9adc96b01732f334a724115604e386a0cd485 /mod | |
parent | 2114bfafca4082d655085a5e320ca8be906896b4 (diff) | |
download | volse-hubzilla-616338c17e9eabc6355e27694c9e49f1f4586055.tar.gz volse-hubzilla-616338c17e9eabc6355e27694c9e49f1f4586055.tar.bz2 volse-hubzilla-616338c17e9eabc6355e27694c9e49f1f4586055.zip |
provide ability to create submenus
Diffstat (limited to 'mod')
-rw-r--r-- | mod/mitem.php | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/mod/mitem.php b/mod/mitem.php index 06c66a323..333568eec 100644 --- a/mod/mitem.php +++ b/mod/mitem.php @@ -124,6 +124,13 @@ function mitem_content(&$a) { $m = menu_fetch($a->data['menu']['menu_name'],$uid,$ob_hash); $a->data['menu_item'] = $m; + $menu_list = menu_list($uid); + + foreach($menu_list as $menus) { + if($menus['menu_name'] != $m['menu']['menu_name']) + $menu_names[] = $menus['menu_name']; + } + $perm_defaults = array( 'allow_cid' => $channel['channel_allow_cid'], 'allow_gid' => $channel['channel_allow_gid'], @@ -152,14 +159,15 @@ function mitem_content(&$a) { '$permdesc' => t("\x28click to open/close\x29"), '$aclselect' => populate_acl($perm_defaults,false), '$mitem_desc' => array('mitem_desc', t('Link Name'), '', 'Visible name of the link','*'), - '$mitem_link' => array('mitem_link', t('Link Target'), '', 'URL of the link', '*'), + '$mitem_link' => array('mitem_link', t('Link Target or Submenu'), '', 'Enter URL of the link or select a menu name to create a submenu', '*', 'list="menu-names"'), '$usezid' => array('usezid', t('Use RedMatrix magic-auth if available'), true, ''), '$newwin' => array('newwin', t('Open link in new window'), false,''), '$mitem_order' => array('mitem_order', t('Order in list'),'0',t('Higher numbers will sink to bottom of listing')), '$submit' => t('Submit and finish'), '$submit_more' => t('Submit and continue'), '$display' => $display, - '$lockstate' => $lockstate + '$lockstate' => $lockstate, + '$menu_names' => $menu_names )); $o .= replace_macros(get_markup_template('mitemlist.tpl'),array( |