aboutsummaryrefslogtreecommitdiff
path: root/mod/profile
diff options
context:
space:
mode:
authormarcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-09-12 18:01:45 +0000
committermarcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-09-12 18:01:45 +0000
commite665b7dcf7f711c9a4fe7e1ea5f12203a67cf1dd (patch)
tree35d1e6e3b32475c219b1272c723e1c5f964299fa /mod/profile
parent02e6ee065749c4b7afcdbdcf46379dfe719631e2 (diff)
downloadelgg-e665b7dcf7f711c9a4fe7e1ea5f12203a67cf1dd.tar.gz
elgg-e665b7dcf7f711c9a4fe7e1ea5f12203a67cf1dd.tar.bz2
Basic XFN support
git-svn-id: https://code.elgg.org/elgg/trunk@2074 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/profile')
-rw-r--r--mod/profile/views/default/profile/gallery.php10
-rw-r--r--mod/profile/views/default/profile/listing.php11
-rw-r--r--mod/profile/views/default/profile/userdetails.php9
3 files changed, 25 insertions, 5 deletions
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 .= "<p><b><a href=\"" . $vars['entity']->getUrl() . "\">" . $vars['entity']->name . "</a></b></p>";
+
+ $rel = "";
+ if (page_owner() == $vars['entity']->guid)
+ $rel = 'me';
+ else if (check_entity_relationship(page_owner(), 'friend', $vars['entity']->guid))
+ $rel = 'friend';
+
+ $info .= "<p><b><a href=\"" . $vars['entity']->getUrl() . "\" rel=\"$rel\">" . $vars['entity']->name . "</a></b></p>";
// 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 .= "<p><b><a href=\"" . $vars['entity']->getUrl() . "\">" . $vars['entity']->name . "</a></b></p>";
+
+ // 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 .= "<p><b><a href=\"" . $vars['entity']->getUrl() . "\" rel=\"$rel\">" . $vars['entity']->name . "</a></b></p>";
$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 @@
<?php
+ // Simple XFN
+ $rel = "";
+ if (page_owner() == $vars['entity']->guid)
+ $rel = 'me';
+ else if (check_entity_relationship(page_owner(), 'friend', $vars['entity']->guid))
+ $rel = 'friend';
+
// display the users name
- echo "<h2><a href=\"" . $vars['entity']->getUrl() . "\">" . $vars['entity']->name . "</a></h2>";
+ echo "<h2><a href=\"" . $vars['entity']->getUrl() . "\" rel=\"$rel\">" . $vars['entity']->name . "</a></h2>";
if ($vars['full'] == true) {