aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mod/profile/views/default/profile/menu/actions.php (renamed from mod/profile/views/default/profile/hoverover/actions.php)0
-rw-r--r--mod/profile/views/default/profile/menu/links.php (renamed from mod/profile/views/default/profile/hoverover/links.php)0
-rw-r--r--mod/profile/views/default/profile/menu/linksownpage.php22
-rw-r--r--mod/profile/views/default/profile/profilelinks.php20
4 files changed, 40 insertions, 2 deletions
diff --git a/mod/profile/views/default/profile/hoverover/actions.php b/mod/profile/views/default/profile/menu/actions.php
index f69ad1316..f69ad1316 100644
--- a/mod/profile/views/default/profile/hoverover/actions.php
+++ b/mod/profile/views/default/profile/menu/actions.php
diff --git a/mod/profile/views/default/profile/hoverover/links.php b/mod/profile/views/default/profile/menu/links.php
index c60de7456..c60de7456 100644
--- a/mod/profile/views/default/profile/hoverover/links.php
+++ b/mod/profile/views/default/profile/menu/links.php
diff --git a/mod/profile/views/default/profile/menu/linksownpage.php b/mod/profile/views/default/profile/menu/linksownpage.php
new file mode 100644
index 000000000..04f031506
--- /dev/null
+++ b/mod/profile/views/default/profile/menu/linksownpage.php
@@ -0,0 +1,22 @@
+<?php
+
+ /**
+ * Elgg profile icon / profile links: passive links when looking at your own icon / profile
+ *
+ * @package ElggProfile
+ * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
+ * @author Dave Tosh <dave@elgg.com>
+ * @copyright Curverider Ltd 2008
+ * @link http://elgg.com/
+ *
+ * @uses $vars['entity'] The user entity. If none specified, the current user is assumed.
+ */
+
+?>
+
+ <p class="user_menu_friends">
+ <a href="<?php echo $vars['url']; ?>pg/friends/<?php echo $vars['entity']->username; ?>/"><?php echo elgg_echo("friends"); ?></a>
+ </p>
+ <p class="user_menu_friends_of">
+ <a href="<?php echo $vars['url']; ?>pg/friendsof/<?php echo $vars['entity']->username; ?>/"><?php echo elgg_echo("friends:of"); ?></a>
+ </p> \ No newline at end of file
diff --git a/mod/profile/views/default/profile/profilelinks.php b/mod/profile/views/default/profile/profilelinks.php
index c349e7479..fda223a31 100644
--- a/mod/profile/views/default/profile/profilelinks.php
+++ b/mod/profile/views/default/profile/profilelinks.php
@@ -2,6 +2,8 @@
/**
* Elgg profile links
+ * We need to make sure that the correct links display depending on whether you are looking at your own
+ * profile or someone else's
*
* @package ElggProfile
* @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
@@ -16,7 +18,21 @@
<?php
- echo elgg_view("profile/hoverover/actions",$vars);
- echo elgg_view("profile/hoverover/links",$vars);
+ //check to see if the user is looking at their own profile
+ if($_SESSION['user']->guid == page_owner()){
+
+ echo "<div id=\"profile_menu_wrapper\">"; //start the wrapper div
+ echo elgg_view("profile/menu/actions",$vars);//grab action links such as make friend
+ echo elgg_view("profile/menu/linksownpage",$vars); // an different view for user's own profile
+ echo "</div>"; //close wrapper div
+
+ } else {
+
+ echo "<div id=\"profile_menu_wrapper\">"; //start the wrapper div
+ echo elgg_view("profile/menu/actions",$vars); //grab action links such as make friend
+ echo elgg_view("profile/menu/links",$vars); //passive links to items such as user blog etc
+ echo "</div>"; //close wrapper div
+
+ }
?> \ No newline at end of file