aboutsummaryrefslogtreecommitdiff
path: root/mod/profile/views/default
diff options
context:
space:
mode:
authordave <dave@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-06-23 15:39:56 +0000
committerdave <dave@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-06-23 15:39:56 +0000
commit4d4e99053912ffa143112919d2752f162789b84d (patch)
tree9cab82f483905088fb56cc096d21b56b922d7514 /mod/profile/views/default
parent630b14c96e0c3d89a2b055f89787486c296fa724 (diff)
downloadelgg-4d4e99053912ffa143112919d2752f162789b84d.tar.gz
elgg-4d4e99053912ffa143112919d2752f162789b84d.tar.bz2
new profile links system.
git-svn-id: https://code.elgg.org/elgg/trunk@1066 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/profile/views/default')
-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