From ad03a6960d6c78aa0e6ad9f6311e0b3d6b5fbbb6 Mon Sep 17 00:00:00 2001 From: Cameron Date: Sun, 8 Jun 2014 02:06:31 -0700 Subject: [PATCH] Removed old tree_menu plugin. --- e107_plugins/tree_menu/config.php | 87 --------- e107_plugins/tree_menu/languages/English.php | 24 --- e107_plugins/tree_menu/tree_menu.php | 193 ------------------- 3 files changed, 304 deletions(-) delete mode 100644 e107_plugins/tree_menu/config.php delete mode 100644 e107_plugins/tree_menu/languages/English.php delete mode 100644 e107_plugins/tree_menu/tree_menu.php diff --git a/e107_plugins/tree_menu/config.php b/e107_plugins/tree_menu/config.php deleted file mode 100644 index 7375aa85f..000000000 --- a/e107_plugins/tree_menu/config.php +++ /dev/null @@ -1,87 +0,0 @@ -getPref(''); - -if (isset($_POST['update_menu'])) -{ - $temp = array(); - foreach($_POST as $key => $value) - { - if ($value != TREE_L2) - { - $temp[$key] = $value; - } - } - - if ($admin_log->logArrayDiffs($temp,$menu_pref,'MISC_01')) - { - $menuPref = e107::getConfig('menu'); - foreach ($temp as $k => $v) - { - $menuPref->setPref($k, $v); - } - $menuPref->save(false, true, false); - } - $ns->tablerender($caption, $mes->render() . $text); -} - -$text = " -
- - - - - - - - - - - - - - - - - - - - - -
".TREE_L6."
".TREE_L7."
".TREE_L8."
".TREE_L9."".$frm->radio_switch('tm_spacer', $menu_pref['tm_spacer'], LAN_YES, LAN_NO)."
-
- ".$frm->admin_button('update_menu', LAN_UPDATE, 'update')." -
-
"; - -$ns->tablerender(TREE_L1, $text); - -require_once(e_ADMIN."footer.php"); - -?> \ No newline at end of file diff --git a/e107_plugins/tree_menu/languages/English.php b/e107_plugins/tree_menu/languages/English.php deleted file mode 100644 index 5877b5151..000000000 --- a/e107_plugins/tree_menu/languages/English.php +++ /dev/null @@ -1,24 +0,0 @@ - \ No newline at end of file diff --git a/e107_plugins/tree_menu/tree_menu.php b/e107_plugins/tree_menu/tree_menu.php deleted file mode 100644 index 1f4873e60..000000000 --- a/e107_plugins/tree_menu/tree_menu.php +++ /dev/null @@ -1,193 +0,0 @@ - db_Select_gen($query); -$linkArray = $sql->db_getList(); - -// all main links now held in array, we now need to loop through them and assign the sublinks to the correct parent links ... - -$mainLinkArray = array(); -foreach($linkArray as $links) -{ -// Updated to stop using the deprecated method of splitting the link-name in 3. -// Now uses uses the link parent to determine the 'tree'. - - extract ($links); - if ($link_parent == 0) - { - // main link - add to main array ... - $mainLinkArray[$link_id]['id'] = $link_id; - $mainLinkArray[$link_id]['name'] = $tp->toHtml(strip_tags($link_name),"","defs"); - $mainLinkArray[$link_id]['url'] = $link_url; - $mainLinkArray[$link_id]['description'] = $link_description; - $mainLinkArray[$link_id]['image'] = $link_button; - $mainLinkArray[$link_id]['openMethod'] = $link_open; - $mainLinkArray[$link_id]['class'] = $link_class; - } - else - { - // submenu - add to parent's array entry ... - $tmp = explode(".", $link_name); - $submenu_name = ($tmp[2]) ? $tmp[2] : $link_name; - - $mainLinkArray[$link_parent]['sublink'][$link_id]['parent_name'] = $link_parent; - $mainLinkArray[$link_parent]['sublink'][$link_id]['id'] = $link_id; - $mainLinkArray[$link_parent]['sublink'][$link_id]['name'] = $tp->toHtml(strip_tags($submenu_name),"","defs"); - $mainLinkArray[$link_parent]['sublink'][$link_id]['url'] = $link_url; - $mainLinkArray[$link_parent]['sublink'][$link_id]['description'] = $links['link_description']; - $mainLinkArray[$link_parent]['sublink'][$link_id]['image'] = $link_button; - $mainLinkArray[$link_parent]['sublink'][$link_id]['openMethod'] = $link_open; - $mainLinkArray[$link_parent]['sublink'][$link_id]['class'] = $link_class; - } - -} - -// ok, now all mainlinks and sublinks are held in the array, now we have to loop through and build the text to send to screen ... - -$text = ""; -foreach($mainLinkArray as $links) { - extract ($links); - if (array_key_exists("sublink", $links) && $links['name'] != "") { - // sublinks found ... - - $url = "javascript:void(0);"; - $spanName = $id; - $image = ($image ? "" : "»"); - $plink = "".$image." ".setLink($name, $url, $openMethod, $description)."\n"; - $text .= (varsettrue($menu_pref['tm_spacer']) ? "
\n".$plink."\n
\n" : $plink); - } else { - // no sublinks found ... - if($links['name']) - { - $linkName = $url; - $spanName = ""; - $image = ($image ? "" : "·"); - $plink = "".$image." ".setLink($name, $url, $openMethod, $description).""; - $text .= (varsettrue($menu_pref['tm_spacer']) ? "
\n".$plink."\n
\n" : $plink); - } - } - - $c = 0; - if (array_key_exists("sublink", $links) && $links['name'] != "" ) { - - $text .= "\n\n"; - foreach($sublink as $link) { - extract($link); - $image = ($image ? " " : "· "); - $spanName = $parent_name; - - $plink = $image." ".setLink($name, $url, $openMethod, $description)."
\n"; - $text .=(varsettrue($menu_pref['tm_class3']) ? "".$plink."
\n\n" : $plink); - } - $text .= "\n"; - } - -} - -function setlink($link_name, $link_url, $link_open, $link_description) -{ - global $tp; - if (strpos($link_url, '://') === FALSE && strpos($link_url, 'mailto:') !== 0 && !strstr($link_url, "void")) - { - $link_url = SITEURL.$link_url; - } - $link_url = $tp->replaceConstants($link_url, $nonrelative = TRUE, $all = false); - $href = " href='".$link_url."'"; - switch ($link_open) - { - case 1: - $link_append = " rel='external'"; - break; - case 2: - $link_append = ""; - break; - case 3: - $link_append = ""; - break; - case 4 : - case 5 : - $dimen = ($link_open == 4) ? '600,400' : '800,600'; - $href = " href=\"javascript:open_window('".$link_url."',{$dimen})\""; - break; - default: - $link_append = ''; - } - - $link = "".$link_name."\n"; - return $link; -} - - - -(isset($_COOKIE["treemenustatus"]) && $_COOKIE["treemenustatus"]) ? $treemenustatus = $_COOKIE["treemenustatus"] : $treemenustatus = "0"; -$text .= " - - "; -$ns->tablerender(LAN_SITELINKS_183, $text, 'tree_menu'); - -?> \ No newline at end of file