diff options
author | cash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2011-01-22 20:33:28 +0000 |
---|---|---|
committer | cash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2011-01-22 20:33:28 +0000 |
commit | 8423cda014c6aee9fb3a3f7ebe78bc0465e7355f (patch) | |
tree | e1baa523308221d33908e4ea4014191ade8d5d66 /mod/pages/start.php | |
parent | cec8a4f34681d4c2a43e0c07de0a68bc22f1b558 (diff) | |
download | elgg-8423cda014c6aee9fb3a3f7ebe78bc0465e7355f.tar.gz elgg-8423cda014c6aee9fb3a3f7ebe78bc0465e7355f.tar.bz2 |
finished the first pass on the pages plugin for using the new HTML/CSS
git-svn-id: http://code.elgg.org/elgg/trunk@7904 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/pages/start.php')
-rw-r--r-- | mod/pages/start.php | 44 |
1 files changed, 6 insertions, 38 deletions
diff --git a/mod/pages/start.php b/mod/pages/start.php index 5872e6b11..b4e082f20 100644 --- a/mod/pages/start.php +++ b/mod/pages/start.php @@ -36,7 +36,6 @@ function pages_init() { // Extend some views elgg_extend_view('css/screen', 'pages/css'); - elgg_extend_view('groups/right_column', 'pages/groupprofile_pages'); // Add to groups context // Register entity type for search register_entity_type('object', 'page'); @@ -94,6 +93,12 @@ function pages_init() { function pages_page_handler($page) { elgg_load_library('elgg:pages'); + + // add the jquery treeview files for navigation + $js_url = elgg_get_site_url() . 'mod/pages/vendors/jquery-treeview/jquery.treeview.min.js'; + elgg_register_js($js_url, 'jquery-treeview'); + $css_url = elgg_get_site_url() . 'mod/pages/vendors/jquery-treeview/jquery.treeview.css'; + elgg_register_css($css_url, 'jquery-treeview'); if (!isset($page[0])) { $page[0] = 'all'; @@ -220,43 +225,6 @@ function page_notify_message($hook, $entity_type, $returnvalue, $params) { return null; } - -/** - * Sets the parent of the current page, for navigation purposes - * - * @param ElggObject $entity - */ -function pages_set_navigation_parent(ElggObject $entity) { - $guid = $entity->getGUID(); - - while ($parent_guid = $entity->parent_guid) { - $entity = get_entity($parent_guid); - if ($entity) { - $guid = $entity->getGUID(); - } - } - - set_input('treeguid',$guid); -} - -function pages_get_path($guid) { - - if (!$entity = get_entity($guid)) { - return array(); - } - - $path = array($guid); - - while ($parent_guid = $entity->parent_guid) { - $entity = get_entity($parent_guid); - if ($entity) { - $path[] = $entity->getGUID(); - } - } - - return $path; -} - /** * Extend permissions checking to extend can-edit for write users. * |