aboutsummaryrefslogtreecommitdiff
path: root/mod/profile/views/default
diff options
context:
space:
mode:
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-03-04 16:36:48 +0000
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-03-04 16:36:48 +0000
commit88c3d54f0a6ceb0b539af4e922157b101b945542 (patch)
tree476b22df83c386c930b303a12d8a2a79e235bb7d /mod/profile/views/default
parent21b799f2e9c3f307497e3f8c10fb547036380d82 (diff)
downloadelgg-88c3d54f0a6ceb0b539af4e922157b101b945542.tar.gz
elgg-88c3d54f0a6ceb0b539af4e922157b101b945542.tar.bz2
Merged interface changes to profile in.
git-svn-id: http://code.elgg.org/elgg/trunk@5284 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/profile/views/default')
-rwxr-xr-xmod/profile/views/default/profile/admin_menu.php42
-rw-r--r--mod/profile/views/default/profile/css.php436
-rw-r--r--mod/profile/views/default/profile/edit.php42
-rw-r--r--mod/profile/views/default/profile/editdefaultprofile.php56
-rw-r--r--mod/profile/views/default/profile/editicon.php107
-rw-r--r--mod/profile/views/default/profile/gallery.php47
-rw-r--r--mod/profile/views/default/profile/hoverover.php38
-rw-r--r--mod/profile/views/default/profile/icon.php89
-rw-r--r--mod/profile/views/default/profile/javascript.php22
-rw-r--r--mod/profile/views/default/profile/listing.php103
-rw-r--r--mod/profile/views/default/profile/menu/actions.php53
-rw-r--r--mod/profile/views/default/profile/menu/adminlinks.php62
-rw-r--r--mod/profile/views/default/profile/menu/adminwrapper.php22
-rw-r--r--mod/profile/views/default/profile/menu/links.php58
-rw-r--r--mod/profile/views/default/profile/menu/linksownpage.php52
-rw-r--r--mod/profile/views/default/profile/metatags.php34
-rwxr-xr-xmod/profile/views/default/profile/profile_contents/activity.php26
-rwxr-xr-xmod/profile/views/default/profile/profile_contents/details.php63
-rwxr-xr-xmod/profile/views/default/profile/profile_contents/friends.php21
-rwxr-xr-xmod/profile/views/default/profile/profile_contents/twitter.php24
-rw-r--r--mod/profile/views/default/profile/profile_contents/widgets.php0
-rwxr-xr-xmod/profile/views/default/profile/profile_navigation.php57
-rwxr-xr-xmod/profile/views/default/profile/profile_ownerblock.php124
-rw-r--r--mod/profile/views/default/profile/profilelinks.php50
-rw-r--r--mod/profile/views/default/profile/userdetails.php174
-rw-r--r--mod/profile/views/default/river/user/default/profileiconupdate.php10
-rw-r--r--mod/profile/views/default/river/user/default/profileupdate.php2
27 files changed, 1082 insertions, 732 deletions
diff --git a/mod/profile/views/default/profile/admin_menu.php b/mod/profile/views/default/profile/admin_menu.php
new file mode 100755
index 000000000..c89505673
--- /dev/null
+++ b/mod/profile/views/default/profile/admin_menu.php
@@ -0,0 +1,42 @@
+<?php
+/**
+ * This is the admin menu that appears on a user's profile page
+ **/
+global $CONFIG;
+
+if (isadminloggedin()){
+ if ($_SESSION['id']!=page_owner()){
+ $user = get_user(page_owner());
+ $url = $vars['url'];
+ $ts = time();
+ $token = generate_action_token($ts);
+
+?>
+<div class="owner_block_links">
+<ul class="admin_menu">
+<li><a href="#" onclick="elgg_slide_toggle(this,'.owner_block_links','.admin_menu_options');">Admin options&hellip;</a>
+
+ <ul class="admin_menu_options">
+ <li><a href="<?php echo $url; ?>pg/settings/user/<?php echo $user->username; ?>/"><?php echo elgg_echo('profile:editdetails'); ?></a></li>
+ <?php
+ if (!$user->isBanned()) {
+ echo "<li>".elgg_view('output/confirmlink', array('text' => elgg_echo("ban"), 'href' => "{$url}action/admin/user/ban?guid={$user->guid}&__elgg_token=$token&__elgg_ts=$ts")) . "</li>";
+ } else {
+ echo "<li>".elgg_view('output/confirmlink', array('text' => elgg_echo("unban"), 'href' => "{$url}action/admin/user/unban?guid={$user->guid}&__elgg_token=$token&__elgg_ts=$ts")) . "</li>";
+ }
+ echo "<li>".elgg_view('output/confirmlink', array('text' => elgg_echo("delete"), 'href' => "{$url}action/admin/user/delete?guid={$user->guid}&__elgg_token=$token&__elgg_ts=$ts")) . "</li>";
+ echo "<li>".elgg_view('output/confirmlink', array('text' => elgg_echo("resetpassword"), 'href' => "{$url}action/admin/user/resetpassword?guid={$user->guid}&__elgg_token=$token&__elgg_ts=$ts")) . "</li>";
+ if (!$vars['entity']->admin) {
+ echo "<li>".elgg_view('output/confirmlink', array('text' => elgg_echo("makeadmin"), 'href' => "{$url}action/admin/user/makeadmin?guid={$user->guid}&__elgg_token=$token&__elgg_ts=$ts")) . "</li>";
+ } else {
+ echo "<li>".elgg_view('output/confirmlink', array('text' => elgg_echo("removeadmin"), 'href' => "{$url}action/admin/user/removeadmin?guid={$user->guid}&__elgg_token=$token&__elgg_ts=$ts")) . "</li>";
+ }
+ ?>
+ </ul>
+</li>
+</ul>
+</div>
+<?php
+ }
+}
+?>
diff --git a/mod/profile/views/default/profile/css.php b/mod/profile/views/default/profile/css.php
index cf95d9bdb..b475b6bdd 100644
--- a/mod/profile/views/default/profile/css.php
+++ b/mod/profile/views/default/profile/css.php
@@ -1,25 +1,326 @@
<?php
-
- /**
- * Elgg Profile
- *
- * @package Profile
- * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
- * @author Curverider Ltd <info@elgg.com>
- * @copyright Curverider Ltd 2008-2010
- * @link http://elgg.com/
- */
-
+/**
+ * Elgg Profile
+ *
+ * @package Profile
+ * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
+ * @author Curverider Ltd <info@elgg.com>
+ * @copyright Curverider Ltd 2008-2010
+ * @link http://elgg.com/
+ */
?>
-
-#profile_icon_wrapper {
+/* ***************************************
+ main layout blocks
+*************************************** */
+#profile_content {
+ float:right;
+ width:700px;
+ position: relative;
+}
+#profile_sidebar {
+ width:230px;
float:left;
}
-
+.elgg_horizontal_tabbed_nav.profile {
+ margin-top:0px;
+ margin-bottom:25px;
+ position:relative;
+}
+.elgg_horizontal_tabbed_nav.profile .profile_name {
+ display:block;
+ width:265px;
+ position:absolute;
+}
+.elgg_horizontal_tabbed_nav.profile .profile_name h2 {
+ margin:0;
+ padding:0;
+ border:none;
+}
+.elgg_horizontal_tabbed_nav.profile ul {
+ margin-left:260px;
+}
+
+/* ***************************************
+ default avatar icons
+*************************************** */
.usericon {
position:relative;
}
+.usericon.tiny {
+ width:25px;
+ height:25px;
+}
+.usericon.small {
+ width:40px;
+ height:40px;
+}
+
+/* ***************************************
+ ownerblock in sidebar
+*************************************** */
+#profile_sidebar #owner_block {
+ background-color: #eeeeee;
+ -webkit-border-radius: 8px;
+ -moz-border-radius: 8px;
+ padding:15px;
+ min-height:270px;
+}
+#owner_block .owner_block_icon {
+ float:left;
+ padding:0;
+ margin:0;
+}
+#owner_block .owner_block_icon.large {
+ width:200px;
+ height:200px;
+ overflow: hidden;
+ float:none;
+}
+#owner_block .owner_block_contents {
+ margin-left: 50px;
+}
+#owner_block .owner_block_contents h3 {
+ margin-top:-4px;
+}
+#owner_block .owner_block_contents p.profile_info {
+ margin:0;
+ padding:0;
+ color: #666666;
+}
+#owner_block .owner_block_contents p.profile_info.briefdescription {
+ font-size: 90%;
+ line-height:1.2em;
+ font-style: italic;
+}
+#owner_block .owner_block_contents p.profile_info.location {
+ font-size: 90%;
+}
+#owner_block .profile_actions {
+ margin-top:10px;
+}
+#owner_block .profile_actions a.action_button {
+ margin-bottom:4px;
+ display: table;
+}
+/* ownerblock links to owners tools */
+.owner_block_links {
+ margin-top:5px;
+}
+.owner_block_links ul {
+ margin:0;
+ padding:0;
+ list-style: none;
+}
+.owner_block_links ul li.selected a {
+ background: #4690D6;
+ color:white;
+}
+.owner_block_links ul li a {
+ display:block;
+ -webkit-border-radius: 8px;
+ -moz-border-radius: 8px;
+ background-color:white;
+ margin:3px 0 5px 0;
+ padding:2px 4px 2px 8px;
+}
+.owner_block_links ul li a:hover {
+ background:#0054A7;
+ color:white;
+ text-decoration:none;
+}
+
+
+/* ***************************************
+ admin menu in sidebar
+*************************************** */
+.owner_block_links .admin_menu_options {
+ display: none;
+}
+.owner_block_links ul.admin_menu {
+ background-color:white;
+ -webkit-border-radius: 8px;
+ -moz-border-radius: 8px;
+ cursor:pointer;
+}
+.owner_block_links ul.admin_menu li a {
+ background-color: red;
+ color:white;
+ margin-bottom:0;
+}
+.owner_block_links ul.admin_menu li ul.admin_menu_options li a {
+ color:red;
+ background-color:white;
+ display:block;
+ margin:0px;
+ padding:2px 4px 2px 13px;
+}
+.owner_block_links ul.admin_menu li ul.admin_menu_options li a:hover {
+ color:black;
+ background:none;
+ text-decoration: underline;
+}
+
+
+/* ***************************************
+ full profile info panel
+*************************************** */
+#profile_content .odd {
+ background-color:#f4f4f4;
+ -webkit-border-radius: 4px;
+ -moz-border-radius: 4px;
+ margin:0 0 7px 0;
+ padding:2px 4px 2px 4px;
+}
+#profile_content .even {
+ background-color:#f4f4f4;
+ -webkit-border-radius: 4px;
+ -moz-border-radius: 4px;
+ margin:0 0 7px 0;
+ padding:2px 4px 2px 4px;
+}
+#profile_content .aboutme_title {
+ background-color:#f4f4f4;
+ -webkit-border-radius: 4px;
+ -moz-border-radius: 4px;
+ margin:0 0 0px 0;
+ padding:2px 4px 2px 4px;
+}
+#profile_content .aboutme_contents {
+ padding:2px 0 0 3px;
+}
+
+/* ***************************************
+ friends panel within profile
+*************************************** */
+#profile_content .entity_listing .entity_listing_info {
+ width:664px;
+}
+
+
+/* ***************************************
+ twitter panel within profile
+*************************************** */
+ul#twitter_update_list li {
+ background-image: url(<?php echo $vars['url']; ?>mod/elgg_layout/graphics/speech_bubble_tail.gif);
+ background-position:right bottom;
+ background-repeat: no-repeat;
+ list-style-image:none;
+ list-style-position:outside;
+ list-style-type:none;
+ margin:0 0 5px 0;
+ padding:0;
+ overflow-x: hidden;
+}
+ul#twitter_update_list li span {
+ color:#666666;
+ background:#ececec;
+ -webkit-border-radius: 4px;
+ -moz-border-radius: 4px;
+ padding:3px 5px 4px 5px;
+ display:block;
+}
+ul#twitter_update_list li a {
+ display:block;
+ margin:-2px 0 0 4px;
+}
+ul#twitter_update_list li span a {
+ display:inline !important;
+}
+p.visit_twitter a {
+ background:url(<?php echo $vars['url']; ?>mod/elgg_layout/graphics/twitter16px.png) left no-repeat;
+ padding:0 0 0 20px;
+ margin:0;
+}
+.visit_twitter {
+ padding:5px 0;
+ margin:0 0 0 0;
+ border-top:1px solid #dedede;
+}
+
+
+/* ***************************************
+ edit profile page
+*************************************** */
+form#edit_profile {
+ margin-top:10px;
+}
+
+
+/* ***************************************
+ user avatar upload & crop page
+*************************************** */
+#avatar_upload {
+ height:145px;
+}
+#current_user_avatar {
+ float:left;
+ width:160px;
+ height:130px;
+ border-right:1px solid #cccccc;
+ margin:0 20px 0 0;
+}
+#avatar_croppingtool {
+ border-top: 1px solid #cccccc;
+ margin:20px 0 0 0;
+ padding:10px 0 0 0;
+}
+#avatar_croppingtool .current_user_avatar {
+ float: left;
+ margin-right: 20px;
+}
+#avatar_croppingtool .user_avatar_crop_preview {
+ float: left;
+ position: relative;
+ overflow: hidden;
+ width: 100px;
+ height: 100px;
+}
+
+
+/* ***************************************
+ banned user
+*************************************** */
+/* banned user full profile panel */
+#profile_content .banned_user {
+ border:2px solid red;
+ padding:4px 8px;
+ -webkit-border-radius: 6px;
+ -moz-border-radius: 6px;
+}
+/* banned user in friends lists */
+.entity_listing_info p.entity_title.user.banned {
+ text-decoration: line-through;
+}
+.entity_listing_info p.entity_title.user.banned a {
+ color:red;
+}
+
+
+/* ***************************************
+ admin area - custom profile fields
+*************************************** */
+.default_profile_reset {
+ border-top: 1px solid #dedede;
+ margin-top:30px;
+}
+.default_profile_reset input[type="submit"] {
+ background: #dedede;
+ border-color: #dedede;
+ color:#666666;
+ text-shadow: none;
+ float:right;
+}
+.default_profile_reset input[type="submit"]:hover {
+ background: red;
+ border-color: red;
+ color:white;
+}
+
+
+/* ***************************************
+ avatar drop-down menu
+*************************************** */
.avatar_menu_button {
width:15px;
height:15px;
@@ -44,53 +345,56 @@
width:15px;
height:15px;
}
+/* user avatar submenu options */
.usericon div.sub_menu {
display:none;
position:absolute;
- padding:2px;
+ padding:0;
margin:0;
border-top:solid 1px #E5E5E5;
border-left:solid 1px #E5E5E5;
border-right:solid 1px #999999;
border-bottom:solid 1px #999999;
- width:160px;
+ width:164px;
background:#FFFFFF;
text-align:left;
+ -webkit-box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.50); /* safari v3+ */
+ -moz-box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.50); /* FF v3.5+ */
}
div.usericon a.icon img {
z-index:10;
}
-
-.usericon div.sub_menu a {margin:0;padding:2px;}
.usericon div.sub_menu a:link,
.usericon div.sub_menu a:visited,
-.usericon div.sub_menu a:hover{ display:block;}
-.usericon div.sub_menu a:hover{ background:#cccccc; text-decoration:none;}
-
+.usericon div.sub_menu a:hover {
+ display:block;
+}
+.usericon div.sub_menu a:hover {
+ background:#cccccc;
+ text-decoration:none;
+}
.usericon div.sub_menu h3 {
- font-size:1.2em;
- padding-bottom:3px;
+ font-size:1.3em;
+ line-height: 1.1em;
+ padding:0;
border-bottom:solid 1px #dddddd;
color: #4690d6;
margin:0 !important;
}
-.usericon div.sub_menu h3:hover {
-
+.usericon div.sub_menu h3 a {
+ padding:3px 3px 3px 6px !important;
}
-
-.user_menu_addfriend,
-.user_menu_removefriend,
-.user_menu_profile,
-.user_menu_friends,
-.user_menu_friends_of,
-.user_menu_blog,
-.user_menu_file,
-.user_menu_messages,
-.user_menu_admin,
-.user_menu_pages {
- margin:0;
- padding:0;
+.usericon div.sub_menu p {
+ margin:0 !important;
+ padding:0 !important;
+ height:auto !important;
+ line-height:1.2em !important;
+ font-size:12px !important;
}
+.usericon div.sub_menu p a {
+ padding:3px 3px 3px 6px !important;
+}
+/* admin menu options in avatar submenu */
.user_menu_admin {
border-top:solid 1px #dddddd;
}
@@ -101,24 +405,48 @@ div.usericon a.icon img {
color:white !important;
background:red !important;
}
+/* /////////////////////////////////////////////////////////////// >>>END verified */
+
-.resetdefaultprofile {
- padding:0 10px 0 10px;
+
+/*
+#profile_status_wrapper {
+ background-color:#eeeeee;
+ -webkit-border-radius: 4px;
+ -moz-border-radius: 4px;
+ padding:2px 4px 2px 4px;
+ margin:0 0 7px 0;
+ line-height:1.2em;
+ min-height:16px;
+
+ position: relative;
}
-.resetdefaultprofile input[type="submit"] {
- background: #dedede;
- border-color: #dedede;
- color:#333333;
+#profile_status_wrapper.inline {
+ margin-top:10px;
}
-.resetdefaultprofile input[type="submit"]:hover {
- background: red;
- border-color: red;
- color:white;
+.profile_status span {
+ display:block;
+ font-size:90%;
+ color:#666666;
}
+a.status_update {
+ float:right;
+}
+div.profile_status {
+ z-index: 2;
+ position: relative;
+}
+#profile_status_tail {
+ position: absolute;
+ width:17px;
+ height:12px;
+ left:-11px;
+ bottom:-5px;
-/* Banned user */
-#profile_banned {
- background-color:#FF8888;
- border:3px solid #FF0000;
- padding:2px;
-} \ No newline at end of file
+ background-image: url(<?php echo $vars['url']; ?>mod/thewire/graphics/speech_tail.png);
+ background-position: 0 0;
+ background-repeat: no-repeat;
+ background-color:transparent;
+ z-index: 1;
+}
+*/ \ No newline at end of file
diff --git a/mod/profile/views/default/profile/edit.php b/mod/profile/views/default/profile/edit.php
index 11e3c2997..06d7bcfe2 100644
--- a/mod/profile/views/default/profile/edit.php
+++ b/mod/profile/views/default/profile/edit.php
@@ -1,25 +1,28 @@
<?php
-
- /**
- * Elgg profile edit form
- *
- * @package ElggProfile
- * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
- * @author Curverider Ltd <info@elgg.com>
- * @copyright Curverider Ltd 2008-2010
- * @link http://elgg.com/
- *
- * @uses $vars['entity'] The user entity
- * @uses $vars['profile'] Profile items from $CONFIG->profile, defined in profile/start.php for now
- */
-
+/**
+ * Elgg profile edit form
+ *
+ * @package ElggProfile
+ * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
+ * @author Curverider Ltd <info@elgg.com>
+ * @copyright Curverider Ltd 2008-2010
+ * @link http://elgg.com/
+ *
+ * @uses $vars['entity'] The user entity
+ * @uses $vars['profile'] Profile items from $CONFIG->profile, defined in profile/start.php for now
+ */
?>
-<div class="contentWrapper">
-<form action="<?php echo $vars['url']; ?>action/profile/edit" method="post">
+<form action="<?php echo $vars['url']; ?>action/profile/edit" method="post" id="edit_profile">
<?php echo elgg_view('input/securitytoken') ?>
-<?php
- //var_export($vars['profile']);
+ <p><label>
+ <?php echo elgg_echo('user:name:label'); ?></label>
+ <?php
+ echo elgg_view('input/text',array('internalname' => 'name', 'value' => page_owner_entity()->name));
+ ?>
+ </p>
+
+<?php
if (is_array($vars['config']->profile) && sizeof($vars['config']->profile) > 0)
foreach($vars['config']->profile as $shortname => $valtype) {
if ($metadata = get_metadata_byname($vars['entity']->guid, $shortname)) {
@@ -63,5 +66,4 @@
<input type="submit" class="submit_button" value="<?php echo elgg_echo("save"); ?>" />
</p>
-</form>
-</div> \ No newline at end of file
+</form> \ No newline at end of file
diff --git a/mod/profile/views/default/profile/editdefaultprofile.php b/mod/profile/views/default/profile/editdefaultprofile.php
index 73f0a8783..42680f4df 100644
--- a/mod/profile/views/default/profile/editdefaultprofile.php
+++ b/mod/profile/views/default/profile/editdefaultprofile.php
@@ -1,35 +1,33 @@
<?php
- /**
- * Elgg profile index
- *
- * @package ElggProfile
- * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
- * @author Curverider Ltd <info@elgg.com>
- * @copyright Curverider Ltd 2008-2010
- * @link http://elgg.com/
- */
+/**
+ * Elgg profile index
+ *
+ * @package ElggProfile
+ * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
+ * @author Curverider Ltd <info@elgg.com>
+ * @copyright Curverider Ltd 2008-2010
+ * @link http://elgg.com/
+ */
- $label_text = elgg_echo('profile:label');
- $type_text = elgg_echo('profile:type');
+$label_text = elgg_echo('profile:label');
+$type_text = elgg_echo('profile:type');
- $label_control = elgg_view('input/text', array('internalname' => 'label'));
- $type_control = elgg_view('input/pulldown', array('internalname' => 'type', 'options_values' => array(
- 'text' => elgg_echo('text'),
- 'longtext' => elgg_echo('longtext'),
- 'tags' => elgg_echo('tags'),
- 'url' => elgg_echo('url'),
- 'email' => elgg_echo('email')
- )));
+$label_control = elgg_view('input/text', array('internalname' => 'label'));
+$type_control = elgg_view('input/pulldown', array('internalname' => 'type', 'options_values' => array(
+ 'text' => elgg_echo('text'),
+ 'longtext' => elgg_echo('longtext'),
+ 'tags' => elgg_echo('tags'),
+ 'url' => elgg_echo('url'),
+ 'email' => elgg_echo('email')
+)));
- $submit_control = elgg_view('input/submit', array('internalname' => elgg_echo('save'), 'value' => elgg_echo('save')));
+$submit_control = elgg_view('input/submit', array('internalname' => elgg_echo('save'), 'value' => elgg_echo('Add')));
- $formbody = <<< END
- <p>$label_text: $label_control
- $type_text: $type_control
- $submit_control</p>
+$formbody = <<< END
+ <p>$label_text: $label_control
+ $type_text: $type_control
+ $submit_control</p>
END;
- echo "<div class=\"contentWrapper\">";
- echo "<p>" . elgg_echo('profile:explainchangefields') . "</p>";
- echo elgg_view('input/form', array('body' => $formbody, 'action' => $vars['url'] . 'action/profile/editdefault'));
- echo "</div>";
-?> \ No newline at end of file
+
+echo "<p>" . elgg_echo('profile:explainchangefields') . "</p>";
+echo elgg_view('input/form', array('body' => $formbody, 'action' => $vars['url'] . 'action/profile/editdefault'));
diff --git a/mod/profile/views/default/profile/editicon.php b/mod/profile/views/default/profile/editicon.php
index 7731d9899..20e16b978 100644
--- a/mod/profile/views/default/profile/editicon.php
+++ b/mod/profile/views/default/profile/editicon.php
@@ -1,24 +1,21 @@
<?php
-
- /**
- * Elgg profile icon edit form
- *
- * @package ElggProfile
- * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
- * @author Curverider
- * @copyright Curverider Ltd 2008-2010
- * @link http://elgg.com/
- *
- * @uses $vars['entity'] The user entity
- * @uses $vars['profile'] Profile items from $CONFIG->profile, defined in profile/start.php for now
- */
-
- // user is passed to view and set by caller (normally the page editicon)
- $currentuser = $vars['user'];
-
+/**
+ * Elgg profile icon edit form
+ *
+ * @package ElggProfile
+ * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
+ * @author Curverider
+ * @copyright Curverider Ltd 2008-2010
+ * @link http://elgg.com/
+ *
+ * @uses $vars['entity'] The user entity
+ * @uses $vars['profile'] Profile items from $CONFIG->profile, defined in profile/start.php for now
+ */
+
+// user is passed to view and set by caller (normally the page editicon)
+$currentuser = $vars['user'];
?>
<!-- grab the required js for icon cropping -->
-<div class="contentWrapper">
<script type="text/javascript" src="<?php echo $vars['url']; ?>mod/profile/views/default/js/jquery.imgareaselect-0.8.min.js"></script>
<p><?php echo elgg_echo('profile:profilepictureinstructions'); ?></p>
@@ -29,13 +26,13 @@
<?php
$user_avatar = $currentuser->getIcon('medium');
- echo "<img src=\"{$user_avatar}\" alt=\"avatar\" />";
+ echo "<img src='{$user_avatar}' alt='avatar' />";
?>
</div>
-<div id="profile_picture_form">
+<div id="avatar_upload">
<form action="<?php echo $vars['url']; ?>action/profile/iconupload" method="post" enctype="multipart/form-data">
<?php echo elgg_view('input/securitytoken'); ?>
<input type="hidden" name="username" value="<?php echo $currentuser->username; ?>" />
@@ -50,21 +47,16 @@
</form>
</div>
-<div id="profile_picture_croppingtool">
+<div id="avatar_croppingtool">
<label><?php echo elgg_echo('profile:profilepicturecroppingtool'); ?></label><br />
<p>
<?php
-
echo elgg_echo("profile:createicon:instructions");
-
//display the current user photo
-
$user_master_image = $currentuser->getIcon('master');
-
?>
</p>
<script type="text/javascript">
-
//function to display a preview of the users cropped section
function preview(img, selection) {
// catch for the first click on the image
@@ -72,11 +64,11 @@
return;
}
- var origWidth = $("#user_avatar").width(); //get the width of the users master photo
- var origHeight = $("#user_avatar").height(); //get the height of the users master photo
+ var origWidth = $(".current_user_avatar").width(); //get the width of the users master photo
+ var origHeight = $(".current_user_avatar").height(); //get the height of the users master photo
var scaleX = 100 / selection.width;
var scaleY = 100 / selection.height;
- $('#user_avatar_preview > img').css({
+ $('.user_avatar_crop_preview > img').css({
width: Math.round(scaleX * origWidth) + 'px',
height: Math.round(scaleY * origHeight) + 'px',
marginLeft: '-' + Math.round(scaleX * selection.x1) + 'px',
@@ -84,54 +76,34 @@
});
}
- //variables for the newly cropped avatar
- //var $x1, $y1, $x2, $y2, $w, $h;
-
- function selectChange(img, selection){
-
+ function selectChange(img, selection){
//populate the form with the correct coordinates once a user has cropped their image
$('#x_1').val(selection.x1);
$('#x_2').val(selection.x2);
$('#y_1').val(selection.y1);
$('#y_2').val(selection.y2);
-
- }
+ }
- $(document).ready(function () {
-
- //get the coordinates from the form
- /*
- var x_1 = $('#x_1').val();
- var x_2 = $('#x_2').val();
- var y_1 = $('#y_1').val();
- var y_2 = $('#y_2').val();
- var w = x_2 - x_1;
- var h = y_2 - y_1;
- selection = { x1: x_1, y1: y_1, x2: x_2, y2: y_2, width: w, height: h };
- */
-
- $('<div id="user_avatar_preview"><img src="<?php echo $user_master_image; ?>" /></div>')
- .insertAfter($('#user_avatar'));
+ $(document).ready(function () {
- $('<div id="user_avatar_preview_title"><label><?php echo elgg_echo('profile:preview'); ?></label></div>').insertBefore($('#user_avatar_preview'));
- });
+ $('<div class="user_avatar_crop_preview"><img src="<?php echo $user_master_image; ?>" /></div>')
+ .insertAfter($('.current_user_avatar'));
- $(window).load(function () {
-
- //this produces the coordinates
- $('#user_avatar').imgAreaSelect({ selectionOpacity: 0, onSelectEnd: selectChange });
- //show the preview
- $('#user_avatar').imgAreaSelect({ aspectRatio: '1:1', onSelectChange: preview });
+ $('<label><?php echo elgg_echo('profile:preview'); ?></label><br />').insertBefore($('.user_avatar_crop_preview'));
+ });
+
+ $(window).load(function () {
+ //this produces the coordinates
+ $('.current_user_avatar').imgAreaSelect({ selectionOpacity: 0, onSelectEnd: selectChange });
+ //show the preview
+ $('.current_user_avatar').imgAreaSelect({ aspectRatio: '1:1', onSelectChange: preview });
- });
-
+ });
</script>
-<p>
-<img id="user_avatar" src="<?php echo $user_master_image; ?>" alt="<?php echo elgg_echo("profile:icon"); ?>" />
-</p>
-
-<div class="clearfloat"></div>
+<div id="avatar_cropping" class="clearfloat">
+ <img class="current_user_avatar" src="<?php echo $user_master_image; ?>" alt="<?php echo elgg_echo("profile:icon"); ?>" />
+</div>
<form action="<?php echo $vars['url']; ?>action/profile/cropicon" method="post" />
<?php echo elgg_view('input/securitytoken'); ?>
@@ -144,6 +116,3 @@
</form>
</div>
-<div class="clearfloat"></div>
-
-</div>
diff --git a/mod/profile/views/default/profile/gallery.php b/mod/profile/views/default/profile/gallery.php
deleted file mode 100644
index ffbabfc7d..000000000
--- a/mod/profile/views/default/profile/gallery.php
+++ /dev/null
@@ -1,47 +0,0 @@
-<?php
-
- /**
- * Elgg user display (gallery)
- *
- * @package ElggProfile
- * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
- * @author Curverider Ltd <info@elgg.com>
- * @copyright Curverider Ltd 2008-2010
- * @link http://elgg.com/
- *
- * @uses $vars['entity'] The user entity
- */
-
- //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));
- }
-
- } */
-
- $icon = elgg_view(
- "profile/icon", array(
- 'entity' => $vars['entity'],
- 'size' => 'medium',
- )
- );
-
- $banned = $vars['entity']->isBanned();
-
- $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>";
- else
- $info .= "<p><b><strike>" . $vars['entity']->name . "</b></strike><br />".elgg_echo('profile:banned')."</p>";
-
- // echo elgg_view_listing($icon, $info);
- echo elgg_view('search/gallery_listing',array('icon' => $icon, 'info' => $info));
-
-?> \ No newline at end of file
diff --git a/mod/profile/views/default/profile/hoverover.php b/mod/profile/views/default/profile/hoverover.php
index 678fbbada..571585311 100644
--- a/mod/profile/views/default/profile/hoverover.php
+++ b/mod/profile/views/default/profile/hoverover.php
@@ -1,26 +1,20 @@
<?php
-
- /**
- * Elgg profile icon hover over
- *
- * @package ElggProfile
- * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
- * @author Curverider Ltd <info@elgg.com>
- * @copyright Curverider Ltd 2008-2010
- * @link http://elgg.com/
- *
- * @uses $vars['entity'] The user entity. If none specified, the current user is assumed.
- */
-
+/**
+ * Elgg profile icon hover over
+ *
+ * @package ElggProfile
+ * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
+ * @author Curverider Ltd <info@elgg.com>
+ * @copyright Curverider Ltd 2008-2010
+ * @link http://elgg.com/
+ *
+ * @uses $vars['entity'] The user entity. If none specified, the current user is assumed.
+ */
?>
-
- <p class="user_menu_name">
- <b><?php echo $vars['entity']->name; ?></b>
- </p>
-
+<p class="user_menu_name">
+ <b><?php echo $vars['entity']->name; ?></b>
+</p>
<?php
-
- echo elgg_view("profile/hoverover/actions",$vars);
- echo elgg_view("profile/hoverover/links",$vars);
-
+ echo elgg_view('profile/hoverover/actions', $vars);
+ echo elgg_view('profile/hoverover/links', $vars);
?> \ No newline at end of file
diff --git a/mod/profile/views/default/profile/icon.php b/mod/profile/views/default/profile/icon.php
index 3fd6ab87b..59b16cdac 100644
--- a/mod/profile/views/default/profile/icon.php
+++ b/mod/profile/views/default/profile/icon.php
@@ -1,53 +1,54 @@
<?php
- /**
- * Elgg profile icon
- *
- * @package ElggProfile
- * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
- * @author Curverider Ltd <info@elgg.com>
- * @copyright Curverider Ltd 2008-2010
- * @link http://elgg.com/
- *
- * @uses $vars['entity'] The user entity. If none specified, the current user is assumed.
- * @uses $vars['size'] The size - small, medium or large. If none specified, medium is assumed.
- */
+/**
+ * Elgg profile icon
+ *
+ * @package ElggProfile
+ * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
+ * @author Curverider Ltd <info@elgg.com>
+ * @copyright Curverider Ltd 2008-2010
+ * @link http://elgg.com/
+ *
+ * @uses $vars['entity'] The user entity. If none specified, the current user is assumed.
+ * @uses $vars['size'] The size - small, medium or large. If none specified, medium is assumed.
+ */
- // Get entity
- if (empty($vars['entity']))
- $vars['entity'] = $vars['user'];
+// Get entity
+if (empty($vars['entity'])) {
+ $vars['entity'] = $vars['user'];
+}
- if ($vars['entity'] instanceof ElggUser) {
-
- $name = htmlentities($vars['entity']->name, ENT_QUOTES, 'UTF-8');
- $username = $vars['entity']->username;
-
- if ($icontime = $vars['entity']->icontime) {
- $icontime = "{$icontime}";
- } else {
- $icontime = "default";
- }
-
+if ($vars['entity'] instanceof ElggUser) {
+ $name = htmlentities($vars['entity']->name, ENT_QUOTES, 'UTF-8');
+ $username = $vars['entity']->username;
+
+ if ($icontime = $vars['entity']->icontime) {
+ $icontime = "{$icontime}";
+ } else {
+ $icontime = "default";
+ }
+
// Get size
- if (!in_array($vars['size'],array('small','medium','large','tiny','master','topbar')))
- $vars['size'] = "medium";
-
+ if (!in_array($vars['size'],array('small','medium','large','tiny','master','topbar'))) {
+ $vars['size'] = 'medium';
+ }
+
// Get any align and js
- if (!empty($vars['align'])) {
- $align = " align=\"{$vars['align']}\" ";
- } else {
- $align = "";
- }
+ if (!empty($vars['align'])) {
+ $align = " align=\"{$vars['align']}\" ";
+ } else {
+ $align = '';
+ }
// Override
- if (isset($vars['override']) && $vars['override'] == true) {
- $override = true;
- } else $override = false;
-
- if (!$override) {
-
+ if (isset($vars['override']) && $vars['override'] == true) {
+ $override = true;
+ } else $override = false;
+
+ if (!$override) {
+
?>
-<div class="usericon">
+<div class="usericon <?php echo $vars['size']; ?>">
<div class="avatar_menu_button"><img src="<?php echo $vars['url']; ?>_graphics/spacer.gif" border="0" width="15px" height="15px" /></div>
<div class="sub_menu">
@@ -79,7 +80,7 @@
?><img src="<?php echo $vars['entity']->getIcon($vars['size']); ?>" border="0" <?php echo $align; ?> alt="<?php echo htmlentities($vars['entity']->name, ENT_QUOTES, 'UTF-8'); ?>" title="<?php echo htmlentities($vars['entity']->name, ENT_QUOTES, 'UTF-8'); ?>" <?php echo $vars['js']; ?> /><?php
- if (!$override) {
+ if (!$override) {
?></a>
</div>
@@ -87,6 +88,4 @@
<?php
}
- }
-
-?> \ No newline at end of file
+} \ No newline at end of file
diff --git a/mod/profile/views/default/profile/javascript.php b/mod/profile/views/default/profile/javascript.php
index f2ad4b74b..a408d1c84 100644
--- a/mod/profile/views/default/profile/javascript.php
+++ b/mod/profile/views/default/profile/javascript.php
@@ -1,16 +1,16 @@
<?php
- /**
- * Elgg profile image Javascript
- *
- * @package ElggProfile
- * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
- * @author Curverider
- * @copyright Curverider Ltd 2008-2010
- * @link http://elgg.com/
- *
- * @uses $vars['entity'] The user entity
- */
+/**
+ * Elgg profile image Javascript
+ *
+ * @package ElggProfile
+ * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
+ * @author Curverider
+ * @copyright Curverider Ltd 2008-2010
+ * @link http://elgg.com/
+ *
+ * @uses $vars['entity'] The user entity
+ */
// header("Content-type: text/javascript");
// header("Pragma: public");
diff --git a/mod/profile/views/default/profile/listing.php b/mod/profile/views/default/profile/listing.php
index cb65c93a6..942910bc3 100644
--- a/mod/profile/views/default/profile/listing.php
+++ b/mod/profile/views/default/profile/listing.php
@@ -1,57 +1,48 @@
<?php
-
- /**
- * Elgg user display (small)
- *
- * @package ElggProfile
- * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
- * @author Curverider Ltd <info@elgg.com>
- * @copyright Curverider Ltd 2008-2010
- * @link http://elgg.com/
- *
- * @uses $vars['entity'] The user entity
- */
-
- $icon = elgg_view(
- "profile/icon", array(
- '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';
-
- if (!$banned) {
- $info .= "<p><b><a href=\"" . $vars['entity']->getUrl() . "\" rel=\"$rel\">" . $vars['entity']->name . "</a></b></p>";
- //create a view that a status plugin could extend - in the default case, this is the wire
- $info .= elgg_view("profile/status", array("entity" => $vars['entity']));
-
- $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>";
-
- }
-
- echo elgg_view_listing($icon, $info);
-
-?> \ No newline at end of file
+/**
+ * Elgg user display (small)
+ *
+ * @package ElggProfile
+ * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
+ * @author Curverider Ltd <info@elgg.com>
+ * @copyright Curverider Ltd 2008-2010
+ * @link http://elgg.com/
+ *
+ * @uses $vars['entity'] The user entity
+ */
+
+$icon = elgg_view(
+ "profile/icon", array(
+ 'entity' => $vars['entity'],
+ 'size' => 'tiny',
+ )
+);
+
+$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';
+
+if (!$banned) {
+ $info .= "<p class='entity_title user'><a href=\"" . $vars['entity']->getUrl() . "\" rel=\"$rel\">" . $vars['entity']->name . "</a></p>";
+ //create a view that a status plugin could extend - in the default case, this is the wire
+ $info .= elgg_view("profile/status", array("entity" => $vars['entity']));
+ $location = $vars['entity']->location;
+ if (!empty($location)) {
+ $info .= "<p class='entity_subtext user'>" . elgg_echo("profile:location") . ": " . elgg_view("output/tags",array('value' => $vars['entity']->location)) . "</p>";
+ }
+}else{
+ $info .= "<p class='entity_title user banned'>";
+ if (isadminloggedin())
+ $info .= "<a href=\"" . $vars['entity']->getUrl() . "\">";
+ $info .= $vars['entity']->name;
+ if (isadminloggedin())
+ $info .= "</a>";
+ $info .= "</p>";
+}
+
+echo elgg_view_listing($icon, $info); \ No newline at end of file
diff --git a/mod/profile/views/default/profile/menu/actions.php b/mod/profile/views/default/profile/menu/actions.php
index 7ca1d84d5..4ce7c89b6 100644
--- a/mod/profile/views/default/profile/menu/actions.php
+++ b/mod/profile/views/default/profile/menu/actions.php
@@ -1,29 +1,32 @@
<?php
+/**
+ * Elgg profile icon hover over: actions
+ *
+ * @package ElggProfile
+ * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
+ * @author Curverider Ltd <info@elgg.com>
+ * @copyright Curverider Ltd 2008-2010
+ * @link http://elgg.com/
+ *
+ * @uses $vars['entity'] The user entity. If none specified, the current user is assumed.
+ */
- /**
- * Elgg profile icon hover over: actions
- *
- * @package ElggProfile
- * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
- * @author Curverider Ltd <info@elgg.com>
- * @copyright Curverider Ltd 2008-2010
- * @link http://elgg.com/
- *
- * @uses $vars['entity'] The user entity. If none specified, the current user is assumed.
- */
-
- if (isloggedin()) {
- if ($_SESSION['user']->getGUID() != $vars['entity']->getGUID()) {
-
- $ts = time();
- $token = generate_action_token($ts);
-
- if ($vars['entity']->isFriend()) {
- echo "<p class=\"user_menu_removefriend\"><a href=\"{$vars['url']}action/friends/remove?friend={$vars['entity']->getGUID()}&__elgg_token=$token&__elgg_ts=$ts\">" . elgg_echo("friend:remove") . "</a></p>";
- } else {
- echo "<p class=\"user_menu_addfriend\"><a href=\"{$vars['url']}action/friends/add?friend={$vars['entity']->getGUID()}&__elgg_token=$token&__elgg_ts=$ts\">" . elgg_echo("friend:add") . "</a></p>";
- }
+if (isloggedin()) {
+ if ($_SESSION['user']->getGUID() != $vars['entity']->getGUID()) {
+ $ts = time();
+ $token = generate_action_token($ts);
+ if ($vars['entity']->isFriend()) {
+ echo elgg_view('output/confirm_link', array(
+ 'href' => "{$vars['url']}action/friends/remove?friend={$vars['entity']->getGUID()}",
+ 'text' => elgg_echo('friend:remove'),
+ 'class' => 'user_menu_removefriend'
+ ));
+ } else {
+ echo elgg_view('output/confirm_link', array(
+ 'href' => "{$vars['url']}action/friends/add?friend={$vars['entity']->getGUID()}",
+ 'text' => elgg_echo('friend:add'),
+ 'class' => 'user_menu_removefriend'
+ ));
}
}
-
-?> \ No newline at end of file
+} \ No newline at end of file
diff --git a/mod/profile/views/default/profile/menu/adminlinks.php b/mod/profile/views/default/profile/menu/adminlinks.php
index 7d0c24cb4..a88f96816 100644
--- a/mod/profile/views/default/profile/menu/adminlinks.php
+++ b/mod/profile/views/default/profile/menu/adminlinks.php
@@ -1,40 +1,32 @@
<?php
- /**
- * Profile admin context links
- *
- * @package ElggProfile
- * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
- * @author Curverider Ltd
- * @copyright Curverider Ltd 2008-2010
- * @link http://elgg.com/
- *
- * @uses $vars['entity'] The user entity
- */
+/**
+ * Profile admin context links
+ *
+ * @package ElggProfile
+ * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
+ * @author Curverider Ltd
+ * @copyright Curverider Ltd 2008-2010
+ * @link http://elgg.com/
+ *
+ * @uses $vars['entity'] The user entity
+ */
- if (isadminloggedin()){
- if ($_SESSION['id']!=$vars['entity']->guid){
-
- $ts = time();
- $token = generate_action_token($ts);
-
+if (isadminloggedin()){
+ if ($_SESSION['id']!=$vars['entity']->guid){
?>
- <a href="<?php echo $vars['url']; ?>pg/settings/user/<?php echo $vars['entity']->username; ?>/"><?php echo elgg_echo('profile:editdetails'); ?></a>
- <?php
- if (!$vars['entity']->isBanned()) {
- echo elgg_view('output/confirmlink', array('text' => elgg_echo("ban"), 'href' => "{$vars['url']}action/admin/user/ban?guid={$vars['entity']->guid}&__elgg_token=$token&__elgg_ts=$ts"));
- } else {
- echo elgg_view('output/confirmlink', array('text' => elgg_echo("unban"), 'href' => "{$vars['url']}action/admin/user/unban?guid={$vars['entity']->guid}&__elgg_token=$token&__elgg_ts=$ts"));
- }
-
- echo elgg_view('output/confirmlink', array('text' => elgg_echo("delete"), 'href' => "{$vars['url']}action/admin/user/delete?guid={$vars['entity']->guid}&__elgg_token=$token&__elgg_ts=$ts"));
-
- echo elgg_view('output/confirmlink', array('text' => elgg_echo("resetpassword"), 'href' => "{$vars['url']}action/admin/user/resetpassword?guid={$vars['entity']->guid}&__elgg_token=$token&__elgg_ts=$ts"));
-
- if (!$vars['entity']->admin) {
- echo elgg_view('output/confirmlink', array('text' => elgg_echo("makeadmin"), 'href' => "{$vars['url']}action/admin/user/makeadmin?guid={$vars['entity']->guid}&__elgg_token=$token&__elgg_ts=$ts"));
- } else {
- echo elgg_view('output/confirmlink', array('text' => elgg_echo("removeadmin"), 'href' => "{$vars['url']}action/admin/user/removeadmin?guid={$vars['entity']->guid}&__elgg_token=$token&__elgg_ts=$ts"));
- }
+ <a href="<?php echo $vars['url']; ?>pg/settings/user/<?php echo $vars['entity']->username; ?>/"><?php echo elgg_echo('profile:editdetails'); ?></a>
+<?php
+ if (!$vars['entity']->isBanned()) {
+ echo elgg_view('output/confirmlink', array('text' => elgg_echo("ban"), 'href' => "{$vars['url']}action/admin/user/ban?guid={$vars['entity']->guid}"));
+ } else {
+ echo elgg_view('output/confirmlink', array('text' => elgg_echo("unban"), 'href' => "{$vars['url']}action/admin/user/unban?guid={$vars['entity']->guid}"));
+ }
+ echo elgg_view('output/confirmlink', array('text' => elgg_echo("delete"), 'href' => "{$vars['url']}action/admin/user/delete?guid={$vars['entity']->guid}"));
+ echo elgg_view('output/confirmlink', array('text' => elgg_echo("resetpassword"), 'href' => "{$vars['url']}action/admin/user/resetpassword?guid={$vars['entity']->guid}"));
+ if (!$vars['entity']->admin) {
+ echo elgg_view('output/confirmlink', array('text' => elgg_echo("makeadmin"), 'href' => "{$vars['url']}action/admin/user/makeadmin?guid={$vars['entity']->guid}"));
+ } else {
+ echo elgg_view('output/confirmlink', array('text' => elgg_echo("removeadmin"), 'href' => "{$vars['url']}action/admin/user/removeadmin?guid={$vars['entity']->guid}"));
}
}
-?> \ No newline at end of file
+ } \ No newline at end of file
diff --git a/mod/profile/views/default/profile/menu/adminwrapper.php b/mod/profile/views/default/profile/menu/adminwrapper.php
index 2acbb35e8..b60eec462 100644
--- a/mod/profile/views/default/profile/menu/adminwrapper.php
+++ b/mod/profile/views/default/profile/menu/adminwrapper.php
@@ -1,11 +1,17 @@
<?php
+/**
+ * Wraps the admin links
+ *
+ * @package ElggProfile
+ * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
+ * @author Curverider Ltd
+ * @copyright Curverider Ltd 2008-2010
+ * @link http://elgg.com/
+ *
+ */
- $adminlinks = elgg_view('profile/menu/adminlinks',$vars);
+$adminlinks = elgg_view('profile/menu/adminlinks', $vars);
- if (!empty($adminlinks)) {
-
- echo "<p class=\"user_menu_admin\">{$adminlinks}</p>";
-
- }
-
-?> \ No newline at end of file
+if (!empty($adminlinks)) {
+ echo "<p class=\"user_menu_admin\">{$adminlinks}</p>";
+} \ No newline at end of file
diff --git a/mod/profile/views/default/profile/menu/links.php b/mod/profile/views/default/profile/menu/links.php
index 8aa5e1a1a..ce82df10a 100644
--- a/mod/profile/views/default/profile/menu/links.php
+++ b/mod/profile/views/default/profile/menu/links.php
@@ -1,36 +1,32 @@
<?php
-
- /**
- * Elgg profile icon hover over: passive links
- *
- * @package ElggProfile
- * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
- * @author Curverider Ltd <info@elgg.com>
- * @copyright Curverider Ltd 2008-2010
- * @link http://elgg.com/
- *
- * @uses $vars['entity'] The user entity. If none specified, the current user is assumed.
- */
-
+/**
+ * Elgg profile icon hover over: passive links
+ *
+ * @package ElggProfile
+ * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
+ * @author Curverider Ltd <info@elgg.com>
+ * @copyright Curverider Ltd 2008-2010
+ * @link http://elgg.com/
+ *
+ * @uses $vars['entity'] The user entity. If none specified, the current user is assumed.
+ */
?>
- <p class="user_menu_profile">
- <a href="<?php echo $vars['entity']->getURL(); ?>"><?php echo elgg_echo("profile"); ?></a>
- </p>
- <?php
- if ($vars['entity']->canEdit())
- {
- ?>
+<p class="user_menu_profile">
+ <a href="<?php echo $vars['entity']->getURL(); ?>"><?php echo elgg_echo("profile"); ?></a>
+</p>
+<?php
+ if ($vars['entity']->canEdit()){
+?>
<p class="user_menu_profile">
- <a href="<?php echo $vars['url']?>pg/profile/<?php echo $vars['entity']->username; ?>/editicon/"><?php echo elgg_echo("profile:editicon"); ?></a>
+ <a href="<?php echo $vars['url']?>pg/profile/<?php echo $vars['entity']->username; ?>/edit/icon"><?php echo elgg_echo("profile:editicon"); ?></a>
</p>
- <?php
- }
-
- ?>
- <p class="user_menu_friends">
- <a href="<?php echo $vars['url']; ?>pg/friends/<?php echo $vars['entity']->username; ?>/"><?php echo elgg_echo("friends"); ?></a>
- </p>
- <p class="user_menu_friends_of">
- <a href="<?php echo $vars['url']; ?>pg/friendsof/<?php echo $vars['entity']->username; ?>/"><?php echo elgg_echo("friends:of"); ?></a>
- </p> \ No newline at end of file
+<?php
+ }
+?>
+<p class="user_menu_friends">
+ <a href="<?php echo $vars['url']; ?>pg/friends/<?php echo $vars['entity']->username; ?>/"><?php echo elgg_echo("friends"); ?></a>
+</p>
+<p class="user_menu_friends_of">
+ <a href="<?php echo $vars['url']; ?>pg/friendsof/<?php echo $vars['entity']->username; ?>/"><?php echo elgg_echo("friends:of"); ?></a>
+</p>
diff --git a/mod/profile/views/default/profile/menu/linksownpage.php b/mod/profile/views/default/profile/menu/linksownpage.php
index 08aece082..58eb3e1a0 100644
--- a/mod/profile/views/default/profile/menu/linksownpage.php
+++ b/mod/profile/views/default/profile/menu/linksownpage.php
@@ -1,33 +1,29 @@
<?php
-
- /**
- * Elgg profile icon / profile links: passive links when looking at your own icon / profile
- *
- * @package ElggProfile
- * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
- * @author Curverider Ltd <info@elgg.com>
- * @copyright Curverider Ltd 2008-2010
- * @link http://elgg.com/
- *
- * @uses $vars['entity'] The user entity. If none specified, the current user is assumed.
- */
-
+/**
+ * Elgg profile icon / profile links: passive links when looking at your own icon / profile
+ *
+ * @package ElggProfile
+ * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
+ * @author Curverider Ltd <info@elgg.com>
+ * @copyright Curverider Ltd 2008-2010
+ * @link http://elgg.com/
+ *
+ * @uses $vars['entity'] The user entity. If none specified, the current user is assumed.
+ */
+?>
+<?php
+ if ($vars['entity']->canEdit()){
?>
- <?php
- if ($vars['entity']->canEdit())
- {
- ?>
<p class="user_menu_profile">
- <a href="<?php echo $vars['url']?>pg/profile/<?php echo $vars['entity']->username; ?>/editicon/"><?php echo elgg_echo("profile:editicon"); ?></a>
+ <a href="<?php echo $vars['url']?>pg/profile/<?php echo $vars['entity']->username; ?>/edit/icon"><?php echo elgg_echo("profile:editicon"); ?></a>
</p>
- <?php
- }
+<?php
+ }
+?>
+<p class="user_menu_friends">
+ <a href="<?php echo $vars['url']; ?>pg/friends/<?php echo $vars['entity']->username; ?>/"><?php echo elgg_echo("friends"); ?></a>
+</p>
+<p class="user_menu_friends_of">
+ <a href="<?php echo $vars['url']; ?>pg/friendsof/<?php echo $vars['entity']->username; ?>/"><?php echo elgg_echo("friends:of"); ?></a>
+</p>
- ?>
- <p class="user_menu_friends">
- <a href="<?php echo $vars['url']; ?>pg/friends/<?php echo $vars['entity']->username; ?>/"><?php echo elgg_echo("friends"); ?></a>
- </p>
- <p class="user_menu_friends_of">
- <a href="<?php echo $vars['url']; ?>pg/friendsof/<?php echo $vars['entity']->username; ?>/"><?php echo elgg_echo("friends:of"); ?></a>
- </p>
- \ No newline at end of file
diff --git a/mod/profile/views/default/profile/metatags.php b/mod/profile/views/default/profile/metatags.php
index a6981c4c9..0039281f0 100644
--- a/mod/profile/views/default/profile/metatags.php
+++ b/mod/profile/views/default/profile/metatags.php
@@ -1,21 +1,15 @@
<?php
-
- /**
- * Adds metatags to load Javascript required for the profile
- *
- * @package ElggProfile
- * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
- * @author Curverider Ltd <info@elgg.com>
- * @copyright Curverider Ltd 2008-2010
- * @link http://elgg.com/
- *
- */
-
- /*
- * <script type="text/javascript" src="<?php echo $vars['url']; ?>pg/iconjs/profile.js" ></script>
- */
-
-?>
-
- <?php if ($owner = page_owner_entity()) { ?><link rel="meta" type="application/rdf+xml" title="FOAF" href="<?php echo full_url(); ?>?view=foaf" /><?php } ?>
-
+/**
+ * Adds metatags to load Javascript required for the profile
+ *
+ * @package ElggProfile
+ * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
+ * @author Curverider Ltd <info@elgg.com>
+ * @copyright Curverider Ltd 2008-2010
+ * @link http://elgg.com/
+ *
+ */
+
+if ($owner = page_owner_entity()) { ?>
+ <link rel="meta" type="application/rdf+xml" title="FOAF" href="<?php echo full_url(); ?>?view=foaf" />
+<?php } ?> \ No newline at end of file
diff --git a/mod/profile/views/default/profile/profile_contents/activity.php b/mod/profile/views/default/profile/profile_contents/activity.php
new file mode 100755
index 000000000..62fc747e3
--- /dev/null
+++ b/mod/profile/views/default/profile/profile_contents/activity.php
@@ -0,0 +1,26 @@
+<?php
+/**
+ * Elgg user display (details)
+ * @uses $vars['entity'] The user entity
+ */
+?>
+<div id="profile_content">
+ <?php
+ if(is_plugin_enabled('thewire')) {
+ // users last status msg, if they posted one
+ echo elgg_view("profile/status", array("entity" => $vars['entity']));
+ }
+ if(is_plugin_enabled('riverdashboard')) {
+ // users last 10 activites
+ echo elgg_view('profile/profile_contents/profile_activity', array('entity' => $vars['entity']));
+ } else {
+ echo "Riverdashboard not loaded";
+ }
+ ?>
+</div>
+
+<div id="profile_sidebar">
+<?php
+ echo elgg_view('profile/profile_ownerblock', array('smallicon' => true));
+?>
+</div>
diff --git a/mod/profile/views/default/profile/profile_contents/details.php b/mod/profile/views/default/profile/profile_contents/details.php
new file mode 100755
index 000000000..c61379974
--- /dev/null
+++ b/mod/profile/views/default/profile/profile_contents/details.php
@@ -0,0 +1,63 @@
+<?php
+/**
+ * Elgg user display (details)
+ * @uses $vars['entity'] The user entity
+ */
+?>
+<div id="profile_content">
+<?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';
+
+ if ($vars['full'] == true) {
+ $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
+ }
+ }
+ }
+ }
+?>
+<?php
+ if (!get_plugin_setting('user_defined_fields', 'profile')) {
+?>
+<?php
+ 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>";
+ }
+ ?>
+<?php } ?>
+ <?php
+ }
+
+ echo "</div>";
+ // profile sidebar
+ echo "<div id='profile_sidebar'>";
+ echo elgg_view('profile/profile_ownerblock');
+ echo "</div>";
+?>
diff --git a/mod/profile/views/default/profile/profile_contents/friends.php b/mod/profile/views/default/profile/profile_contents/friends.php
new file mode 100755
index 000000000..4fa290a7f
--- /dev/null
+++ b/mod/profile/views/default/profile/profile_contents/friends.php
@@ -0,0 +1,21 @@
+<?php
+/**
+ * Profile friends
+ **/
+
+$friends = list_entities_from_relationship('friend',$vars['entity']->getGUID(),false,'user','',0,10,false);
+if(!$friends)
+ $friends = "<p>This user has not made any friends yet.</p>";
+
+?>
+<div id="profile_content">
+ <?php
+ echo $friends;
+ ?>
+</div>
+
+<div id="profile_sidebar">
+<?php
+ echo elgg_view('profile/profile_ownerblock', array('smallicon' => true));
+?>
+</div> \ No newline at end of file
diff --git a/mod/profile/views/default/profile/profile_contents/twitter.php b/mod/profile/views/default/profile/profile_contents/twitter.php
new file mode 100755
index 000000000..75b6d0467
--- /dev/null
+++ b/mod/profile/views/default/profile/profile_contents/twitter.php
@@ -0,0 +1,24 @@
+<?php
+/**
+ * Elgg twitter view page
+ */
+
+$twitter_username = $vars['entity']->twitter;
+
+// if the twitter username is empty, then do not show
+if($twitter_username){
+?>
+<div id="profile_content">
+ <ul id="twitter_update_list"></ul>
+ <p class="visit_twitter"><a href="http://twitter.com/<?php echo $twitter_username; ?>" target="_blank"><?php echo elgg_echo("twitter:visit"); ?></a></p>
+ <script type="text/javascript" src="http://twitter.com/javascripts/blogger.js"></script>
+ <script type="text/javascript" src="http://twitter.com/statuses/user_timeline/<?php echo $twitter_username; ?>.json?callback=twitterCallback2&count=10"></script>
+</div>
+<div id="profile_sidebar">
+<?php
+ echo elgg_view('profile/profile_ownerblock', array('smallicon' => true));
+?>
+</div>
+<?php
+}
+?> \ No newline at end of file
diff --git a/mod/profile/views/default/profile/profile_contents/widgets.php b/mod/profile/views/default/profile/profile_contents/widgets.php
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/mod/profile/views/default/profile/profile_contents/widgets.php
diff --git a/mod/profile/views/default/profile/profile_navigation.php b/mod/profile/views/default/profile/profile_navigation.php
new file mode 100755
index 000000000..0ab00746c
--- /dev/null
+++ b/mod/profile/views/default/profile/profile_navigation.php
@@ -0,0 +1,57 @@
+<?php
+
+$section = 'activity';
+if (isset($vars['section'])) {
+ $section = $vars['section'];
+}
+
+$profile = $vars['entity'];
+$activity = '';
+$widgets = '';
+$friends = '';
+$extend = '';
+$twitter = '';
+
+$url = "{$profile->getURL()}/";
+
+//select section
+switch($section){
+ case 'friends':
+ $friends = 'class="selected"';
+ break;
+
+ case 'widgets':
+ $widgets = 'class="selected"';
+ break;
+
+ case 'details':
+ $details = 'class="selected"';
+ break;
+
+ case 'twitter':
+ $twitter = 'class="selected"';
+ break;
+
+ case 'activity':
+ default:
+ $activity = 'class="selected"';
+ break;
+}
+?>
+<div class="elgg_horizontal_tabbed_nav profile">
+<div class="profile_name"><h2><?php echo $profile->name; ?></h2></div>
+<ul>
+ <li <?php echo $activity; ?>><a href="<?php echo $url; ?>">Activity</a></li>
+ <li <?php echo $details; ?>><a href="<?php echo $url . 'details'; ?>">Details</a></li>
+ <li <?php echo $widgets; ?>><a href="<?php echo $url . 'widgets'; ?>">Widgets</a></li>
+ <li <?php echo $friends; ?>><a href="<?php echo $url . 'friends'; ?>">Friends</a></li>
+ <?php
+ //check to see if the twitter username is set
+ if($vars['entity']->twitter){
+ ?>
+ <li <?php echo $twitter; ?>><a href="<?php echo $url . 'twitter'; ?>">Twitter</a></li>
+ <?php
+ }
+ ?>
+</ul>
+</div>
diff --git a/mod/profile/views/default/profile/profile_ownerblock.php b/mod/profile/views/default/profile/profile_ownerblock.php
new file mode 100755
index 000000000..c5cb90189
--- /dev/null
+++ b/mod/profile/views/default/profile/profile_ownerblock.php
@@ -0,0 +1,124 @@
+<?php
+
+/**
+ * A simple owner block which houses info about the user whose 'stuff' you are looking at
+ */
+
+//get the page owner
+if($vars['entity']){
+ if($vars['context'] == 'edit')
+ $user = get_entity($vars['entity']->container_guid);
+ else
+ $user = get_entity($vars['entity']->guid);
+}else{
+ $user = page_owner_entity();
+}
+$more_info = '';
+//set some variables
+$location = elgg_view("output/tags",array('value' => $user->location));
+if($vars['smallicon'] != true){
+ $icon = elgg_view("profile/icon",array('entity' => $user, 'size' => 'large', 'override' => 'true'));
+ $icon_class = "large";
+}else{
+ $icon = elgg_view("profile/icon",array('entity' => $user, 'size' => 'small'));
+ $more_info = "<div class='owner_block_contents clearfloat'>";
+ $more_info .= "<h3><a href='{$url}'>{$user->name}</a></h3>";
+ $more_info .= "<p class='profile_info briefdescription'>{$user->briefdescription}</p>";
+ $more_info .= "<p class='profile_info location'>{$location}</p>";
+ $more_info .= "</div>";
+}
+$profile_actions = "";
+if(get_loggedin_user()->getGuid() == page_owner()){
+ $profile_actions = "<div class='clearfloat profile_actions'>";
+ $profile_actions .= "<a href='{$vars['url']}pg/profile/{$user->username}/edit/details' class='action_button'>Edit profile</a>";
+ $profile_actions .= "<a href='{$vars['url']}pg/profile/{$user->username}/edit/icon' class='action_button'>Edit profile icon</a>";
+ $profile_actions .= "</div>";
+}else{
+ $profile_actions = "<div class='profile_actions'>";
+ if (isloggedin()) {
+ if ($_SESSION['user']->getGUID() != $user->getGUID()) {
+ $ts = time();
+ $token = generate_action_token($ts);
+
+ if ($user->isFriend()) {
+ $profile_actions .= "<a href=\"{$vars['url']}action/friends/remove?friend={$user->getGUID()}&__elgg_token=$token&__elgg_ts=$ts\" class='action_button'>" . elgg_echo('friend:remove') . "</a>";
+ } else {
+ $profile_actions .= "<a href=\"{$vars['url']}action/friends/add?friend={$user->getGUID()}&__elgg_token=$token&__elgg_ts=$ts\" class='action_button'>" . elgg_echo('friend:add') . "</a>";
+ }
+ }
+ }
+ if(is_plugin_enabled('messages')){
+ $profile_actions .= "<a href=\"{$vars['url']}mod/messages/send.php?send_to={$user->guid}\" class='action_button'>". elgg_echo('messages:send') ."</a>";
+ }
+ $profile_actions .= "</div>";
+}
+
+$username = $user->username;
+$email = $user->email;
+$phone = $user->phone;
+
+//get correct links
+$url = $vars['url'];
+
+//if admin display admin links
+if(isadminloggedin()){
+ $admin_links = elgg_view('profile/admin_menu');
+}else{
+ $admin_links = '';
+}
+
+
+//check tools are enabled
+if(is_plugin_enabled('file')){
+ $file_link = "<li {$file_highlight}><a href=\"{$vars['url']}pg/file/{$username}\">Files</a></li>";
+}else{
+ $file_link = "";
+}
+if(is_plugin_enabled('blog')){
+ $blog_link = "<li {$blog_highlight}><a href=\"{$vars['url']}pg/blog/{$username}\">Blog</a></li>";
+}else{
+ $blog_link = "";
+}
+if(is_plugin_enabled('video')){
+ $video_link = "<li {$video_highlight}><a href=\"{$vars['url']}pg/video/{$username}\">Videos</a></li>";
+}else{
+ $video_link = "";
+}
+if(is_plugin_enabled('pages')){
+ $pages_link = "<li {$pages_highlight}><a href=\"{$vars['url']}pg/pages/owned/{$username}\">Pages</a></li>";
+}else{
+ $pages_link = "";
+}
+if(is_plugin_enabled('bookmarks')){
+ $bookmark_link = "<li {$bookmarks_highlight}><a href=\"{$vars['url']}pg/bookmarks/{$username}\">Bookmarks</a></li>";
+}else{
+ $bookmark_link = "";
+}
+
+
+
+//contruct the display
+$display = <<<EOT
+
+<div id="owner_block">
+ <div class="owner_block_icon {$icon_class}">
+ {$icon}
+ </div>
+ {$more_info}
+ {$profile_actions}
+ <div class="owner_block_links">
+ <ul>
+ {$file_link}
+ {$blog_link}
+ {$video_link}
+ {$bookmark_link}
+ {$pages_link}
+ </ul>
+ </div>
+ <!-- if admin user -->
+ {$admin_links}
+</div>
+
+EOT;
+
+echo $display;
diff --git a/mod/profile/views/default/profile/profilelinks.php b/mod/profile/views/default/profile/profilelinks.php
deleted file mode 100644
index 6f35620c6..000000000
--- a/mod/profile/views/default/profile/profilelinks.php
+++ /dev/null
@@ -1,50 +0,0 @@
-<?php
-
- /**
- * Elgg profile links
- * We need to make sure that the correct links display depending on whether you are looking at your own
- * profile or someone else's
- *
- * @package ElggProfile
- * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
- * @author Curverider Ltd <info@elgg.com>
- * @copyright Curverider Ltd 2008-2010
- * @link http://elgg.com/
- *
- * @uses $vars['entity'] The user entity. If none specified, the current user is assumed.
- */
-
-?>
-
-<?php
-
- $banned = false;
- $owner = page_owner_entity();
- if ($owner) $banned = $owner->isBanned();
-
- // Allow menus if not banned or admin logged in
- if ((!$banned) || (isadminloggedin()))
- {
- //check to see if the user is looking at their own profile
- if ($_SESSION['user']->guid == page_owner()){
-
- echo "<div id=\"profile_menu_wrapper\">"; //start the wrapper div
- echo elgg_view("profile/menu/actions",$vars);//grab action links such as make friend
- echo elgg_view("profile/menu/linksownpage",$vars); // an different view for user's own profile
- echo "</div>"; //close wrapper div
-
- } else {
-
- echo "<div id=\"profile_menu_wrapper\">"; //start the wrapper div
- echo elgg_view("profile/menu/actions",$vars); //grab action links such as make friend
- echo elgg_view("profile/menu/links",$vars); //passive links to items such as user blog etc
- echo "</div>"; //close wrapper div
-
- }
- }
- else
- { // Some nice spacing
- echo "<div id=\"profile_menu_wrapper\">"; //start the wrapper div
- echo "</div>"; //close wrapper div
- }
-?> \ No newline at end of file
diff --git a/mod/profile/views/default/profile/userdetails.php b/mod/profile/views/default/profile/userdetails.php
deleted file mode 100644
index eb22a704a..000000000
--- a/mod/profile/views/default/profile/userdetails.php
+++ /dev/null
@@ -1,174 +0,0 @@
-<?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 Curverider Ltd <info@elgg.com>
- * @copyright Curverider Ltd 2008-2010
- * @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 cellspacing="0">
-<tr>
-<td>
-
-<?php
-
- // wrap the icon and links in a div
- echo "<div id=\"profile_info_column_left\">";
-
- echo "<div id=\"profile_icon_wrapper\">";
- // get the user's main profile picture
- echo elgg_view(
- "profile/icon", array(
- 'entity' => $vars['entity'],
- //'align' => "left",
- 'size' => $iconsize,
- 'override' => true,
- )
- );
-
-
- echo "</div>";
- echo "<div class=\"clearfloat\"></div>";
- // display relevant links
- echo elgg_view("profile/profilelinks", array("entity" => $vars['entity']));
-
- // close profile_info_column_left
- echo "</div>";
-
-?>
-</td>
-<td>
-
- <div id="profile_info_column_middle" >
- <?php
-
- if ($vars['entity']->canEdit()) {
-
- ?>
- <p class="profile_info_edit_buttons">
- <a href="<?php echo $vars['url']; ?>pg/profile/<?php echo $vars['entity']->username; ?>/edit/"><?php echo elgg_echo("profile:edit"); ?></a>
- </p>
- <?php
-
- }
-
- ?>
-
-
-
- <?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() . "\" rel=\"$rel\">" . $vars['entity']->name . "</a></h2>";
-
- //insert a view that can be extended
- echo elgg_view("profile/status", array("entity" => $vars['entity']));
-
- if ($vars['full'] == true) {
-
- ?>
- <?php
- $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
- $options = array(
- 'value' => $vars['entity']->$shortname
- );
-
- if ($valtype == 'tags') {
- $options['tag_names'] = $shortname;
- }
-
- echo elgg_view("output/{$valtype}", $options);
-
- ?>
-
- </p>
-
- <?php
- }
- }
- }
- }
-
- ?>
- </div><!-- /#profile_info_column_middle -->
-
-</td>
-</tr>
-<?php if (!get_plugin_setting('user_defined_fields', 'profile')) {?>
-<tr>
-<td colspan="2">
- <div id="profile_info_column_right">
- <p class="profile_aboutme_title"><b><?php echo elgg_echo("profile:aboutme"); ?></b></p>
-
- <?php if ($vars['entity']->isBanned()) { ?>
- <div id="profile_banned">
- <?php
- echo elgg_echo('profile:banned');
- ?>
- </div><!-- /#profile_info_column_right -->
-
- <?php } else { ?>
-
- <?php
- echo elgg_view('output/longtext', array('value' => $vars['entity']->description));
- //echo autop(filter_tags($vars['entity']->description));
- ?>
-
- <?php } ?>
-
- </div><!-- /#profile_info_column_right -->
-
-</td>
-
-
-
-</tr>
-<?php } ?>
-
-</table>
-
-
-
-</div><!-- /#profile_info -->
diff --git a/mod/profile/views/default/river/user/default/profileiconupdate.php b/mod/profile/views/default/river/user/default/profileiconupdate.php
index 2aa0933b6..ebe13e59a 100644
--- a/mod/profile/views/default/river/user/default/profileiconupdate.php
+++ b/mod/profile/views/default/river/user/default/profileiconupdate.php
@@ -3,10 +3,6 @@
$performed_by = get_entity($vars['item']->subject_guid); // $statement->getSubject();
$url = "<a href=\"{$performed_by->getURL()}\">{$performed_by->name}</a>";
- $string = sprintf(elgg_echo("profile:river:iconupdate"),$url);
- $string .= "<div class=\"river_content_display\">";
- $string .= elgg_view("profile/icon",array('entity' => $performed_by, 'size' => 'small', 'override' => 'true'));
- $string .= "</div>";
-?>
-
-<?php echo $string; ?> \ No newline at end of file
+ $string = "<div class=\"river_content_title\">" . sprintf(elgg_echo("profile:river:update"),$url) ."</div>";
+
+ echo $string; \ No newline at end of file
diff --git a/mod/profile/views/default/river/user/default/profileupdate.php b/mod/profile/views/default/river/user/default/profileupdate.php
index 9b87d829f..06d2697b0 100644
--- a/mod/profile/views/default/river/user/default/profileupdate.php
+++ b/mod/profile/views/default/river/user/default/profileupdate.php
@@ -3,7 +3,7 @@
$performed_by = get_entity($vars['item']->subject_guid); // $statement->getSubject();
$url = "<a href=\"{$performed_by->getURL()}\">{$performed_by->name}</a>";
- $string = sprintf(elgg_echo("profile:river:update"),$url);
+ $string = "<div class=\"river_content_title\">" . sprintf(elgg_echo("profile:river:update"),$url) ."</div>";
?>