From 68ad5bc039e9958533dc8b66618d97f8a73e3b6b Mon Sep 17 00:00:00 2001 From: Eric Rasmussen <erasmussen2@unl.edu> Date: Fri, 28 Aug 2009 20:44:50 +0000 Subject: [PATCH] moved globe plugin to plugins dir --- plugins/globe/index.php | 34 +++++++++++++++++++++++++ plugins/globe/start.php | 55 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 89 insertions(+) create mode 100644 plugins/globe/index.php create mode 100644 plugins/globe/start.php diff --git a/plugins/globe/index.php b/plugins/globe/index.php new file mode 100644 index 00000000..e4e33959 --- /dev/null +++ b/plugins/globe/index.php @@ -0,0 +1,34 @@ +<?php + /** + * Elgg globe plugin + * + * @package ElggGlobe + * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2 + * @author Eric Rasmussen + * @copyright UNL 2009 + * @link http://planetred.unl.edu/ + */ + + require_once(dirname(dirname(dirname(__FILE__))) . "/engine/start.php"); + + $x = 'afasf'; + var_dump($x); + + $limit = get_input("limit", 10); + $offset = get_input("offset", 0); + + $title = sprintf(elgg_echo("groups:owned"),page_owner_entity()->name); + + // Get objects + $area2 = elgg_view_title($title); + + set_context('search'); + $objects = list_entities("group", "", page_owner(), $limit, false); + set_context('groups'); + + $area2 .= $objects; + $body = elgg_view_layout('two_column_left_sidebar',$area1, $area2); + + // Finally draw the page + page_draw($title, $body); +?> \ No newline at end of file diff --git a/plugins/globe/start.php b/plugins/globe/start.php new file mode 100644 index 00000000..d6d48939 --- /dev/null +++ b/plugins/globe/start.php @@ -0,0 +1,55 @@ +<?php + /** + * Elgg globe plugin + * + * @package ElggGlobe + * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2 + * @author Eric Rasmussen + * @copyright UNL 2009 + * @link http://planetred.unl.edu/ + */ + + /** + * Initialise the groups plugin. + * Register actions, set up menus + */ + function globe_init() + { + + global $CONFIG; + + // Set up the menu for logged in users + if (isloggedin()) + { + add_menu(elgg_echo('globe'), $CONFIG->wwwroot . "globe/"); + //add_menu(elgg_echo('groups:alldiscussion'),$CONFIG->wwwroot."mod/groups/discussions.php"); + } + else + { + add_menu(elgg_echo('globe'), $CONFIG->wwwroot . "globe/"); + } + + register_page_handler('globe', 'globe_page_handler'); + + + } + + function globe_page_handler($page) { + switch ($page[0]) + { + case 'friends': + include($CONFIG->pluginspath . "groups/new.php"); + break; + default: + include($CONFIG->pluginspath . "groups/index.php"); + break; + } + } + + + + + register_elgg_event_handler('init','system','globe_init'); + + +?> -- GitLab