admin_gatekeeper();
elgg_admin_add_plugin_settings_sidemenu();
- set_context('admin');
+ elgg_set_context('admin');
// default to overview
if (!isset($page[0]) || empty($page[0])) {
function service_handler($handler, $request) {
global $CONFIG;
- set_context('api');
+ elgg_set_context('api');
$request = explode('/', $request);
// emulate that effect.
// if context == 'main' (default) it probably means they always wanted
// the menu item to show up everywhere.
- $context = get_context();
+ $context = elgg_get_context();
if ($context == 'main') {
$context = 'all';
global $CONFIG;
if (!$context) {
- $context = get_context();
+ $context = elgg_get_context();
}
if (!elgg_prepare_submenu($context, $sort)) {
global $CONFIG;
//add submenu options
- if (get_context() == "friends" || get_context() == "friendsof") {
- // || get_context() == "collections") { - disabled as we no longer use collections
+ if (elgg_get_context() == "friends" || elgg_get_context() == "friendsof") {
+ // || elgg_get_context() == "collections") { - disabled as we no longer use collections
add_submenu_item(elgg_echo('friends'), $CONFIG->wwwroot . "pg/friends/"
. elgg_get_page_owner()->username);
global $CONFIG;
// Menu options
- if (get_context() == "settings") {
+ if (elgg_get_context() == "settings") {
$user = get_loggedin_user();
add_submenu_item(elgg_echo('usersettings:user:opt:linktext'),
$CONFIG->wwwroot . "pg/settings/user/{$user->username}/");
$offset = sanitise_int(get_input('offset', 0));
}
- $context = get_context();
+ $context = elgg_get_context();
$html = elgg_view('entities/entity_list', array(
'entities' => $entities,
function using_widgets() {
global $CONFIG;
- $context = get_context();
+ $context = elgg_get_context();
if (isset($CONFIG->widgets->contexts) && is_array($CONFIG->widgets->contexts)) {
if (in_array($context, $CONFIG->widgets->contexts)) {
return true;
&& !empty($CONFIG->widgets->handlers)
&& is_array($CONFIG->widgets->handlers)) {
- $context = get_context();
+ $context = elgg_get_context();
foreach ($CONFIG->widgets->handlers as $key => $handler) {
if (!in_array('all', $handler->context) &&
elgg_add_submenu_item(array('text' => 'All test', 'href' => "$url?all"), 'all');
-//set_context('not_main');
+//elgg_set_context('not_main');
$body = elgg_view_layout('one_column_with_sidebar', 'Look right.');
echo elgg_view_page('Submenu Test', $body);
being hard-coded here.
if(is_plugin_enabled('riverdashboard')){
$title = elgg_view_title(elgg_echo('content:latest'));
- set_context('search');
+ elgg_set_context('search');
$content = elgg_list_registered_entities(array('limit' => 10, '
full_view' => FALSE, 'allowed_types' => array('object','group')));
- set_context('main');
+ elgg_set_context('main');
}
*/
//Load the front page
$title = elgg_view_title(elgg_echo('content:latest'));
- set_context('search');
+ elgg_set_context('search');
$offset = (int)get_input('offset', 0);
if (is_plugin_enabled('riverdashboard')) {
$activity = elgg_view_river_items(0, 0, '', '', '', '', 10, 0, 0, true, false);
$activity = elgg_list_registered_entities($options);
}
- set_context('main');
+ elgg_set_context('main');
+
global $autofeed;
$autofeed = FALSE;
// Add group bookmark menu item
if (isloggedin()) {
- if ($page_owner instanceof ElggGroup && get_context() == 'groups') {
+ if ($page_owner instanceof ElggGroup && elgg_get_context() == 'groups') {
if ($page_owner->bookmarks_enable != "no") {
//add_submenu_item(sprintf(elgg_echo("bookmarks:group"),$page_owner->name), "pg/bookmarks/" . $page_owner->username . '/items');
}
$url = "<a href=\"{$performed_by->getURL()}\">{$performed_by->name}</a>";
$string = sprintf(elgg_echo("bookmarks:river:created"),$url) . " ";
$string .= "<a href=\"" . $object->address . "\">" . $object->title . "</a>";
-if(($is_group instanceof ElggGroup) && (get_context() != 'groups')){
+if (($is_group instanceof ElggGroup) && (elgg_get_context() != 'groups')){
$string .= " " . elgg_echo('bookmarks:ingroup') . " <a href=\"{$is_group->getURL()}\">" . $is_group->name . "</a>";
}
$string .= " <span class='entity_subtext'>" . elgg_view_friendly_time($object->time_created);
'full_view' => FALSE,
'metadata_case_sensitive' => FALSE,
);
-$current_context = get_context();
-set_context('search');
+elgg_push_context('search');
$objects = elgg_list_entities_from_metadata($params);
-set_context($current_context);
+elgg_pop_context();
$title = sprintf(elgg_echo('categories:results'), $category);
$area3widgets = false;
// get available widget types
- set_context ( $context );
+ elgg_set_context($context);
$widgettypes = get_widget_types();
- set_context ( 'admin' );
+ elgg_set_context('admin');
// get the entities for the module
$entities = elgg_get_entities(array('type' => 'object', 'subtype' => 'moddefaultwidgets', 'limit' => 9999));
<td colspan="2" align="left" valign="top">
<?php
- if(get_context() == "profile"){
+ if (elgg_get_context() == "profile"){
?>
<h2 class="profile_box"><?php echo elgg_echo("widgets:profilebox"); ?></h2>
<div id="profile_box_widgets">
<td rowspan="2" align="left" valign="top">
<h2><?php echo elgg_echo("widgets:rightcolumn"); ?></h2>
- <div id="rightcolumn_widgets" <?php if(get_context() == "profile")echo "class=\"long\""; ?>>
+ <div id="rightcolumn_widgets" <?php if (elgg_get_context() == "profile") echo "class=\"long\""; ?>>
<?php
$rightcolumn_widgets = "";
if (is_array($area3widgets) && sizeof($area3widgets) > 0) {
require_once(dirname(dirname(dirname(__FILE__))) . "/engine/start.php");
admin_gatekeeper();
-set_context('admin');
+elgg_set_context('admin');
// system diagnostics
$body = elgg_view_title(elgg_echo('diagnostics'));
*/
function diagnostics_pagesetup()
{
- if (get_context() == 'admin' && isadminloggedin()) {
+ if (elgg_get_context() == 'admin' && isadminloggedin()) {
global $CONFIG;
add_submenu_item(elgg_echo('diagnostics'), 'pg/diagnostics/');
}
*/
function ecml_admin_page_handler($page) {
admin_gatekeeper();
- set_context('admin');
+ elgg_set_context('admin');
$content = elgg_view('ecml/admin/ecml_admin');
$body = elgg_view_layout('one_column_with_sidebar', $content);
echo elgg_view_page(elgg_echo('ecml:admin'), $body);
$title = sprintf(elgg_echo("file:friends"),$owner->name);
$area1 = elgg_view('page_elements/content_header', array('context' => "friends", 'type' => 'file'));
- set_context('search');
+ elgg_push_context('search');
// offset is grabbed in list_user_friends_objects
$content = list_user_friends_objects($owner->guid, 'file', 10, false);
- set_context('file');
+ elgg_pop_context();
+
$area1 .= get_filetype_cloud($owner->guid, true);
// handle case where friends don't have any files
}
// Get objects
- set_context('search');
+ elgg_push_context('search');
$offset = (int)get_input('offset', 0);
$area2 .= elgg_list_entities(array('types' => 'object', 'subtypes' => 'file', 'container_guid' => elgg_get_page_owner_guid(), 'limit' => 10, 'offset' => $offset, 'full_view' => FALSE));
- set_context('file');
+ elgg_pop_context();
+
$get_filter = get_filetype_cloud(elgg_get_page_owner_guid());
if ($get_filter) {
$area1 .= $get_filter;
$area1 = get_filetype_cloud();
}
- // Set context
- set_context('search');
+ elgg_push_context('search');
$offset = (int)get_input('offset', 0);
$limit = 10;
$area2 .= elgg_list_entities(array('types' => 'object', 'subtypes' => 'file', 'owner_guid' => $owner_guid, 'limit' => $limit, 'offset' => $offset));
}
- set_context("file");
+ elgg_pop_context();
$content = "<div class='files'>".$area1.$area2."</div>";
$page_owner = elgg_get_page_owner();
// Group submenu option
- if ($page_owner instanceof ElggGroup && get_context() == "groups") {
+ if ($page_owner instanceof ElggGroup && elgg_get_context() == "groups") {
if($page_owner->file_enable != "no"){
add_submenu_item(sprintf(elgg_echo("file:group"),$page_owner->name), $CONFIG->wwwroot . "pg/file/" . $page_owner->username);
}
$title = elgg_echo('untitled');
}
- if (get_context() == "search") { // Start search listing version
+ if (elgg_get_context() == "search") { // Start search listing version
if (get_input('search_viewtype') == "gallery") {
echo "<div class='filerepo_gallery_item'>";
// Get objects
$area1 = elgg_view('page_elements/content_header', array('context' => "everyone", 'type' => 'file'));
$area1 .= get_filetype_cloud(); // the filter
- set_context('search');
+ elgg_push_context('search');
$area2 .= elgg_list_entities(array('types' => 'object', 'subtypes' => 'file', 'limit' => $limit, 'offset' => $offset, 'full_view' => FALSE));
- set_context('file');
+ elgg_pop_context();
//get the latest comments on all files
$comments = get_annotations(0, "object", "file", "generic_comment", "", 0, 4, 0, "desc");
$filter = "newest";
}
- $context = get_context();
+ $context = elgg_get_context();
switch($filter){
case "newest":
$featured_groups = elgg_get_entities_from_metadata(array('metadata_name' => 'featured_group', 'metadata_value' => 'yes', 'types' => 'group', 'limit' => 10));
$area2 .= elgg_view("groups/featured", array("featured" => $featured_groups));
- set_context($context);
+ elgg_set_context($context);
$objects = "<div class='group_listings'>".$objects."</div>";
$area1 = elgg_view('navigation/breadcrumbs');
$area1 .= elgg_view("forum/topics", array('topics' => $topics, 'group_guid' => $group_guid));
-set_context('groups');
+elgg_set_context('groups');
$body = elgg_view_layout('one_column_with_sidebar', $area1);
*/
$group_guid = get_input('group_guid');
- set_context('groups');
+ elgg_set_context('groups');
global $autofeed;
$autofeed = true;
// Get objects
$area1 = elgg_view('page_elements/content_header', array('context' => "everyone", 'type' => 'groups', 'new_link' => "pg/groups/new"));
- set_context('search');
+ elgg_push_context('search');
$objects = elgg_list_entities(array('types' => 'group', 'owner_guid' => elgg_get_page_owner_guid(), 'limit' => $limit, 'offset' => $offset, 'full_view' => FALSE));
- set_context('groups');
+ elgg_pop_context();
$area1 .= $objects;
$body = elgg_view_layout('one_column_with_sidebar', $area1);
// Get objects
$area2 = elgg_view('page_elements/content_header', array('context' => "mine", 'type' => 'groups', 'new_link' => "pg/groups/new"));
- set_context('search');
+ elgg_push_context('search');
// offset is grabbed in the list_entities_from_relationship() function
$objects = list_entities_from_relationship('member',page_owner(),false,'group','',0, $limit,false, false);
- set_context('groups');
+ elgg_pop_context();
$area2 .= $objects;
$body = elgg_view_layout('one_column_with_sidebar', $area1.$area2);
// Get the page owner entity
$page_owner = elgg_get_page_owner();
- if (get_context() == 'groups') {
+ if (elgg_get_context() == 'groups') {
if ($page_owner instanceof ElggGroup) {
if (isloggedin() && $page_owner->canEdit() && !$page_owner->isPublicMembership()) {
$url = elgg_get_site_url()."mod/groups/membershipreq.php?group_guid={$page_owner->getGUID()}";
include($CONFIG->pluginspath . "groups/new.php");
break;
case "world":
- set_context('groups');
+ elgg_set_context('groups');
set_page_owner(0);
include($CONFIG->pluginspath . "groups/all.php");
break;
$u = get_user($last_user);
//select the correct output depending on where you are
-if (get_context() == "search") {
+if (elgg_get_context() == "search") {
var_export($counter);
if($counter == 1){
$info = "<p class='entity_subtext groups'>" . sprintf(elgg_echo('groups:forum:created:single'), $forum_created, $counter) . "<br />";
gatekeeper();
-set_context('friends');
+elgg_set_context('friends');
set_page_owner(get_loggedin_userid());
$body = elgg_view('invitefriends/form');
*/
function invitefriends_pagesetup() {
global $CONFIG;
- if (get_context() == "friends" ||
- get_context() == "friendsof" ||
- get_context() == "collections") {
+ if (elgg_get_context() == "friends" ||
+ elgg_get_context() == "friendsof" ||
+ elgg_get_context() == "collections") {
add_submenu_item(elgg_echo('friends:invite'), "mod/invitefriends/",'invite');
}
}
break;
// search based on name
case "search":
- set_context('search');
+ elgg_set_context('search');
$filter_content = list_user_search($tag);
break;
// search based on tags
global $CONFIG;
//add submenu options
- if (get_context() == "messages") {
+ if (elgg_get_context() == "messages") {
add_submenu_item(elgg_echo('messages:inbox'), "pg/messages/" . get_loggedin_user()->username);
add_submenu_item(elgg_echo('messages:sentmessages'), "mod/messages/sent.php");
}
set_page_owner(get_loggedin_userid());
// Set the context to settings
-set_context('settings');
+elgg_set_context('settings');
// Get the form
$people = array();
set_page_owner(get_loggedin_userid());
// Set the context to settings
-set_context('settings');
+elgg_set_context('settings');
// Get the form
$people = array();
*/
function notifications_plugin_pagesetup() {
global $CONFIG;
- if (get_context() == 'settings') {
+ if (elgg_get_context() == 'settings') {
add_submenu_item(elgg_echo('notifications:subscriptions:changesettings'), "pg/notifications/personal");
if (is_plugin_enabled('groups')) {
add_submenu_item(elgg_echo('notifications:subscriptions:changesettings:groups'), "pg/notifications/group");
global $CONFIG;
gatekeeper();
-set_context('pages');
+elgg_set_context('pages');
//boolean to select correct add to river. It will be new or edit
$which_river = 'new';
// Get objects
-$context = get_context();
-
-set_context('search');
-
+elgg_push_context('search');
$objects = elgg_list_entities(array('types' => 'object', 'subtypes' => 'page_top', 'container_guid' => elgg_get_page_owner_guid(), 'limit' => $limit, 'offset' => $offset, 'full_view' => FALSE));
-
-set_context($context);
+elgg_pop_context();
//get the owners latest welcome message
$welcome_message = elgg_get_entities(array('types' => 'object', 'subtypes' => 'pages_welcome', 'container_guid' => $owner->guid, 'limit' => 1));
$page_owner = elgg_get_page_owner();
// Group submenu option
- if ($page_owner instanceof ElggGroup && get_context() == 'groups') {
+ if ($page_owner instanceof ElggGroup && elgg_get_context() == 'groups') {
if($page_owner->pages_enable != "no"){
add_submenu_item(sprintf(elgg_echo("pages:group"),$page_owner->name), "pg/pages/owned/" . $page_owner->username);
}
*/
function pages_container_permission_check($hook, $entity_type, $returnvalue, $params) {
- if (get_context() == "pages") {
+ if (elgg_get_context() == "pages") {
if (elgg_get_page_owner_guid()) {
if (can_write_to_container(get_loggedin_userid(), elgg_get_page_owner_guid())) return true;
}
require_once(dirname(dirname(dirname(__FILE__))) . "/engine/start.php");
$page_guid = get_input('page_guid');
-set_context('pages');
+elgg_set_context('pages');
if (is_callable('group_gatekeeper')) {
group_gatekeeper();
$title = sprintf(elgg_echo("pages:all"),elgg_get_page_owner()->name);
// Get objects
-$context = get_context();
-
-set_context('search');
-
+elgg_push_context('search');
$objects = elgg_list_entities(array('types' => 'object', 'subtypes' => 'page_top', 'limit' => $limit, 'offset' => $offset, 'full_view' => FALSE));
-
-set_context($context);
+elgg_pop_context();
$body = elgg_view_title($title);
$body .= $objects;
$area1 = elgg_view_title(elgg_echo('profile:edit'));
$area1 .= elgg_view("profile/edit",array('entity' => $user));
-set_context('profile_edit');
+elgg_set_context('profile_edit');
// get the required canvas area
$body = elgg_view_layout("one_column_with_sidebar", $area1);
$area1 = elgg_view_title(elgg_echo('profile:createicon:header'));
$area1 .= elgg_view("profile/edit_icon", array('user' => $user));
-set_context('profile_edit');
+elgg_set_context('profile_edit');
// Get the form and correct canvas area
$body = elgg_view_layout("one_column_with_sidebar", $area1);
global $CONFIG;
//add submenu options
- if (get_context() == "profile") {
+ if (elgg_get_context() == "profile") {
$page_owner = elgg_get_page_owner();
if ($page_owner && $page_owner->canEdit()) {
add_submenu_item(elgg_echo('profile:editdetails'), "pg/profile/{$page_owner->username}/edit/details");
$sidebar = '';
}
-set_context('riverdashboard');
+elgg_set_context('riverdashboard');
if (empty($callback)) {
$body .= elgg_view('riverdashboard/container', array('body' => $nav . $extend . $river . elgg_view('riverdashboard/js')));
//user
//if displaying on the profile get the object owner, else the subject_guid
-if (get_context() == 'profile' && $object->getSubtype() == 'thewire') {
+if (elgg_get_context() == 'profile' && $object->getSubtype() == 'thewire') {
$user = get_entity($object->owner_guid);
} else {
$user = get_entity($vars['item']->subject_guid);
//Load the front page\r
$content = elgg_view('sitepages/welcome');\r
$content .= elgg_view_title(elgg_echo('content:latest'));\r
-set_context('search');\r
+\r
+elgg_set_context('search');\r
$offset = (int)get_input('offset', 0);\r
if(is_plugin_enabled('riverdashboard')){\r
$items = elgg_view_river_items(0, 0, "", "", "", '', 10, 0, 0, true, false);\r
}else{\r
$content .= elgg_list_registered_entities(array('limit' => 10, 'offset' => $offset, 'full_view' => FALSE, 'allowed_types' => array('object','group')));\r
}\r
-set_context('main');\r
+elgg_set_context('main');\r
+\r
global $autofeed;\r
$autofeed = FALSE;\r
\r
*/
function sitepages_custom_index() {
// context is checked by the extended metatags view to print out its custom CSS
- //$context = get_context();
- //set_context('sitepages:front');
+ //$context = elgg_get_context();
+ //elgg_set_context('sitepages:front');
//if ($contents = elgg_view('sitepages/custom_frontpage')) {
// echo elgg_view_page(FALSE, $contents);
- // set_context($context);
+ // elgg_set_context($context);
// return TRUE to tell index.php we've got its content right here.
// return TRUE;
//}
- //set_context($context);
+ //elgg_set_context($context);
// return NULL to pass this to next in chain, or back to standard index.php.
//return NULL;
}
// only show on the custom front page.
-if (get_context() == 'sitepages:front') {
+if (elgg_get_context() == 'sitepages:front') {
$custom_css = sitepages_get_sitepage_object('front');
if ($custom_css && $custom_css->css) {
<?php
- $num_items = $vars['entity']->num_items;
- if (!isset($num_items)) $num_items = 30;
+$num_items = $vars['entity']->num_items;
+if (!isset($num_items)) {
+ $num_items = 30;
+}
- $prev_context = get_context();
- echo display_tagcloud(1, $num_items, 'tags', '', '', elgg_get_page_owner_guid());
- set_context($prev_context);
-?>
+echo display_tagcloud(1, $num_items, 'tags', '', '', elgg_get_page_owner_guid());
global $CONFIG;
//add submenu options
- if (get_context() == "thewire") {
+ if (elgg_get_context() == "thewire") {
if ((elgg_get_page_owner_guid() == get_loggedin_userid() || !elgg_get_page_owner_guid()) && isloggedin()) {
add_submenu_item(elgg_echo('thewire:read'),$CONFIG->wwwroot."pg/thewire/" . get_loggedin_user()->username);
add_submenu_item(elgg_echo('thewire:everyone'),$CONFIG->wwwroot."mod/thewire/everyone.php");
// disable user to prevent showing up on the site
// set context to our canEdit() override works
- $context = get_context();
- set_context('uservalidationbyemail_new_user');
+ elgg_push_context('uservalidationbyemail_new_user');
$hidden_entities = access_get_show_hidden_status();
access_show_hidden_entities(TRUE);
uservalidationbyemail_set_user_validation_status($user->guid, FALSE);
uservalidationbyemail_request_validation($user->guid);
- set_context($context);
+ elgg_pop_context();
access_show_hidden_entities($hidden_entities);
return TRUE;
return NULL;
}
- $context = get_context();
+ $context = elgg_get_context();
if ($context == 'uservalidationbyemail_new_user' || $context = 'uservalidationbyemail_validate_user') {
return TRUE;
}
if (($code) && ($user)) {
if (uservalidationbyemail_validate_email($user_guid, $code)) {
- $context = get_context();
- set_context('uservalidationbyemail_validate_user');
-
+ elgg_push_context('uservalidationbyemail_validate_user');
system_message(elgg_echo('email:confirm:success'));
-
$user = get_entity($user_guid);
$user->enable();
+ elgg_pop_context();
- set_context($context);
login($user);
} else {
register_error(elgg_echo('email:confirm:fail'));
gatekeeper();
// Set context and title
-set_context('dashboard');
+elgg_set_context('dashboard');
set_page_owner(get_loggedin_userid());
$title = elgg_echo('dashboard');
if (is_plugin_enabled('riverdashboard')) {
$title = elgg_view_title(elgg_echo('content:latest'));
- set_context('search');
+ elgg_set_context('search');
$content = elgg_list_registered_entities(array('limit' => 10, 'full_view' => FALSE,
'allowed_types' => array('object','group')));
- set_context('latest');
+ elgg_set_context('latest');
} else {
$content = "Riverdashboard not loaded";
}
$context = get_input('context');
if ($context) {
- set_context($context);
+ elgg_set_context($context);
}
// Get the entity, if possible
* @subpackage Core
*/
-set_context('search');
+elgg_push_context('search');
$area2 = elgg_list_entities();
-set_context('entities');
+elgg_pop_context();
$body = elgg_view_layout('two_column_left_sidebar', $area1, $area2);
// users online
if( (is_plugin_enabled('search')) && (is_plugin_enabled('profile')) ) {
- get_context('search');
+ elgg_push_context('search');
$users_online = get_online_users();
- get_context('admin');
+ elgg_pop_context();
?>
<div class="admin_settings members_list users_online">
<?php
// users online
if ((is_plugin_enabled('search')) && (is_plugin_enabled('profile'))) {
- get_context('search');
+ elgg_push_context('search');
$users_online = get_online_users();
- get_context('admin');
+ elgg_pop_context();
echo elgg_view_title(elgg_echo('admin:users'));
?>
$string .= elgg_echo("{$subtype}:river:annotate") . " <a href=\"{$object->getURL()}\">" . $title . "</a> <span class='entity_subtext'>" . elgg_view_friendly_time($object->time_created) . "<a class='river_comment_form_button link'>Comment</a>";
$string .= elgg_view('likes/forms/link', array('entity' => $object));
$string .= "</span>";
-if (get_context() != 'riverdashboard') {
+if (elgg_get_context() != 'riverdashboard') {
$comment = elgg_get_excerpt($comment, 200);
if ($comment) {
$string .= "<div class='river_content_display'>";
$owner = elgg_get_page_owner();
- $area1widgets = get_widgets(elgg_get_page_owner_guid(),get_context(),1);
- $area2widgets = get_widgets(elgg_get_page_owner_guid(),get_context(),2);
- $area3widgets = get_widgets(elgg_get_page_owner_guid(),get_context(),3);
+ $area1widgets = get_widgets(elgg_get_page_owner_guid(), elgg_get_context(), 1);
+ $area2widgets = get_widgets(elgg_get_page_owner_guid(), elgg_get_context(), 2);
+ $area3widgets = get_widgets(elgg_get_page_owner_guid(), elgg_get_context(), 3);
if (empty($area1widgets) && empty($area2widgets) && empty($area3widgets)) {
if(get_loggedin_userid() == elgg_get_page_owner_guid() || ($owner instanceof ElggGroup && $owner->canEdit())){
- if(get_context() == "profile") {
+ if (elgg_get_context() == "profile") {
?>
<!-- add remove widget button -->
<div class="add_widgets" style="margin:-18px 0 10px;">
<td colspan="2" align="left" valign="top">
<?php
-if(get_context() != "profile"){ /* on groups */
+if (elgg_get_context() != "profile") { /* on groups */
?>
<h2 class="profile_box"><?php echo elgg_echo("widgets:profilebox"); ?></h2>
<td rowspan="2" align="left" valign="top">
<h2><?php echo elgg_echo("widgets:rightcolumn"); ?></h2>
- <div id="rightcolumn_widgets" <?php if(get_context() != "profile")echo "class=\"long\""; ?> >
+ <div id="rightcolumn_widgets" <?php if (elgg_get_context() != "profile") echo "class=\"long\""; ?> >
<?php
$rightcolumn_widgets = "";
if (is_array($area3widgets) && sizeof($area3widgets) > 0) {
<textarea type="textarea" value="Middle widgets" style="display:none" name="debugField2" id="debugField2" /><?php echo $middlecolumn_widgets; ?></textarea>
<textarea type="textarea" value="Right widgets" style="display:none" name="debugField3" id="debugField3" /><?php echo $rightcolumn_widgets; ?></textarea>
-<input type="hidden" name="context" value="<?php echo get_context(); ?>" />
+<input type="hidden" name="context" value="<?php echo elgg_get_context(); ?>" />
<input type="hidden" name="owner" value="<?php echo elgg_get_page_owner_guid(); ?>" />
<input type="submit" onfocus="blur()" value="<?php echo elgg_echo('save'); ?>" class="submit_button" onclick="$('a.Action_Button.toggle_customise_edit_panel').click();" />
<input type="button" onfocus="blur()" value="<?php echo elgg_echo('cancel'); ?>" class="cancel_button" onclick="$('a.Action_Button.toggle_customise_edit_panel').click();" />
<?php
if(get_loggedin_userid() == elgg_get_page_owner_guid() || ($owner instanceof ElggGroup && $owner->canEdit())){
- if(get_context() != "profile") {
+ if (elgg_get_context() != "profile") {
?>
<!-- customise page button appears in different place on groups widgets -->
<div class="add_widgets">
$currentpage = ceil($offset / $limit) + 1;
//only display if there is content to paginate through or if we already have an offset
-if (($count > $limit || $offset > 0) && get_context() != 'widget') {
+if (($count > $limit || $offset > 0) && elgg_get_context() != 'widget') {
?>
$nav_html = '';
$more_nav_html = '';
-$context = get_context();
+$context = elgg_get_context();
// sort more links alphabetically
$more_sorted = array();
* @uses $vars['subtype'] Entity subtype
*/
-$context = get_context();
+$context = elgg_get_context();
if (!empty($vars['subtype'])) {
$subtype = "&entity_subtype=" . urlencode($vars['subtype']);
$tab_list = '';
} else {
// @todo remove the hard coded reference to the videolist plugin
- if (get_context() == "videolist"){
+ if (elgg_get_context() == "videolist"){
$video_link = elgg_get_site_url() . "pg/videolist/browse/$username/";
$new_button = "<a href=\"{$video_link}\" class='action_button'>" . elgg_echo('videolist:browsemenu') . '</a>';
} else {
// also hide the tabs if in a group context (ie, listing groups) or
// when viewing tools belonging to a group
- if (get_context() == 'groups' || $page_owner instanceof ElggGroup) {
+ if (elgg_get_context() == 'groups' || $page_owner instanceof ElggGroup) {
$tab_list = '';
}
}
$.post($("#widgetform<?php echo $guid; ?>").attr("action"),variables,function() {
$("#submit<?php echo $guid; ?>").attr("disabled","");
$("#submit<?php echo $guid; ?>").attr("value","<?php echo elgg_echo("save"); ?>");
- $("#widgetcontent<?php echo $guid; ?>").load("<?php echo elgg_get_site_url(); ?>pg/view/<?php echo $guid; ?>?shell=no&username=<?php echo elgg_get_page_owner()->username; ?>&context=<?php echo get_context(); ?>&callback=true");
+ $("#widgetcontent<?php echo $guid; ?>").load("<?php echo elgg_get_site_url(); ?>pg/view/<?php echo $guid; ?>?shell=no&username=<?php echo elgg_get_page_owner()->username; ?>&context=<?php echo elgg_get_context(); ?>&callback=true");
});
return false;