aboutsummaryrefslogtreecommitdiff
path: root/mod/profile/views/default/profile/details.php
diff options
context:
space:
mode:
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-12-19 01:44:33 +0000
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-12-19 01:44:33 +0000
commitabf3fcae3f90b4c52e40d3ef8bb11f92c7a03d1c (patch)
tree2f243448b156eb97b1b27a2efa38d791c1227bc5 /mod/profile/views/default/profile/details.php
parentfea009129f49f4f8d51654ceb569aae04387077b (diff)
downloadelgg-abf3fcae3f90b4c52e40d3ef8bb11f92c7a03d1c.tar.gz
elgg-abf3fcae3f90b4c52e40d3ef8bb11f92c7a03d1c.tar.bz2
rough widget profile plugin
git-svn-id: http://code.elgg.org/elgg/trunk@7676 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/profile/views/default/profile/details.php')
-rw-r--r--mod/profile/views/default/profile/details.php41
1 files changed, 41 insertions, 0 deletions
diff --git a/mod/profile/views/default/profile/details.php b/mod/profile/views/default/profile/details.php
new file mode 100644
index 000000000..27b0f943b
--- /dev/null
+++ b/mod/profile/views/default/profile/details.php
@@ -0,0 +1,41 @@
+<?php
+/**
+ * Elgg user display (details)
+ * @uses $vars['entity'] The user entity
+ */
+
+$even_odd = null;
+if (is_array($vars['config']->profile) && sizeof($vars['config']->profile) > 0) {
+ foreach($vars['config']->profile as $shortname => $valtype) {
+ if ($shortname != "description") {
+ $value = $vars['entity']->$shortname;
+ if (!empty($value)) {
+ //This function controls the alternating class
+ $even_odd = ( 'odd' != $even_odd ) ? 'odd' : 'even';
+ ?>
+ <p class="<?php echo $even_odd; ?>">
+ <b><?php
+ echo elgg_echo("profile:{$shortname}");
+ ?>: </b>
+ <?php
+ echo elgg_view("output/{$valtype}", array('value' => $vars['entity']->$shortname));
+ ?>
+ </p>
+ <?php
+ }
+ }
+ }
+}
+
+if (!get_plugin_setting('user_defined_fields', 'profile')) {
+ if ($vars['entity']->isBanned()) {
+ echo "<div class='banned_user'>";
+ echo elgg_echo('profile:banned');
+ echo "</div>";
+ } else {
+ if ($vars['entity']->description) {
+ echo "<p class='aboutme_title'><b>" . elgg_echo("profile:aboutme") . "</b></p>";
+ echo "<div class='aboutme_contents'>" . elgg_view('output/longtext', array('value' => $vars['entity']->description)) . "</div>";
+ }
+ }
+}