Skip to content
Snippets Groups Projects
Commit 68ad5bc0 authored by Eric Rasmussen's avatar Eric Rasmussen
Browse files

moved globe plugin to plugins dir

parent a8a42196
No related branches found
No related tags found
No related merge requests found
<?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
<?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');
?>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment