aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordave <dave@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-02-17 12:22:51 +0000
committerdave <dave@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-02-17 12:22:51 +0000
commit83a53a6b69f3b98e75da51fd7894fbda27e2ff55 (patch)
tree130b6aff0a1b1b852b05cc1b3876a4afe948331b
parent0247349e8208972608f5f693ed47b7f2457b8c60 (diff)
downloadelgg-83a53a6b69f3b98e75da51fd7894fbda27e2ff55.tar.gz
elgg-83a53a6b69f3b98e75da51fd7894fbda27e2ff55.tar.bz2
new status view created that can be extended
git-svn-id: https://code.elgg.org/elgg/trunk@2777 36083f99-b078-4883-b0ff-0f9b5a30f544
-rw-r--r--mod/profile/views/default/profile/listing.php60
1 files changed, 26 insertions, 34 deletions
diff --git a/mod/profile/views/default/profile/listing.php b/mod/profile/views/default/profile/listing.php
index c3754b3d6..405f03d17 100644
--- a/mod/profile/views/default/profile/listing.php
+++ b/mod/profile/views/default/profile/listing.php
@@ -11,16 +11,8 @@
*
* @uses $vars['entity'] The user entity
*/
- $info = "";
-
- //grab the users status message with metadata 'state' set to current if it exists
- if($get_status = get_entities_from_metadata("state", "current", "object", "status", $vars['entity']->guid)){
-
- foreach($get_status as $s) {
- $info = elgg_view("status/friends_view", array('entity' => $s));
- }
-
- }
+ //create a view that a status plugin could extend - in the default case, this is the wire
+ $info = elgg_view("profile/status");
$icon = elgg_view(
@@ -28,38 +20,38 @@
'entity' => $vars['entity'],
'size' => 'small',
)
- );
-
+ );
+
$banned = $vars['entity']->isBanned();
-
- // Simple XFN
- $rel = "";
- if (page_owner() == $vars['entity']->guid)
- $rel = 'me';
- else if (check_entity_relationship(page_owner(), 'friend', $vars['entity']->guid))
- $rel = 'friend';
-
+
+ // Simple XFN
+ $rel = "";
+ if (page_owner() == $vars['entity']->guid)
+ $rel = 'me';
+ else if (check_entity_relationship(page_owner(), 'friend', $vars['entity']->guid))
+ $rel = 'friend';
+
if (!$banned) {
$info .= "<p><b><a href=\"" . $vars['entity']->getUrl() . "\" rel=\"$rel\">" . $vars['entity']->name . "</a></b></p>";
$location = $vars['entity']->location;
if (!empty($location)) {
$info .= "<p class=\"owner_timestamp\">" . elgg_echo("profile:location") . ": " . elgg_view("output/tags",array('value' => $vars['entity']->location)) . "</p>";
- }
- }
+ }
+ }
else
- {
- $info .= "<p><b><strike>";
- if (isadminloggedin())
- $info .= "<a href=\"" . $vars['entity']->getUrl() . "\">";
- $info .= $vars['entity']->name;
- if (isadminloggedin())
- $info .= "</a>";
- $info .= "</strike></b></p>";
-
- $info .= "<p class=\"owner_timestamp\">" . elgg_echo('profile:banned') . "</p>";
-
- }
+ {
+ $info .= "<p><b><strike>";
+ if (isadminloggedin())
+ $info .= "<a href=\"" . $vars['entity']->getUrl() . "\">";
+ $info .= $vars['entity']->name;
+ if (isadminloggedin())
+ $info .= "</a>";
+ $info .= "</strike></b></p>";
+
+ $info .= "<p class=\"owner_timestamp\">" . elgg_echo('profile:banned') . "</p>";
+
+ }
echo elgg_view_listing($icon, $info);