function guid_to_uuid($guid) {
global $CONFIG;
- return $CONFIG->wwwroot . "export/opendd/$guid/";
+ return elgg_get_site_url() . "export/opendd/$guid/";
}
/**
function is_uuid_this_domain($uuid) {
global $CONFIG;
- if (strpos($uuid, $CONFIG->wwwroot) === 0) {
+ if (strpos($uuid, elgg_get_site_url()) === 0) {
return true;
}
if ($url == "") {
$nameid = $relationship->id;
- $url = $CONFIG->wwwroot . "export/$view/$guid/relationship/$nameid/";
+ $url = elgg_get_site_url() . "export/$view/$guid/relationship/$nameid/";
}
return $url;
),
'wwwroot' => array(
'type' => 'text',
- 'value' => $CONFIG->wwwroot,
+ 'value' => elgg_get_site_url(),
'required' => TRUE,
),
'path' => array(
protected function getNextStepUrl($currentStep) {
global $CONFIG;
$nextStep = $this->getNextStep($currentStep);
- return "{$CONFIG->wwwroot}install.php?step=$nextStep";
+ return elgg_get_site_url()."install.php?step=$nextStep";
}
/**
}
if ($this->status['settings'] == FALSE) {
- forward("{$CONFIG->wwwroot}install.php?step=settings");
+ forward(elgg_get_site_url()."install.php?step=settings");
}
if ($this->status['admin'] == FALSE) {
- forward("{$CONFIG->wwwroot}install.php?step=admin");
+ forward(elgg_get_site_url()."install.php?step=admin");
}
// everything appears to be set up
- forward("{$CONFIG->wwwroot}install.php?step=complete");
+ forward(elgg_get_site_url()."install.php?step=complete");
}
/**
require_once(dirname(__FILE__) . "/ElggRewriteTester.php");
$tester = new ElggRewriteTester();
- $url = "{$CONFIG->wwwroot}rewrite.php";
+ $url = elgg_get_site_url()."rewrite.php";
$report['rewrite'] = array($tester->run($url, $CONFIG->path));
}
global $CONFIG;
require_once dirname(__FILE__) . '/blog_lib.php';
- add_menu(elgg_echo('blog:blogs'), "{$CONFIG->wwwroot}pg/blog/", array());
+ add_menu(elgg_echo('blog:blogs'), elgg_get_site_url()."pg/blog/", array());
// run the setup upon activations or to upgrade old installations.
run_function_once('blog_runonce', '1269370108');
$page_owner = elgg_get_page_owner();
}
- $link = $CONFIG->wwwroot . 'pg/blog/' . $page_owner->username . '/archive/' . $timestamplow . '/' . $timestamphigh;
+ $link = elgg_get_site_url() . 'pg/blog/' . $page_owner->username . '/archive/' . $timestamplow . '/' . $timestamphigh;
$month = sprintf(elgg_echo('date:month:' . substr($date,4,2)), substr($date, 0, 4));
echo "<li><a href=\"$link\" title=\"$month\">$month</a></li>";
}
global $CONFIG;
//add a tools menu option
- add_menu(elgg_echo('bookmarks'), $CONFIG->wwwroot . 'pg/bookmarks');
+ add_menu(elgg_echo('bookmarks'), elgg_get_site_url() . 'pg/bookmarks');
// Register a page handler, so we can have nice URLs
register_page_handler('bookmarks', 'bookmarks_page_handler');
if (isloggedin()) {
if ($page_owner instanceof ElggGroup && get_context() == 'groups') {
if ($page_owner->bookmarks_enable != "no") {
- //add_submenu_item(sprintf(elgg_echo("bookmarks:group"),$page_owner->name), $CONFIG->wwwroot . "pg/bookmarks/" . $page_owner->username . '/items');
+ //add_submenu_item(sprintf(elgg_echo("bookmarks:group"),$page_owner->name), elgg_get_site_url() . "pg/bookmarks/" . $page_owner->username . '/items');
}
}
}
$descr = $entity->description;
$title = $entity->title;
global $CONFIG;
- $url = $CONFIG->wwwroot . "pg/view/" . $entity->guid;
+ $url = elgg_get_site_url() . "pg/view/" . $entity->guid;
if ($method == 'sms') {
$owner = $entity->getOwnerEntity();
return $owner->name . ' ' . elgg_echo("bookmarks:via") . ': ' . $url . ' (' . $title . ')';
if (isset($CONFIG->debug)) {
// create a button to run tests
- $js = "onclick=\"window.location='{$CONFIG->wwwroot}engine/tests/suite.php'\"";
+ $js = "onclick=\"window.location='".elgg_get_site_url()."engine/tests/suite.php'\"";
$params = array('type' => 'button', 'value' => elgg_echo('diagnostics:test:executeall'), 'js' => $js);
$test_body .= elgg_view('input/button', $params);
} else {
{
if (get_context() == 'admin' && isadminloggedin()) {
global $CONFIG;
- add_submenu_item(elgg_echo('diagnostics'), $CONFIG->wwwroot . 'pg/diagnostics/');
+ add_submenu_item(elgg_echo('diagnostics'), elgg_get_site_url() . 'pg/diagnostics/');
}
}
if (!$file = get_entity($guid)) {
register_error(elgg_echo("file:uploadfailed"));
- forward($CONFIG->wwwroot . "pg/file/" . get_loggedin_user()->username);
+ forward(elgg_get_site_url() . "pg/file/" . get_loggedin_user()->username);
exit;
}
else
register_error(elgg_echo("file:uploadfailed"));
- forward($CONFIG->wwwroot . "pg/file/" . $container->username);
+ forward(elgg_get_site_url() . "pg/file/" . $container->username);
?>
\ No newline at end of file
if (!$ajax) {
$container_user = get_entity($container_guid);
- forward($CONFIG->wwwroot . "pg/file/" . $container_user->username);
+ forward(elgg_get_site_url() . "pg/file/" . $container_user->username);
}
} else {
global $CONFIG;
// Set up menu (tools dropdown)
- add_menu(elgg_echo('files'), $CONFIG->wwwroot . "pg/file/");
+ add_menu(elgg_echo('files'), elgg_get_site_url() . "pg/file/");
// Extend CSS
elgg_extend_view('css', 'file/css');
$descr = $entity->description;
$title = $entity->title;
global $CONFIG;
- $url = $CONFIG->wwwroot . "pg/view/" . $entity->guid;
+ $url = elgg_get_site_url() . "pg/view/" . $entity->guid;
if ($method == 'sms') {
$owner = $entity->getOwnerEntity();
return $owner->name . ' ' . elgg_echo("file:via") . ': ' . $url . ' (' . $title . ')';
} else {
$ext = '';
}
- echo "<img src=\"{$CONFIG->wwwroot}mod/file/graphics/icons/application{$ext}.gif\" border=\"0\" />";
+ echo "<img src=\"".elgg_get_site_url()."mod/file/graphics/icons/application{$ext}.gif\" border=\"0\" />";
?>
\ No newline at end of file
} else {
$ext = '';
}
- echo "<img src=\"{$CONFIG->wwwroot}mod/file/graphics/icons/excel{$ext}.gif\" border=\"0\" />";
+ echo "<img src=\"".elgg_get_site_url()."mod/file/graphics/icons/excel{$ext}.gif\" border=\"0\" />";
?>
\ No newline at end of file
} else {
$ext = '';
}
- echo "<img src=\"{$CONFIG->wwwroot}mod/file/graphics/icons/word{$ext}.gif\" border=\"0\" />";
+ echo "<img src=\"".elgg_get_site_url()."mod/file/graphics/icons/word{$ext}.gif\" border=\"0\" />";
?>
\ No newline at end of file
} else {
$ext = '';
}
- echo "<img src=\"{$CONFIG->wwwroot}mod/file/graphics/icons/pdf{$ext}.gif\" border=\"0\" />";
+ echo "<img src=\"".elgg_get_site_url()."mod/file/graphics/icons/pdf{$ext}.gif\" border=\"0\" />";
?>
\ No newline at end of file
} else {
$ext = '';
}
- echo "<img src=\"{$CONFIG->wwwroot}mod/file/graphics/icons/ppt{$ext}.gif\" border=\"0\" />";
+ echo "<img src=\"".elgg_get_site_url()."mod/file/graphics/icons/ppt{$ext}.gif\" border=\"0\" />";
?>
\ No newline at end of file
} else {
$ext = '';
}
- echo "<img src=\"{$CONFIG->wwwroot}mod/file/graphics/icons/excel{$ext}.gif\" border=\"0\" />";
+ echo "<img src=\"".elgg_get_site_url()."mod/file/graphics/icons/excel{$ext}.gif\" border=\"0\" />";
?>
\ No newline at end of file
} else {
$ext = '';
}
- echo "<img src=\"{$CONFIG->wwwroot}mod/file/graphics/icons/ppt{$ext}.gif\" border=\"0\" />";
+ echo "<img src=\"".elgg_get_site_url()."mod/file/graphics/icons/ppt{$ext}.gif\" border=\"0\" />";
?>
\ No newline at end of file
} else {
$ext = '';
}
- echo "<img src=\"{$CONFIG->wwwroot}mod/file/graphics/icons/openoffice{$ext}.gif\" border=\"0\" />";
+ echo "<img src=\"".elgg_get_site_url()."mod/file/graphics/icons/openoffice{$ext}.gif\" border=\"0\" />";
?>
\ No newline at end of file
} else {
$ext = '';
}
- echo "<img src=\"{$CONFIG->wwwroot}mod/file/graphics/icons/archive{$ext}.gif\" border=\"0\" />";
+ echo "<img src=\"".elgg_get_site_url()."mod/file/graphics/icons/archive{$ext}.gif\" border=\"0\" />";
?>
\ No newline at end of file
} else {
$ext = '';
}
- echo "<img src=\"{$CONFIG->wwwroot}mod/file/graphics/icons/music{$ext}.gif\" border=\"0\" />";
+ echo "<img src=\"".elgg_get_site_url()."mod/file/graphics/icons/music{$ext}.gif\" border=\"0\" />";
?>
\ No newline at end of file
} else {
$ext = '';
}
- echo "{$CONFIG->wwwroot}mod/file/graphics/icons/general{$ext}.gif";
+ echo elgg_get_site_url()."mod/file/graphics/icons/general{$ext}.gif";
?>
\ No newline at end of file
} else {
$ext = '';
}
- echo "<img src=\"{$CONFIG->wwwroot}mod/file/graphics/icons/text{$ext}.gif\" border=\"0\" />";
+ echo "<img src=\"".elgg_get_site_url()."mod/file/graphics/icons/text{$ext}.gif\" border=\"0\" />";
?>
\ No newline at end of file
} else {
$ext = '';
}
- echo "<img src=\"{$CONFIG->wwwroot}mod/file/graphics/icons/vcard{$ext}.gif\" border=\"0\" />";
+ echo "<img src=\"".elgg_get_site_url()."mod/file/graphics/icons/vcard{$ext}.gif\" border=\"0\" />";
?>
\ No newline at end of file
} else {
$ext = '';
}
- echo "<img src=\"{$CONFIG->wwwroot}mod/file/graphics/icons/video{$ext}.gif\" border=\"0\" />";
+ echo "<img src=\"".elgg_get_site_url()."mod/file/graphics/icons/video{$ext}.gif\" border=\"0\" />";
?>
\ No newline at end of file
// Forward to the group forum page
global $CONFIG;
- $url = $CONFIG->wwwroot . "pg/groups/forum/{$group_guid}/";
+ $url = elgg_get_site_url() . "pg/groups/forum/{$group_guid}/";
forward($url);
}
register_error(elgg_echo("groupstopic:notdeleted"));
}
// Forward to the group forum page
- $url = $CONFIG->wwwroot . "pg/groups/forum/{$group_guid}/";
+ $url = elgg_get_site_url() . "pg/groups/forum/{$group_guid}/";
forward($url);
}
}
// Forward to the discussion
global $CONFIG;
-$url = $CONFIG->wwwroot . "mod/groups/topicposts.php?topic={$topic_guid}&group_guid={$group_guid}/";
+$url = elgg_get_site_url() . "mod/groups/topicposts.php?topic={$topic_guid}&group_guid={$group_guid}/";
forward($url);
\r
// set up breadcrumbs\r
$group = get_entity($group_guid);\r
-elgg_push_breadcrumb(elgg_echo('groups'), $CONFIG->wwwroot."pg/groups/world/");\r
+elgg_push_breadcrumb(elgg_echo('groups'), elgg_get_site_url()."pg/groups/world/");\r
elgg_push_breadcrumb($group->name, $group->getURL());\r
elgg_push_breadcrumb(elgg_echo('groups:activity'));\r
\r
// set up breadcrumbs
$group = get_entity($group_guid);
-elgg_push_breadcrumb(elgg_echo('groups'), $CONFIG->wwwroot."pg/groups/world/");
+elgg_push_breadcrumb(elgg_echo('groups'), elgg_get_site_url()."pg/groups/world/");
elgg_push_breadcrumb($group->name, $group->getURL());
elgg_push_breadcrumb(elgg_echo('item:object:groupforumtopic'));
global $CONFIG;
// Set up the menu
- add_menu(elgg_echo('groups'), $CONFIG->wwwroot . "pg/groups/world/");
+ add_menu(elgg_echo('groups'), elgg_get_site_url() . "pg/groups/world/");
// Register a page handler, so we can have nice URLs
register_page_handler('groups','groups_page_handler');
if (get_context() == 'groups') {
if ($page_owner instanceof ElggGroup) {
if (isloggedin() && $page_owner->canEdit() && !$page_owner->isPublicMembership()) {
- $url = "{$CONFIG->wwwroot}mod/groups/membershipreq.php?group_guid={$page_owner->getGUID()}";
+ $url = elgg_get_site_url()."mod/groups/membershipreq.php?group_guid={$page_owner->getGUID()}";
add_submenu_item(elgg_echo('groups:membershiprequests'), $url, 'groupsactions1');
}
} else {
- add_submenu_item(elgg_echo('groups:all'), "{$CONFIG->wwwroot}pg/groups/world/", 'groupslinks1');
+ add_submenu_item(elgg_echo('groups:all'), elgg_get_site_url()."pg/groups/world/", 'groupslinks1');
if ($user = get_loggedin_user()) {
- add_submenu_item(elgg_echo('groups:owned'), "{$CONFIG->wwwroot}pg/groups/owned/$user->username", 'groupslinks1');
- add_submenu_item(elgg_echo('groups:yours'), "{$CONFIG->wwwroot}pg/groups/member/$user->username", 'groupslinks1');
- add_submenu_item(elgg_echo('groups:invitations'), "{$CONFIG->wwwroot}pg/groups/invitations/$user->username", 'groupslinks1');
+ add_submenu_item(elgg_echo('groups:owned'), elgg_get_site_url()."pg/groups/owned/$user->username", 'groupslinks1');
+ add_submenu_item(elgg_echo('groups:yours'), elgg_get_site_url()."pg/groups/member/$user->username", 'groupslinks1');
+ add_submenu_item(elgg_echo('groups:invitations'), elgg_get_site_url()."pg/groups/invitations/$user->username", 'groupslinks1');
}
}
}
function group_topicpost_url($annotation) {
if ($parent = get_entity($annotation->entity_guid)) {
global $CONFIG;
- return $CONFIG->wwwroot . 'mod/groups/topicposts.php?topic='.$parent->guid.'&group_guid='.$parent->container_guid.'#' . $annotation->id;
+ return elgg_get_site_url() . 'mod/groups/topicposts.php?topic='.$parent->guid.'&group_guid='.$parent->container_guid.'#' . $annotation->id;
}
}
$group = get_entity($group_guid);
$access_id = $group->group_acl;
$options = group_access_options($group);
- elgg_push_breadcrumb(elgg_echo('groups'), $CONFIG->wwwroot."pg/groups/world/");
+ elgg_push_breadcrumb(elgg_echo('groups'), elgg_get_site_url()."pg/groups/world/");
elgg_push_breadcrumb($group->name, $group->getURL());
- elgg_push_breadcrumb(elgg_echo('item:object:groupforumtopic'), $CONFIG->wwwroot."pg/groups/forum/{$group_guid}/");
+ elgg_push_breadcrumb(elgg_echo('item:object:groupforumtopic'), elgg_get_site_url()."pg/groups/forum/{$group_guid}/");
elgg_push_breadcrumb(elgg_echo("groups:addtopic"));
echo elgg_view('navigation/breadcrumbs');
// set up breadcrumbs
$group_guid = get_input('group_guid');
$group = get_entity($group_guid);
-elgg_push_breadcrumb(elgg_echo('groups'), $CONFIG->wwwroot."pg/groups/world/");
+elgg_push_breadcrumb(elgg_echo('groups'), elgg_get_site_url()."pg/groups/world/");
elgg_push_breadcrumb($group->name, $group->getURL());
-elgg_push_breadcrumb(elgg_echo('item:object:groupforumtopic'), $CONFIG->wwwroot."pg/groups/forum/{$vars['entity']->container_guid}");
+elgg_push_breadcrumb(elgg_echo('item:object:groupforumtopic'), elgg_get_site_url()."pg/groups/forum/{$vars['entity']->container_guid}");
elgg_push_breadcrumb($vars['entity']->title);
echo elgg_view('navigation/breadcrumbs');
continue;
}
- $link = $CONFIG->wwwroot . 'pg/register?friend_guid=' . $current_user->guid . '&invitecode=' . generate_invite_code($current_user->username);
+ $link = elgg_get_site_url() . 'pg/register?friend_guid=' . $current_user->guid . '&invitecode=' . generate_invite_code($current_user->username);
$message = sprintf(elgg_echo('invitefriends:email'),
$CONFIG->site->name,
$current_user->name,
if (get_context() == "friends" ||
get_context() == "friendsof" ||
get_context() == "collections") {
- add_submenu_item(elgg_echo('friends:invite'),$CONFIG->wwwroot."mod/invitefriends/",'invite');
+ add_submenu_item(elgg_echo('friends:invite'),elgg_get_site_url()."mod/invitefriends/",'invite');
}
}
$tag = get_input('tag');
// friends links
-$area1 = "<ul class='submenu page_navigation'><li><a href=\"" . $CONFIG->wwwroot."pg/friends/" . elgg_get_page_owner()->username . "\">". elgg_echo('friends') . "</a></li>";
-$area1 .= "<li><a href=\"" . $CONFIG->wwwroot."pg/friendsof/" . elgg_get_page_owner()->username . "\">". elgg_echo('friends:of') . "</a></li>";
-$area1 .= "<li class='selected'><a href=\"" . $CONFIG->wwwroot."mod/members/index.php\">". elgg_echo('members:browse') . "</a></li>";
+$area1 = "<ul class='submenu page_navigation'><li><a href=\"" . elgg_get_site_url()."pg/friends/" . elgg_get_page_owner()->username . "\">". elgg_echo('friends') . "</a></li>";
+$area1 .= "<li><a href=\"" . elgg_get_site_url()."pg/friendsof/" . elgg_get_page_owner()->username . "\">". elgg_echo('friends:of') . "</a></li>";
+$area1 .= "<li class='selected'><a href=\"" . elgg_get_site_url()."mod/members/index.php\">". elgg_echo('members:browse') . "</a></li>";
$area1 .= "</ul>";
//search members
elgg_echo('messageboard:email:body'),
$poster->name,
$message,
- $CONFIG->wwwroot . "pg/messageboard/" . $owner->username,
+ elgg_get_site_url() . "pg/messageboard/" . $owner->username,
$poster->name,
$poster->getURL()
);
// Set the page title
$area2 = "<div id='content_header'><div class='content_header_title'>";
$area2 .= elgg_view_title(elgg_echo("messages:inbox"))."</div>";
-$area2 .= "<div class='content_header_options'><a class='action_button' href='{$CONFIG->wwwroot}mod/messages/send.php'>" . elgg_echo('messages:compose') . "</a></div></div>";
+$area2 .= "<div class='content_header_options'><a class='action_button' href='".elgg_get_site_url()."mod/messages/send.php'>" . elgg_echo('messages:compose') . "</a></div></div>";
// Display them. The last variable 'page_view' is to allow the view page to know where this data is coming from,
// in this case it is the inbox, this is necessary to ensure the correct display
// Set the page title
$area2 = "<div id='content_header'><div class='content_header_title'>";
$area2 .= elgg_view_title(elgg_echo("messages:sentmessages"))."</div>";
-$area2 .= "<div class='content_header_options'><a class='action_button' href='{$CONFIG->wwwroot}mod/messages/send.php'>" . elgg_echo('messages:compose') . "</a></div></div>";
+$area2 .= "<div class='content_header_options'><a class='action_button' href='".elgg_get_site_url()."mod/messages/send.php'>" . elgg_echo('messages:compose') . "</a></div></div>";
// Set content
$area2 .= elgg_view("messages/forms/view",array('entity' => $messages, 'page_view' => "sent", 'limit' => $limit, 'offset' => $offset));
//add submenu options
if (get_context() == "messages") {
- add_submenu_item(elgg_echo('messages:inbox'), $CONFIG->wwwroot . "pg/messages/" . get_loggedin_user()->username);
- add_submenu_item(elgg_echo('messages:sentmessages'), $CONFIG->wwwroot . "mod/messages/sent.php");
+ add_submenu_item(elgg_echo('messages:inbox'), elgg_get_site_url() . "pg/messages/" . get_loggedin_user()->username);
+ add_submenu_item(elgg_echo('messages:sentmessages'), elgg_get_site_url() . "mod/messages/sent.php");
}
// Extend system CSS with our own styles, which are defined in the shouts/css view
elgg_echo('messages:email:body'),
get_loggedin_user()->name,
strip_tags($parameters['entity']->description),
- $CONFIG->wwwroot . "pg/messages/" . $user->username,
+ elgg_get_site_url() . "pg/messages/" . $user->username,
get_loggedin_user()->name,
- $CONFIG->wwwroot . "mod/messages/send.php?send_to=" . get_loggedin_userid()
+ elgg_get_site_url() . "mod/messages/send.php?send_to=" . get_loggedin_userid()
);
} else if ($parameters['method'] == 'site') return false;*/
}
elgg_echo('messages:email:body'),
get_loggedin_user()->name,
$message_contents,
- $CONFIG->wwwroot . "pg/messages/" . $user->username,
+ elgg_get_site_url() . "pg/messages/" . $user->username,
get_loggedin_user()->name,
- $CONFIG->wwwroot . "mod/messages/send.php?send_to=" . get_loggedin_userid()
+ elgg_get_site_url() . "mod/messages/send.php?send_to=" . get_loggedin_userid()
)
);
$body = elgg_view('input/form',array(
'body' => $form_body,
'method' => 'post',
- 'action' => $CONFIG->wwwroot . 'action/notificationsettings/groupsave'
+ 'action' => elgg_get_site_url() . 'action/notificationsettings/groupsave'
));
// Insert it into the correct canvas layout
function notifications_plugin_pagesetup() {
global $CONFIG;
if (get_context() == 'settings') {
- add_submenu_item(elgg_echo('notifications:subscriptions:changesettings'), $CONFIG->wwwroot . "pg/notifications/personal");
+ add_submenu_item(elgg_echo('notifications:subscriptions:changesettings'), elgg_get_site_url() . "pg/notifications/personal");
if (is_plugin_enabled('groups')) {
- add_submenu_item(elgg_echo('notifications:subscriptions:changesettings:groups'), $CONFIG->wwwroot . "pg/notifications/group");
+ add_submenu_item(elgg_echo('notifications:subscriptions:changesettings:groups'), elgg_get_site_url() . "pg/notifications/group");
}
}
}
$owner = elgg_get_page_owner();
if (!($owner instanceof ElggGroup)) {
add_submenu_item(sprintf(elgg_echo("pages:user"), elgg_get_page_owner()->name), $CONFIG->url . "pg/pages/owned/" . elgg_get_page_owner()->username, 'pageslinksgeneral');
- add_submenu_item(elgg_echo('pages:all'),$CONFIG->wwwroot."mod/pages/world.php", 'pageslinksgeneral');
+ add_submenu_item(elgg_echo('pages:all'),elgg_get_site_url()."mod/pages/world.php", 'pageslinksgeneral');
}
if (($owner instanceof ElggEntity) && (can_write_to_container(0,$owner->guid))){
add_submenu_item(elgg_echo('pages:new'), $CONFIG->url . "pg/pages/new/?container_guid=" . elgg_get_page_owner_guid(), 'pagesactions');
function pages_init() {
global $CONFIG;
- add_menu(elgg_echo('pages'), $CONFIG->wwwroot . "mod/pages/world.php");
+ add_menu(elgg_echo('pages'), elgg_get_site_url() . "mod/pages/world.php");
// Register a page handler, so we can have nice URLs
register_page_handler('pages','pages_page_handler');
// Group submenu option
if ($page_owner instanceof ElggGroup && get_context() == 'groups') {
if($page_owner->pages_enable != "no"){
- add_submenu_item(sprintf(elgg_echo("pages:group"),$page_owner->name), $CONFIG->wwwroot . "pg/pages/owned/" . $page_owner->username);
+ add_submenu_item(sprintf(elgg_echo("pages:group"),$page_owner->name), elgg_get_site_url() . "pg/pages/owned/" . $page_owner->username);
}
}
}
$entity = get_entity($page[1]);
add_submenu_item(elgg_echo('pages:label:view'), $CONFIG->url . "pg/pages/view/{$page[1]}", 'pageslinks');
- // add_submenu_item(elgg_echo('pages:user'), $CONFIG->wwwroot . "pg/pages/owned/" . get_loggedin_user()->username, 'pageslinksgeneral');
+ // add_submenu_item(elgg_echo('pages:user'), elgg_get_site_url() . "pg/pages/owned/" . get_loggedin_user()->username, 'pageslinksgeneral');
if (($entity) && ($entity->canEdit())) {
add_submenu_item(elgg_echo('pages:label:edit'), $CONFIG->url . "pg/pages/edit/{$page[1]}", 'pagesactions');
}
$descr = $entity->description;
$title = $entity->title;
global $CONFIG;
- $url = $CONFIG->wwwroot . "pg/view/" . $entity->guid;
+ $url = elgg_get_site_url() . "pg/view/" . $entity->guid;
if ($method == 'sms') {
$owner = $entity->getOwnerEntity();
return $owner->name . ' ' . elgg_echo("pages:via") . ': ' . $url . ' (' . $title . ')';
// add_submenu_item(sprintf(elgg_echo("pages:user"), elgg_get_page_owner()->name), $CONFIG->url . "pg/pages/owned/" . elgg_get_page_owner()->username, 'pageslinksgeneral');
if ($pages->canEdit()) {
- add_submenu_item(elgg_echo('pages:newchild'),"{$CONFIG->wwwroot}pg/pages/new/?parent_guid={$pages->getGUID()}&container_guid=" . elgg_get_page_owner_guid(), 'pagesactions');
- $delete_url = elgg_add_action_tokens_to_url("{$CONFIG->wwwroot}action/pages/delete?page={$pages->getGUID()}");
+ add_submenu_item(elgg_echo('pages:newchild'),elgg_get_site_url()."pg/pages/new/?parent_guid={$pages->getGUID()}&container_guid=" . elgg_get_page_owner_guid(), 'pagesactions');
+ $delete_url = elgg_add_action_tokens_to_url(elgg_get_site_url()."action/pages/delete?page={$pages->getGUID()}");
add_submenu_item(elgg_echo('pages:delete'), $delete_url, 'pagesactions', true);
}
$breadcrumbs = '';
-$owner_url = $CONFIG->wwwroot . "pg/pages/owned/" . get_entity($page_owner)->username;
+$owner_url = elgg_get_site_url() . "pg/pages/owned/" . get_entity($page_owner)->username;
echo "<div id='breadcrumbs'><b><a href=\"{$owner_url}\">" . elgg_echo('pages:user') . "</a></b>";
//see if the new page's parent has a parent
add_submenu_item(sprintf(elgg_echo("pages:user"), elgg_get_page_owner()->name), $CONFIG->url . "pg/pages/owned/" . elgg_get_page_owner()->username, 'pageslinksgeneral');
}
-add_submenu_item(elgg_echo('pages:all'),$CONFIG->wwwroot."mod/pages/world.php", 'pageslinksgeneral');
+add_submenu_item(elgg_echo('pages:all'),elgg_get_site_url()."mod/pages/world.php", 'pageslinksgeneral');
$limit = get_input("limit", 10);
$offset = get_input("offset", 0);
elgg_echo('profile:comment:body'),
get_loggedin_user()->name,
$message_content,
- $CONFIG->wwwroot . "pg/profile/" . $user->username,
+ elgg_get_site_url() . "pg/profile/" . $user->username,
get_loggedin_user()->name,
get_loggedin_user()->getURL()
)
if (get_context() == "profile") {
$page_owner = elgg_get_page_owner();
if ($page_owner && $page_owner->canEdit()) {
- add_submenu_item(elgg_echo('profile:editdetails'), $CONFIG->wwwroot . "pg/profile/{$page_owner->username}/edit/details");
- add_submenu_item(elgg_echo('profile:editicon'), $CONFIG->wwwroot . "pg/profile/{$page_owner->username}/edit/icon");
+ add_submenu_item(elgg_echo('profile:editdetails'), elgg_get_site_url() . "pg/profile/{$page_owner->username}/edit/details");
+ add_submenu_item(elgg_echo('profile:editicon'), elgg_get_site_url() . "pg/profile/{$page_owner->username}/edit/icon");
}
}
}
*/
function profile_url($user) {
global $CONFIG;
- return $CONFIG->wwwroot . "pg/profile/" . $user->username;
+ return elgg_get_site_url() . "pg/profile/" . $user->username;
}
/**
if ($filehandler->exists()) {
//$url = $CONFIG->url . "pg/icon/$username/$size/$icontime.jpg";
- return $CONFIG->wwwroot . 'mod/profile/icondirect.php?lastcache='.$icontime.'&joindate=' . $entity->time_created . '&guid=' . $entity->guid . '&size='.$size;
+ return elgg_get_site_url() . 'mod/profile/icondirect.php?lastcache='.$icontime.'&joindate=' . $entity->time_created . '&guid=' . $entity->guid . '&size='.$size;
}
}
}
$resetlisting = elgg_view('input/form',
array (
'body' => elgg_view('input/submit', array('value' => elgg_echo('profile:resetdefault'), 'class' => 'action_button disabled')),
- 'action' => $CONFIG->wwwroot . 'action/profile/editdefault/reset'
+ 'action' => elgg_get_site_url() . 'action/profile/editdefault/reset'
)
);
<li class="user_menu_profile">
<?php
- echo "<a class='report_this' href=\"javascript:location.href='". $CONFIG->wwwroot . "mod/reportedcontent/add.php?address='+encodeURIComponent(location.href)+'&title='+encodeURIComponent(document.title)\">" . elgg_echo('reportedcontent:report') . "</a>";
+ echo "<a class='report_this' href=\"javascript:location.href='". elgg_get_site_url() . "mod/reportedcontent/add.php?address='+encodeURIComponent(location.href)+'&title='+encodeURIComponent(document.title)\">" . elgg_echo('reportedcontent:report') . "</a>";
?>
</li>
\ No newline at end of file
global $CONFIG;
// Register and optionally replace the dashboard
register_page_handler('dashboard', 'riverdashboard_page_handler');
- add_menu(elgg_echo('activity'), $CONFIG->wwwroot . "pg/activity/");
+ add_menu(elgg_echo('activity'), elgg_get_site_url() . "pg/activity/");
// Page handler
register_page_handler('activity', 'riverdashboard_page_handler');
'search_type' => 'all',
//'friends' => $friends
)));
-$url = "{$CONFIG->wwwroot}pg/search/?$data";
+$url = elgg_get_site_url()."pg/search/?$data";
add_submenu_item(elgg_echo('all'), $url);
foreach ($types as $type => $subtypes) {
'friends' => $friends
)));
- $url = "{$CONFIG->wwwroot}pg/search/?$data";
+ $url = elgg_get_site_url()."pg/search/?$data";
add_submenu_item(elgg_echo($label), $url);
}
'friends' => $friends
)));
- $url = "{$CONFIG->wwwroot}pg/search/?$data";
+ $url = elgg_get_site_url()."pg/search/?$data";
add_submenu_item(elgg_echo($label), $url);
}
'friends' => $friends
)));
- $url = "{$CONFIG->wwwroot}pg/search/?$data";
+ $url = elgg_get_site_url()."pg/search/?$data";
add_submenu_item(elgg_echo($label), $url);
}
global $CONFIG;
// Set up menu for logged in users
- add_menu(elgg_echo('thewire:title'), $CONFIG->wwwroot . "pg/thewire");
+ add_menu(elgg_echo('thewire:title'), elgg_get_site_url() . "pg/thewire");
// Extend system CSS with our own styles, which are defined in the thewire/css view
elgg_extend_view('css','thewire/css');
} else {
// @todo remove the hard coded reference to the videolist plugin
if (get_context() == "videolist"){
- $video_link = $CONFIG->wwwroot . "pg/videolist/browse/$username/";
+ $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 {
- $new_link = (isset($vars['new_link'])) ? $vars['new_link'] : "{$CONFIG->wwwroot}pg/$type/$username/new";
+ $new_link = (isset($vars['new_link'])) ? $vars['new_link'] : elgg_get_site_url()."pg/$type/$username/new";
$new_button = "<a href=\"{$new_link}\" class='action_button'>" . elgg_echo($type . ':new') . '</a>';
}
$new_button = "<div class='content_header_options'>$new_button</div>";
<div class="menu_admin_option">
<h2><?php echo elgg_echo('usersettings:plugins'); ?> </h2>
<p><?php echo elgg_echo('usersettings:plugins:opt:description'); ?><br />
- <a href="<?php echo $CONFIG->wwwroot . "pg/settings/plugins/"; ?>"><?php echo elgg_echo('usersettings:plugins:opt:linktext'); ?></a></p>
+ <a href="<?php echo elgg_get_site_url() . "pg/settings/plugins/"; ?>"><?php echo elgg_echo('usersettings:plugins:opt:linktext'); ?></a></p>
</div>
\ No newline at end of file
<div class="menu_admin_option">
<h2><?php echo elgg_echo('usersettings:statistics'); ?> </h2>
<p><?php echo elgg_echo('usersettings:statistics:opt:description'); ?><br />
- <a href="<?php echo $CONFIG->wwwroot . "pg/settings/statistics/"; ?>"><?php echo elgg_echo('usersettings:statistics:opt:linktext'); ?></a></p>
+ <a href="<?php echo elgg_get_site_url() . "pg/settings/statistics/"; ?>"><?php echo elgg_echo('usersettings:statistics:opt:linktext'); ?></a></p>
</div>
<div class="menu_admin_option">
<h2><?php echo elgg_echo('usersettings:user'); ?> </h2>
<p><?php echo elgg_echo('usersettings:user:opt:description'); ?><br />
- <a href="<?php echo $CONFIG->wwwroot . "pg/settings/user/"; ?>"><?php echo elgg_echo('usersettings:user:opt:linktext'); ?></a></p>
+ <a href="<?php echo elgg_get_site_url() . "pg/settings/user/"; ?>"><?php echo elgg_echo('usersettings:user:opt:linktext'); ?></a></p>
</div>
\ No newline at end of file
$name = $vars['internalname'];
$src = $vars['src'];
// blank src if trying to access an offsite image.
-if (strpos($src,$CONFIG->wwwroot)===false) {
+if (strpos($src,elgg_get_site_url())===false) {
$src = "";
}
?>