aboutsummaryrefslogtreecommitdiff
path: root/views/default/user
diff options
context:
space:
mode:
Diffstat (limited to 'views/default/user')
-rw-r--r--views/default/user/default.php57
-rw-r--r--views/default/user/elements/summary.php13
-rw-r--r--views/default/user/search/finishblurb.php18
-rw-r--r--views/default/user/search/startblurb.php10
4 files changed, 98 insertions, 0 deletions
diff --git a/views/default/user/default.php b/views/default/user/default.php
new file mode 100644
index 000000000..6c84e84ad
--- /dev/null
+++ b/views/default/user/default.php
@@ -0,0 +1,57 @@
+<?php
+/**
+ * Elgg user display
+ *
+ * @uses $vars['entity'] ElggUser entity
+ * @uses $vars['size'] Size of the icon
+ */
+
+$entity = $vars['entity'];
+$size = elgg_extract('size', $vars, 'tiny');
+
+$icon = elgg_view_entity_icon($entity, $size, $vars);
+
+// Simple XFN
+$rel = '';
+if (elgg_get_logged_in_user_guid() == $entity->guid) {
+ $rel = 'rel="me"';
+} elseif (check_entity_relationship(elgg_get_logged_in_user_guid(), 'friend', $entity->guid)) {
+ $rel = 'rel="friend"';
+}
+
+$title = "<a href=\"" . $entity->getUrl() . "\" $rel>" . $entity->name . "</a>";
+
+$metadata = elgg_view_menu('entity', array(
+ 'entity' => $entity,
+ 'sort_by' => 'priority',
+ 'class' => 'elgg-menu-hz',
+));
+
+if (elgg_in_context('owner_block') || elgg_in_context('widgets')) {
+ $metadata = '';
+}
+
+if (elgg_get_context() == 'gallery') {
+ echo $icon;
+} else {
+ if ($entity->isBanned()) {
+ $banned = elgg_echo('banned');
+ $params = array(
+ 'entity' => $entity,
+ 'title' => $title,
+ 'metadata' => $metadata,
+ );
+ } else {
+ $params = array(
+ 'entity' => $entity,
+ 'title' => $title,
+ 'metadata' => $metadata,
+ 'subtitle' => $entity->briefdescription,
+ 'content' => elgg_view('user/status', array('entity' => $entity)),
+ );
+ }
+
+ $list_body = elgg_view('user/elements/summary', $params);
+
+ echo elgg_view_image_block($icon, $list_body, $vars);
+}
diff --git a/views/default/user/elements/summary.php b/views/default/user/elements/summary.php
new file mode 100644
index 000000000..46d11c14c
--- /dev/null
+++ b/views/default/user/elements/summary.php
@@ -0,0 +1,13 @@
+<?php
+/**
+ * User summary
+ *
+ * @uses $vars['entity'] ElggEntity
+ * @uses $vars['title'] Title link (optional) false = no title, '' = default
+ * @uses $vars['metadata'] HTML for entity metadata and actions (optional)
+ * @uses $vars['subtitle'] HTML for the subtitle (optional)
+ * @uses $vars['tags'] HTML for the tags (optional)
+ * @uses $vars['content'] HTML for the entity content (optional)
+ */
+
+echo elgg_view('object/elements/summary', $vars);
diff --git a/views/default/user/search/finishblurb.php b/views/default/user/search/finishblurb.php
new file mode 100644
index 000000000..a3878a803
--- /dev/null
+++ b/views/default/user/search/finishblurb.php
@@ -0,0 +1,18 @@
+<?php
+/**
+ * @package Elgg
+ * @subpackage Core
+ * @deprecated 1.7
+ */
+
+elgg_deprecated_notice('view user/search/finishblurb was deprecated.', 1.7);
+
+if ($vars['count'] > $vars['threshold']) {
+
+?>
+<a href="<?php echo elgg_get_site_url(); ?>search/users?tag=<?php echo urlencode($vars['tag']); ?>"><?php
+ echo elgg_echo("user:search:finishblurb");
+ ?></a>
+<?php
+
+}
diff --git a/views/default/user/search/startblurb.php b/views/default/user/search/startblurb.php
new file mode 100644
index 000000000..806157609
--- /dev/null
+++ b/views/default/user/search/startblurb.php
@@ -0,0 +1,10 @@
+<?php
+/**
+ * @package Elgg
+ * @subpackage Core
+ * @deprecated 1.7
+ */
+
+elgg_deprecated_notice('view user/search/startblurb was deprecated.', 1.7);
+
+echo elgg_echo("user:search:startblurb", array($vars['tag'])); \ No newline at end of file