diff options
author | pete <pete@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2008-06-24 18:52:00 +0000 |
---|---|---|
committer | pete <pete@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2008-06-24 18:52:00 +0000 |
commit | fe5cee34c946f0d99f64f5a14955306d8d5f2527 (patch) | |
tree | 9c70db4e24157d9a7c883db6d71a358fabb7a239 /mod/profile | |
parent | c660db3ef021dfff32a0289a635842e06659244c (diff) | |
download | elgg-fe5cee34c946f0d99f64f5a14955306d8d5f2527.tar.gz elgg-fe5cee34c946f0d99f64f5a14955306d8d5f2527.tar.bz2 |
profile box fixes
git-svn-id: https://code.elgg.org/elgg/trunk@1113 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/profile')
-rw-r--r-- | mod/profile/views/default/profile/userdetails.php | 256 |
1 files changed, 134 insertions, 122 deletions
diff --git a/mod/profile/views/default/profile/userdetails.php b/mod/profile/views/default/profile/userdetails.php index 30de55189..aacc17c03 100644 --- a/mod/profile/views/default/profile/userdetails.php +++ b/mod/profile/views/default/profile/userdetails.php @@ -1,122 +1,134 @@ -<?php
-
- /**
- * Elgg user display (details)
- *
- * @package ElggProfile
- * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
- * @author Ben Werdmuller <ben@curverider.co.uk>
- * @copyright Curverider Ltd 2008
- * @link http://elgg.com/
- *
- * @uses $vars['entity'] The user entity
- */
-
- if ($vars['full'] == true) {
- $iconsize = "large";
- } else {
- $iconsize = "medium";
- }
-
- // wrap all profile info
- echo "<div id=\"profile_info\">";
-
- // wrap the icon and links in a div
- echo "<div id=\"profile_info_column_left\">";
-
- // get the user's main profile picture
- echo elgg_view(
- "profile/icon", array(
- 'entity' => $vars['entity'],
- 'align' => "left",
- 'size' => $iconsize,
- )
- );
-
- //display relevant links
- echo "<div style=\"clear:both\"></div>" . elgg_view("profile/profilelinks", array("entity" => $vars['entity']));
-
- // close the icon and links div
- echo "</div>";
-
-?>
-
- <div id="profile_info_column_right" >
-
- <?php
-
- // display the users name
- echo "<h2><a href=\"" . $vars['entity']->getUrl() . "\">" . $vars['entity']->name . "</a></h2> <br />";
-
- if ($vars['full'] == true) {
-
- ?>
- <?php
-
- 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)) {
-
- ?>
-
- <p>
- <b><?php
-
- echo elgg_echo("profile:{$shortname}");
-
- ?>: </b>
- <?php
-
- echo elgg_view("output/{$valtype}",array('value' => $vars['entity']->$shortname));
-
- ?>
-
- </p>
-
- <?php
- }
- }
- }
-
- }
-
- ?>
- </div><!-- /#profile_info_column_right -->
-
- <div style="clearfloat"></div>
-
- <div id="profile_info_wide">
- <p><b><?php echo elgg_echo("profile:aboutme"); ?></b><br /><?php echo nl2br($vars['entity']->description); ?></p>
-
-<?php
-
- if ($vars['entity']->canEdit()) {
-
-?>
- <p class="profile_info_edit_buttons">
- <a href="<?php echo $vars['url']; ?>mod/profile/edit.php"><?php echo elgg_echo("edit"); ?></a>
- </p>
-<?php
-
- }
-
- // TODO: Add admin console options here
- if (isadminloggedin()){
- if ($_SESSION['id']!=$vars['entity']->guid){
-?>
- <p>
- <a href="<?php echo $vars['url']; ?>actions/admin/user/ban?guid=<?php echo $vars['entity']->guid; ?>"><?php echo elgg_echo("ban"); ?></a>
- </p>
- <p>
- <a href="<?php echo $vars['url']; ?>actions/admin/user/delete?guid=<?php echo $vars['entity']->guid; ?>"><?php echo elgg_echo("delete"); ?></a>
- </p>
-<?php
- }
- }
-?>
-
-</div><!-- /#profile_info_wide -->
-
-</div><!-- /#profile_info -->
+<?php + + /** + * Elgg user display (details) + * + * @package ElggProfile + * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2 + * @author Ben Werdmuller <ben@curverider.co.uk> + * @copyright Curverider Ltd 2008 + * @link http://elgg.com/ + * + * @uses $vars['entity'] The user entity + */ + + if ($vars['full'] == true) { + $iconsize = "large"; + } else { + $iconsize = "medium"; + } + + // wrap all profile info + echo "<div id=\"profile_info\">"; + +?> + +<table> +<tr> +<td> + +<?php + + // wrap the icon and links in a div + echo "<div id=\"profile_info_column_left\">"; + + // get the user's main profile picture + echo elgg_view( + "profile/icon", array( + 'entity' => $vars['entity'], + //'align' => "left", + 'size' => $iconsize, + ) + ); + + // display relevant links + echo elgg_view("profile/profilelinks", array("entity" => $vars['entity'])); + + // close the icon and links div + echo "</div>"; + +?> +<!-- /#profile_info_column_left --> +</td> +<td> + + <div id="profile_info_column_right" > + + <?php + + // display the users name + echo "<h2><a href=\"" . $vars['entity']->getUrl() . "\">" . $vars['entity']->name . "</a></h2> <br />"; + + if ($vars['full'] == true) { + + ?> + <?php + + 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)) { + + ?> + + <p> + <b><?php + + echo elgg_echo("profile:{$shortname}"); + + ?>: </b> + <?php + + echo elgg_view("output/{$valtype}",array('value' => $vars['entity']->$shortname)); + + ?> + + </p> + + <?php + } + } + } + + } + + ?> + </div><!-- /#profile_info_column_right --> + +</td> +</tr> +</table> + + <div id="profile_info_wide"> + <p><b><?php echo elgg_echo("profile:aboutme"); ?></b><br /><?php echo nl2br($vars['entity']->description); ?></p> + +<?php + + if ($vars['entity']->canEdit()) { + +?> + <p class="profile_info_edit_buttons"> + <a href="<?php echo $vars['url']; ?>mod/profile/edit.php"><?php echo elgg_echo("edit"); ?></a> + +<?php + + } + + // TODO: Add admin console options here + if (isadminloggedin()){ + if ($_SESSION['id']!=$vars['entity']->guid){ +?> + + <a href="<?php echo $vars['url']; ?>actions/admin/user/ban?guid=<?php echo $vars['entity']->guid; ?>"><?php echo elgg_echo("ban"); ?></a> + + <a href="<?php echo $vars['url']; ?>actions/admin/user/delete?guid=<?php echo $vars['entity']->guid; ?>"><?php echo elgg_echo("delete"); ?></a> + +<?php + } + } +?> +</p> +</div><!-- /#profile_info_wide --> + +</div><!-- /#profile_info --> |