diff options
author | ewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-10-30 22:23:45 +0000 |
---|---|---|
committer | ewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-10-30 22:23:45 +0000 |
commit | bb1f45eb02bac603d67ac08cb674c4050a245c28 (patch) | |
tree | 239c6afba40d3160be53c22984e3b7ba1b7442ec /mod/profile/views/default | |
parent | b5c5261077640d2390f4e3c44cc51bfe4bed2e4c (diff) | |
download | elgg-bb1f45eb02bac603d67ac08cb674c4050a245c28.tar.gz elgg-bb1f45eb02bac603d67ac08cb674c4050a245c28.tar.bz2 |
Refs #2598: Converted most $vars['url'] to elgg_get_site_url()
git-svn-id: http://code.elgg.org/elgg/trunk@7149 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/profile/views/default')
18 files changed, 47 insertions, 47 deletions
diff --git a/mod/profile/views/default/icon/user/default/large.php b/mod/profile/views/default/icon/user/default/large.php index 3ce382532..ac28f8e9a 100644 --- a/mod/profile/views/default/icon/user/default/large.php +++ b/mod/profile/views/default/icon/user/default/large.php @@ -1,3 +1,3 @@ <?php - echo $vars['url'] . "mod/profile/graphics/defaultlarge.gif"; + echo elgg_get_site_url() . "mod/profile/graphics/defaultlarge.gif"; ?>
\ No newline at end of file diff --git a/mod/profile/views/default/icon/user/default/master.php b/mod/profile/views/default/icon/user/default/master.php index 7c5ea847c..129b0d375 100644 --- a/mod/profile/views/default/icon/user/default/master.php +++ b/mod/profile/views/default/icon/user/default/master.php @@ -1,3 +1,3 @@ <?php - echo $vars['url'] . "mod/profile/graphics/defaultmaster.gif"; + echo elgg_get_site_url() . "mod/profile/graphics/defaultmaster.gif"; ?>
\ No newline at end of file diff --git a/mod/profile/views/default/icon/user/default/medium.php b/mod/profile/views/default/icon/user/default/medium.php index d5f6db343..8815a65bc 100644 --- a/mod/profile/views/default/icon/user/default/medium.php +++ b/mod/profile/views/default/icon/user/default/medium.php @@ -1,3 +1,3 @@ <?php - echo $vars['url'] . "mod/profile/graphics/defaultmedium.gif"; + echo elgg_get_site_url() . "mod/profile/graphics/defaultmedium.gif"; ?>
\ No newline at end of file diff --git a/mod/profile/views/default/icon/user/default/small.php b/mod/profile/views/default/icon/user/default/small.php index 55f113c41..895aa15cc 100644 --- a/mod/profile/views/default/icon/user/default/small.php +++ b/mod/profile/views/default/icon/user/default/small.php @@ -1,3 +1,3 @@ <?php - echo $vars['url'] . "mod/profile/graphics/defaultsmall.gif"; + echo elgg_get_site_url() . "mod/profile/graphics/defaultsmall.gif"; ?>
\ No newline at end of file diff --git a/mod/profile/views/default/icon/user/default/tiny.php b/mod/profile/views/default/icon/user/default/tiny.php index e47cdd3da..866c61533 100644 --- a/mod/profile/views/default/icon/user/default/tiny.php +++ b/mod/profile/views/default/icon/user/default/tiny.php @@ -1,3 +1,3 @@ <?php - echo $vars['url'] . "mod/profile/graphics/defaulttiny.gif"; + echo elgg_get_site_url() . "mod/profile/graphics/defaulttiny.gif"; ?>
\ No newline at end of file diff --git a/mod/profile/views/default/icon/user/default/topbar.php b/mod/profile/views/default/icon/user/default/topbar.php index ad11588fa..0ff3dbaaa 100644 --- a/mod/profile/views/default/icon/user/default/topbar.php +++ b/mod/profile/views/default/icon/user/default/topbar.php @@ -1,3 +1,3 @@ <?php - echo $vars['url'] . "mod/profile/graphics/defaulttopbar.gif"; + echo elgg_get_site_url() . "mod/profile/graphics/defaulttopbar.gif"; ?>
\ No newline at end of file diff --git a/mod/profile/views/default/profile/commentwall/commentwall_content.php b/mod/profile/views/default/profile/commentwall/commentwall_content.php index 360627c0c..666c95a87 100644 --- a/mod/profile/views/default/profile/commentwall/commentwall_content.php +++ b/mod/profile/views/default/profile/commentwall/commentwall_content.php @@ -16,7 +16,7 @@ // if the user looking at the comment can edit, show the delete link if ($vars['annotation']->canEdit()) { echo "<div class='entity_metadata'><span class='delete_button'>" . elgg_view("output/confirmlink",array( - 'href' => $vars['url'] . "action/profile/deletecomment?annotation_id=" . $vars['annotation']->id, + 'href' => elgg_get_site_url() . "action/profile/deletecomment?annotation_id=" . $vars['annotation']->id, 'text' => elgg_echo('delete'), 'confirm' => elgg_echo('deleteconfirm'), )) . "</span></div>"; diff --git a/mod/profile/views/default/profile/commentwall/commentwalladd.php b/mod/profile/views/default/profile/commentwall/commentwalladd.php index a5765082c..dcb520ea1 100644 --- a/mod/profile/views/default/profile/commentwall/commentwalladd.php +++ b/mod/profile/views/default/profile/commentwall/commentwalladd.php @@ -4,7 +4,7 @@ */ ?> <div id="comment_wall_add"> -<form action="<?php echo $vars['url']; ?>action/profile/addcomment" method="post" name="messageboardForm"> +<form action="<?php echo elgg_get_site_url(); ?>action/profile/addcomment" method="post" name="messageboardForm"> <!-- textarea for the contents --> <textarea name="message_content" value="" class="commentwall"></textarea><br /> <!-- the person posting an item on the message board --> diff --git a/mod/profile/views/default/profile/css.php b/mod/profile/views/default/profile/css.php index b65201b66..22ebaa8f1 100644 --- a/mod/profile/views/default/profile/css.php +++ b/mod/profile/views/default/profile/css.php @@ -272,7 +272,7 @@ ul#twitter_update_list { padding-left:0; } ul#twitter_update_list li { - background-image: url(<?php echo $vars['url']; ?>mod/profile/graphics/speech_bubble_tail.gif); + background-image: url(<?php echo elgg_get_site_url(); ?>mod/profile/graphics/speech_bubble_tail.gif); background-position:right bottom; background-repeat: no-repeat; list-style-image:none; @@ -298,7 +298,7 @@ ul#twitter_update_list li span a { display:inline !important; } p.visit_twitter a { - background:url(<?php echo $vars['url']; ?>mod/profile/graphics/twitter16px.png) left no-repeat; + background:url(<?php echo elgg_get_site_url(); ?>mod/profile/graphics/twitter16px.png) left no-repeat; padding:0 0 0 20px; margin:0; } @@ -406,17 +406,17 @@ p.visit_twitter a { bottom:0; } .avatar_menu_arrow { - background: url(<?php echo $vars['url']; ?>_graphics/elgg_sprites.png) no-repeat -150px top; + background: url(<?php echo elgg_get_site_url(); ?>_graphics/elgg_sprites.png) no-repeat -150px top; width:15px; height:15px; } .avatar_menu_arrow_on { - background: url(<?php echo $vars['url']; ?>_graphics/elgg_sprites.png) no-repeat -150px -16px; + background: url(<?php echo elgg_get_site_url(); ?>_graphics/elgg_sprites.png) no-repeat -150px -16px; width:15px; height:15px; } .avatar_menu_arrow_hover { - background: url(<?php echo $vars['url']; ?>_graphics/elgg_sprites.png) no-repeat -150px -32px; + background: url(<?php echo elgg_get_site_url(); ?>_graphics/elgg_sprites.png) no-repeat -150px -32px; width:15px; height:15px; } diff --git a/mod/profile/views/default/profile/edit.php b/mod/profile/views/default/profile/edit.php index 310536527..5e9cef774 100644 --- a/mod/profile/views/default/profile/edit.php +++ b/mod/profile/views/default/profile/edit.php @@ -8,7 +8,7 @@ * @uses $vars['profile'] Profile items from $CONFIG->profile, defined in profile/start.php for now */ ?> -<form action="<?php echo $vars['url']; ?>action/profile/edit" method="post" id="edit_profile" class="margin_top"> +<form action="<?php echo elgg_get_site_url(); ?>action/profile/edit" method="post" id="edit_profile" class="margin_top"> <?php echo elgg_view('input/securitytoken') ?> <p><label> diff --git a/mod/profile/views/default/profile/editdefaultprofile.php b/mod/profile/views/default/profile/editdefaultprofile.php index daf3c577f..ece99c290 100644 --- a/mod/profile/views/default/profile/editdefaultprofile.php +++ b/mod/profile/views/default/profile/editdefaultprofile.php @@ -26,4 +26,4 @@ $formbody = <<< END END; echo "<p class='margin_top'>" . elgg_echo('profile:explainchangefields') . "</p>"; -echo elgg_view('input/form', array('body' => $formbody, 'action' => $vars['url'] . 'action/profile/editdefault')); +echo elgg_view('input/form', array('body' => $formbody, 'action' => elgg_get_site_url() . 'action/profile/editdefault')); diff --git a/mod/profile/views/default/profile/editdefaultprofileitems.php b/mod/profile/views/default/profile/editdefaultprofileitems.php index dc15f0c50..368529118 100644 --- a/mod/profile/views/default/profile/editdefaultprofileitems.php +++ b/mod/profile/views/default/profile/editdefaultprofileitems.php @@ -1,6 +1,6 @@ -<script language="javascript" type="text/javascript" src="<?php echo $vars['url']?>mod/profile/vendor/jquery.jeditable.mini.js"></script> +<script language="javascript" type="text/javascript" src="<?php echo elgg_get_site_url()?>mod/profile/vendor/jquery.jeditable.mini.js"></script> <script language="javascript" type="text/javascript"> -var reorderURL = '<?php echo elgg_add_action_tokens_to_url($vars['url'] . 'action/profile/editdefault/reorder', FALSE); ?>'; +var reorderURL = '<?php echo elgg_add_action_tokens_to_url(elgg_get_site_url() . 'action/profile/editdefault/reorder', FALSE); ?>'; function sortCallback(event, ui) { var orderArr = $('#sortable_profile_fields').sortable('toArray'); var orderStr = orderArr.join(','); @@ -23,7 +23,7 @@ $(document).ready(function() { $save = elgg_echo('save'); $cancel = elgg_echo('cancel'); - $edit_url = elgg_add_action_tokens_to_url("{$vars['url']}action/profile/editdefault/editfield", FALSE); + $edit_url = elgg_add_action_tokens_to_url(elgg_get_site_url()."action/profile/editdefault/editfield", FALSE); foreach($vars['items'] as $item) { echo <<< END @@ -49,9 +49,9 @@ END; echo elgg_view("profile/", array('value' => $item->translation)); //$even_odd = ( 'odd' != $even_odd ) ? 'odd' : 'even'; - $url = elgg_add_action_tokens_to_url("{$vars['url']}action/profile/editdefault/delete?id={$item->shortname}"); + $url = elgg_add_action_tokens_to_url(elgg_get_site_url()."action/profile/editdefault/delete?id={$item->shortname}"); echo "<li id=\"{$item->shortname}\"><div class='delete_button'><a href=\"$url\">" . elgg_echo('delete') . "</a></div>"; - echo "<img width='16' height='16' class='handle' alt='move' title='Drag here to reorder this item' src='{$vars['url']}mod/profile/graphics/drag_handle.png'/>"; + echo "<img width='16' height='16' class='handle' alt='move' title='Drag here to reorder this item' src='".elgg_get_site_url()."mod/profile/graphics/drag_handle.png'/>"; echo "<b class=\"profile_field_editable\"><span class=\"{$item->shortname}_editable\">$item->translation</span></b>: [".elgg_echo($item->type)."]"; echo "</li>"; diff --git a/mod/profile/views/default/profile/editicon.php b/mod/profile/views/default/profile/editicon.php index 53de19c59..cdfa68a8a 100644 --- a/mod/profile/views/default/profile/editicon.php +++ b/mod/profile/views/default/profile/editicon.php @@ -13,7 +13,7 @@ $currentuser = get_loggedin_user(); ?> <div id="edit_profile_avatar"> <!-- grab the required js for icon cropping --> -<script type="text/javascript" src="<?php echo $vars['url']; ?>mod/profile/views/default/js/jquery.imgareaselect-0.8.min.js"></script> +<script type="text/javascript" src="<?php echo elgg_get_site_url(); ?>mod/profile/views/default/js/jquery.imgareaselect-0.8.min.js"></script> <p class="margin_top"><?php echo elgg_echo('profile:profilepictureinstructions'); ?></p> @@ -30,7 +30,7 @@ $currentuser = get_loggedin_user(); </div> <div id="avatar_upload"> - <form action="<?php echo $vars['url']; ?>action/profile/iconupload" method="post" enctype="multipart/form-data"> + <form action="<?php echo elgg_get_site_url(); ?>action/profile/iconupload" method="post" enctype="multipart/form-data"> <?php echo elgg_view('input/securitytoken'); ?> <input type="hidden" name="username" value="<?php echo $currentuser->username; ?>" /> <p><label><?php echo elgg_echo("profile:editicon"); ?></label><br /> @@ -127,7 +127,7 @@ $currentuser = get_loggedin_user(); <div class="clearfloat"></div> -<form action="<?php echo $vars['url']; ?>action/profile/cropicon" method="post" /> +<form action="<?php echo elgg_get_site_url(); ?>action/profile/cropicon" method="post" /> <?php echo elgg_view('input/securitytoken'); ?> <input type="hidden" name="username" value="<?php echo get_loggedin_user()->username; ?>" /> <input type="hidden" name="x_1" value="<?php echo get_loggedin_user()->x1; ?>" id="x_1" /> diff --git a/mod/profile/views/default/profile/icon.php b/mod/profile/views/default/profile/icon.php index 82404676e..71b25fe6c 100644 --- a/mod/profile/views/default/profile/icon.php +++ b/mod/profile/views/default/profile/icon.php @@ -46,7 +46,7 @@ if ($vars['entity'] instanceof ElggUser) { if (!$override) { ?> <div class="usericon <?php echo $vars['size']; ?>"> - <div class="avatar_menu_button"><img src="<?php echo $vars['url']; ?>_graphics/spacer.gif" border="0" width="15" height="15" /></div> + <div class="avatar_menu_button"><img src="<?php echo elgg_get_site_url(); ?>_graphics/spacer.gif" border="0" width="15" height="15" /></div> <div class="sub_menu"> <h3 class="displayname"><a href="<?php echo $vars['entity']->getURL(); ?>"><?php echo $vars['entity']->name; ?> <span class="username"><?php echo "@" . $vars['entity']->username; ?></span></a></h3> @@ -67,10 +67,10 @@ if ($vars['entity'] instanceof ElggUser) { // if looking at your own avatar menu - provide a couple of handy links ?> <li class="user_menu_profile"> - <a class="edit_profile" href="<?php echo $vars['url']?>pg/profile/<?php echo $vars['entity']->username; ?>/edit/details"><?php echo elgg_echo("profile:edit"); ?></a> + <a class="edit_profile" href="<?php echo elgg_get_site_url()?>pg/profile/<?php echo $vars['entity']->username; ?>/edit/details"><?php echo elgg_echo("profile:edit"); ?></a> </li> <li class="user_menu_profile"> - <a class="edit_avatar" href="<?php echo $vars['url']?>pg/profile/<?php echo $vars['entity']->username; ?>/edit/icon"><?php echo elgg_echo("profile:editicon"); ?></a> + <a class="edit_avatar" href="<?php echo elgg_get_site_url()?>pg/profile/<?php echo $vars['entity']->username; ?>/edit/icon"><?php echo elgg_echo("profile:editicon"); ?></a> </li> <?php } @@ -96,7 +96,7 @@ if ($vars['entity'] instanceof ElggUser) { // Rounded avatar corners - CSS3 method - users avatar as background image so we can clip it with border-radius in supported browsers ?> - <img src="<?php echo $vars['url']; ?>_graphics/spacer.gif" border="0" <?php echo $align; ?> alt="<?php echo htmlentities($vars['entity']->name, ENT_QUOTES, 'UTF-8'); ?>" title="<?php echo htmlentities($vars['entity']->name, ENT_QUOTES, 'UTF-8'); ?>" <?php echo $vars['js']; ?> style="background: url(<?php echo $vars['entity']->getIcon($vars['size']); ?>) no-repeat;" class="<?php echo $vars['size']; ?>" /> + <img src="<?php echo elgg_get_site_url(); ?>_graphics/spacer.gif" border="0" <?php echo $align; ?> alt="<?php echo htmlentities($vars['entity']->name, ENT_QUOTES, 'UTF-8'); ?>" title="<?php echo htmlentities($vars['entity']->name, ENT_QUOTES, 'UTF-8'); ?>" <?php echo $vars['js']; ?> style="background: url(<?php echo $vars['entity']->getIcon($vars['size']); ?>) no-repeat;" class="<?php echo $vars['size']; ?>" /> <?php /* original avatar method diff --git a/mod/profile/views/default/profile/menu/adminlinks.php b/mod/profile/views/default/profile/menu/adminlinks.php index 6d99613ea..020240261 100644 --- a/mod/profile/views/default/profile/menu/adminlinks.php +++ b/mod/profile/views/default/profile/menu/adminlinks.php @@ -13,16 +13,16 @@ if (isadminloggedin()){ <a href="<?php echo $vars['url']; ?>pg/settings/user/<?php echo $vars['entity']->username; ?>/"><?php echo elgg_echo('profile:editdetails'); ?></a> <?php if (!$vars['entity']->isBanned()) { - echo elgg_view('output/confirmlink', array('text' => elgg_echo("ban"), 'href' => "{$vars['url']}action/admin/user/ban?guid={$vars['entity']->guid}")); + echo elgg_view('output/confirmlink', array('text' => elgg_echo("ban"), 'href' => elgg_get_site_url()."action/admin/user/ban?guid={$vars['entity']->guid}")); } else { - echo elgg_view('output/confirmlink', array('text' => elgg_echo("unban"), 'href' => "{$vars['url']}action/admin/user/unban?guid={$vars['entity']->guid}")); + echo elgg_view('output/confirmlink', array('text' => elgg_echo("unban"), 'href' => elgg_get_site_url()."action/admin/user/unban?guid={$vars['entity']->guid}")); } - echo elgg_view('output/confirmlink', array('text' => elgg_echo("delete"), 'href' => "{$vars['url']}action/admin/user/delete?guid={$vars['entity']->guid}")); - echo elgg_view('output/confirmlink', array('text' => elgg_echo("resetpassword"), 'href' => "{$vars['url']}action/admin/user/resetpassword?guid={$vars['entity']->guid}")); + echo elgg_view('output/confirmlink', array('text' => elgg_echo("delete"), 'href' => elgg_get_site_url()."action/admin/user/delete?guid={$vars['entity']->guid}")); + echo elgg_view('output/confirmlink', array('text' => elgg_echo("resetpassword"), 'href' => elgg_get_site_url()."action/admin/user/resetpassword?guid={$vars['entity']->guid}")); if (!$vars['entity']->isAdmin()) { - echo elgg_view('output/confirmlink', array('text' => elgg_echo("makeadmin"), 'href' => "{$vars['url']}action/admin/user/makeadmin?guid={$vars['entity']->guid}")); + echo elgg_view('output/confirmlink', array('text' => elgg_echo("makeadmin"), 'href' => elgg_get_site_url()."action/admin/user/makeadmin?guid={$vars['entity']->guid}")); } else { - echo elgg_view('output/confirmlink', array('text' => elgg_echo("removeadmin"), 'href' => "{$vars['url']}action/admin/user/removeadmin?guid={$vars['entity']->guid}")); + echo elgg_view('output/confirmlink', array('text' => elgg_echo("removeadmin"), 'href' => elgg_get_site_url()."action/admin/user/removeadmin?guid={$vars['entity']->guid}")); } } } diff --git a/mod/profile/views/default/profile/menu/friendlinks.php b/mod/profile/views/default/profile/menu/friendlinks.php index ce3af5a3c..f9e72dd4f 100644 --- a/mod/profile/views/default/profile/menu/friendlinks.php +++ b/mod/profile/views/default/profile/menu/friendlinks.php @@ -10,13 +10,13 @@ $ts = time(); $token = generate_action_token($ts); if ($vars['entity']->isFriend()) { echo elgg_view('output/confirmlink', array( - 'href' => "{$vars['url']}action/friends/remove?friend={$vars['entity']->getGUID()}", + 'href' => elgg_get_site_url()."action/friends/remove?friend={$vars['entity']->getGUID()}", 'text' => elgg_echo('friend:remove'), 'class' => 'remove_friend' )); } else { echo elgg_view('output/confirmlink', array( - 'href' => "{$vars['url']}action/friends/add?friend={$vars['entity']->getGUID()}", + 'href' => elgg_get_site_url()."action/friends/add?friend={$vars['entity']->getGUID()}", 'text' => elgg_echo('friend:add'), 'class' => 'add_friend' )); diff --git a/mod/profile/views/default/profile/profile_ownerblock.php b/mod/profile/views/default/profile/profile_ownerblock.php index 57c1dfb8b..f80f54cc2 100755 --- a/mod/profile/views/default/profile/profile_ownerblock.php +++ b/mod/profile/views/default/profile/profile_ownerblock.php @@ -38,26 +38,26 @@ if ($section == 'details') { $profile_actions = ""; if (isloggedin() && (get_loggedin_userid() == elgg_get_page_owner_guid())) { $profile_actions = "<div class='clearfloat profile_actions'>"; - $profile_actions .= "<a href='{$vars['url']}pg/profile/{$user->username}/edit/details' class='action_button'>". elgg_echo('profile:edit') ."</a>"; - $profile_actions .= "<a href='{$vars['url']}pg/profile/{$user->username}/edit/icon' class='action_button'>". elgg_echo('profile:editicon') ."</a>"; + $profile_actions .= "<a href='".elgg_get_site_url()."pg/profile/{$user->username}/edit/details' class='action_button'>". elgg_echo('profile:edit') ."</a>"; + $profile_actions .= "<a href='".elgg_get_site_url()."pg/profile/{$user->username}/edit/icon' class='action_button'>". elgg_echo('profile:editicon') ."</a>"; $profile_actions .= "</div>"; } else { $profile_actions = "<div class='profile_actions'>"; if (isloggedin()) { if (get_loggedin_userid() != $user->getGUID()) { if ($user->isFriend()) { - $url = "{$vars['url']}action/friends/remove?friend={$user->getGUID()}"; + $url = elgg_get_site_url()."action/friends/remove?friend={$user->getGUID()}"; $url = elgg_add_action_tokens_to_url($url); $profile_actions .= "<a href=\"$url\" class='action_button'>" . elgg_echo('friend:remove') . "</a>"; } else { - $url = "{$vars['url']}action/friends/add?friend={$user->getGUID()}"; + $url = elgg_get_site_url()."action/friends/add?friend={$user->getGUID()}"; $url = elgg_add_action_tokens_to_url($url); $profile_actions .= "<a href=\"$url\" class='action_button'>" . elgg_echo('friend:add') . "</a>"; } } } if (is_plugin_enabled('messages') && isloggedin()) { - $profile_actions .= "<a href=\"{$vars['url']}mod/messages/send.php?send_to={$user->guid}\" class='action_button'>". elgg_echo('messages:send') ."</a>"; + $profile_actions .= "<a href=\"".elgg_get_site_url()."mod/messages/send.php?send_to={$user->guid}\" class='action_button'>". elgg_echo('messages:send') ."</a>"; } $profile_actions .= "</div>"; } @@ -78,32 +78,32 @@ if (isadminloggedin()) { //check tools are enabled - hard-coded for phase1 // @todo - provide a view to extend for profile pages ownerblock tool-links if(is_plugin_enabled('blog')){ - $blog_link = "<li><a href=\"{$vars['url']}pg/blog/{$username}\">Blog</a></li>"; + $blog_link = "<li><a href=\"".elgg_get_site_url()."pg/blog/{$username}\">Blog</a></li>"; }else{ $blog_link = ""; } if(is_plugin_enabled('bookmarks')){ - $bookmark_link = "<li><a href=\"{$vars['url']}pg/bookmarks/{$username}\">Bookmarks</a></li>"; + $bookmark_link = "<li><a href=\"".elgg_get_site_url()."pg/bookmarks/{$username}\">Bookmarks</a></li>"; }else{ $bookmark_link = ""; } if(is_plugin_enabled('document')){ - $docs_link = "<li><a href=\"{$vars['url']}pg/document/{$username}\">Documents</a></li>"; + $docs_link = "<li><a href=\"".elgg_get_site_url()."pg/document/{$username}\">Documents</a></li>"; }else{ $docs_link = ""; } if(is_plugin_enabled('feeds')){ - $feeds_link = "<li><a href=\"{$vars['url']}pg/feeds/{$username}\">Feeds</a></li>"; + $feeds_link = "<li><a href=\"".elgg_get_site_url()."pg/feeds/{$username}\">Feeds</a></li>"; }else{ $feeds_link = ""; } if(is_plugin_enabled('tidypics')){ - $tidypics_link = "<li><a href=\"{$vars['url']}pg/photos/owned/{$username}\">Photos</a></li>"; + $tidypics_link = "<li><a href=\"".elgg_get_site_url()."pg/photos/owned/{$username}\">Photos</a></li>"; }else{ $tidypics_link = ""; } if(is_plugin_enabled('videolist')){ - $video_link = "<li><a href=\"{$vars['url']}pg/videolist/owned/{$username}\">Videos</a></li>"; + $video_link = "<li><a href=\"".elgg_get_site_url()."pg/videolist/owned/{$username}\">Videos</a></li>"; }else{ $video_link = ""; } diff --git a/mod/profile/views/default/profile/topbar_extend.php b/mod/profile/views/default/profile/topbar_extend.php index c1c4e13bb..dd38b9557 100644 --- a/mod/profile/views/default/profile/topbar_extend.php +++ b/mod/profile/views/default/profile/topbar_extend.php @@ -7,5 +7,5 @@ $user = get_loggedin_user(); if (($user instanceof ElggUser) && ($user->guid > 0)) { $friends = elgg_echo('friends'); - echo "<a class='myfriends' href=\"{$vars['url']}pg/friends/{$user->username}\" title=\"$friends\">$friends</a>"; + echo "<a class='myfriends' href=\"".elgg_get_site_url()."pg/friends/{$user->username}\" title=\"$friends\">$friends</a>"; } |