From e665b7dcf7f711c9a4fe7e1ea5f12203a67cf1dd Mon Sep 17 00:00:00 2001 From: marcus Date: Fri, 12 Sep 2008 18:01:45 +0000 Subject: Basic XFN support git-svn-id: https://code.elgg.org/elgg/trunk@2074 36083f99-b078-4883-b0ff-0f9b5a30f544 --- mod/profile/views/default/profile/gallery.php | 10 ++++++++-- mod/profile/views/default/profile/listing.php | 11 +++++++++-- mod/profile/views/default/profile/userdetails.php | 9 ++++++++- 3 files changed, 25 insertions(+), 5 deletions(-) (limited to 'mod/profile') diff --git a/mod/profile/views/default/profile/gallery.php b/mod/profile/views/default/profile/gallery.php index 72e5b285b..4db26c8bd 100644 --- a/mod/profile/views/default/profile/gallery.php +++ b/mod/profile/views/default/profile/gallery.php @@ -28,8 +28,14 @@ 'size' => 'medium', ) ); - - $info .= "

getUrl() . "\">" . $vars['entity']->name . "

"; + + $rel = ""; + if (page_owner() == $vars['entity']->guid) + $rel = 'me'; + else if (check_entity_relationship(page_owner(), 'friend', $vars['entity']->guid)) + $rel = 'friend'; + + $info .= "

getUrl() . "\" rel=\"$rel\">" . $vars['entity']->name . "

"; // echo elgg_view_listing($icon, $info); echo elgg_view('search/gallery_listing',array('icon' => $icon, 'info' => $info)); diff --git a/mod/profile/views/default/profile/listing.php b/mod/profile/views/default/profile/listing.php index 87ccdb5ee..eb991be07 100644 --- a/mod/profile/views/default/profile/listing.php +++ b/mod/profile/views/default/profile/listing.php @@ -29,8 +29,15 @@ 'size' => 'small', ) ); - - $info .= "

getUrl() . "\">" . $vars['entity']->name . "

"; + + // Simple XFN + $rel = ""; + if (page_owner() == $vars['entity']->guid) + $rel = 'me'; + else if (check_entity_relationship(page_owner(), 'friend', $vars['entity']->guid)) + $rel = 'friend'; + + $info .= "

getUrl() . "\" rel=\"$rel\">" . $vars['entity']->name . "

"; $location = $vars['entity']->location; if (!empty($location)) { diff --git a/mod/profile/views/default/profile/userdetails.php b/mod/profile/views/default/profile/userdetails.php index a946e8efb..50f7f33ac 100644 --- a/mod/profile/views/default/profile/userdetails.php +++ b/mod/profile/views/default/profile/userdetails.php @@ -75,8 +75,15 @@ guid) + $rel = 'me'; + else if (check_entity_relationship(page_owner(), 'friend', $vars['entity']->guid)) + $rel = 'friend'; + // display the users name - echo "

getUrl() . "\">" . $vars['entity']->name . "

"; + echo "

getUrl() . "\" rel=\"$rel\">" . $vars['entity']->name . "

"; if ($vars['full'] == true) { -- cgit v1.2.3