From 88c3d54f0a6ceb0b539af4e922157b101b945542 Mon Sep 17 00:00:00 2001 From: brettp Date: Thu, 4 Mar 2010 16:36:48 +0000 Subject: Merged interface changes to profile in. git-svn-id: http://code.elgg.org/elgg/trunk@5284 36083f99-b078-4883-b0ff-0f9b5a30f544 --- mod/profile/views/default/profile/admin_menu.php | 42 ++ mod/profile/views/default/profile/css.php | 436 ++++++++++++++++++--- mod/profile/views/default/profile/edit.php | 42 +- .../views/default/profile/editdefaultprofile.php | 56 ++- mod/profile/views/default/profile/editicon.php | 107 ++--- mod/profile/views/default/profile/gallery.php | 47 --- mod/profile/views/default/profile/hoverover.php | 38 +- mod/profile/views/default/profile/icon.php | 89 +++-- mod/profile/views/default/profile/javascript.php | 22 +- mod/profile/views/default/profile/listing.php | 103 +++-- mod/profile/views/default/profile/menu/actions.php | 53 +-- .../views/default/profile/menu/adminlinks.php | 62 ++- .../views/default/profile/menu/adminwrapper.php | 22 +- mod/profile/views/default/profile/menu/links.php | 58 ++- .../views/default/profile/menu/linksownpage.php | 52 ++- mod/profile/views/default/profile/metatags.php | 34 +- .../default/profile/profile_contents/activity.php | 26 ++ .../default/profile/profile_contents/details.php | 63 +++ .../default/profile/profile_contents/friends.php | 21 + .../default/profile/profile_contents/twitter.php | 24 ++ .../default/profile/profile_contents/widgets.php | 0 .../views/default/profile/profile_navigation.php | 57 +++ .../views/default/profile/profile_ownerblock.php | 124 ++++++ mod/profile/views/default/profile/profilelinks.php | 50 --- mod/profile/views/default/profile/userdetails.php | 174 -------- .../river/user/default/profileiconupdate.php | 10 +- .../default/river/user/default/profileupdate.php | 2 +- 27 files changed, 1082 insertions(+), 732 deletions(-) create mode 100755 mod/profile/views/default/profile/admin_menu.php delete mode 100644 mod/profile/views/default/profile/gallery.php create mode 100755 mod/profile/views/default/profile/profile_contents/activity.php create mode 100755 mod/profile/views/default/profile/profile_contents/details.php create mode 100755 mod/profile/views/default/profile/profile_contents/friends.php create mode 100755 mod/profile/views/default/profile/profile_contents/twitter.php create mode 100644 mod/profile/views/default/profile/profile_contents/widgets.php create mode 100755 mod/profile/views/default/profile/profile_navigation.php create mode 100755 mod/profile/views/default/profile/profile_ownerblock.php delete mode 100644 mod/profile/views/default/profile/profilelinks.php delete mode 100644 mod/profile/views/default/profile/userdetails.php (limited to 'mod/profile/views') 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 @@ + + + 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 @@ - * @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 + * @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(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(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(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 @@ - * @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 + * @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 + */ ?> -
-
+ - + 'name', 'value' => page_owner_entity()->name)); + ?> +

+ +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 @@ " />

-
-
\ No newline at end of file + \ 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 @@ - * @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 + * @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 -

$label_text: $label_control - $type_text: $type_control - $submit_control

+$formbody = <<< END +

$label_text: $label_control + $type_text: $type_control + $submit_control

END; - echo "
"; - echo "

" . elgg_echo('profile:explainchangefields') . "

"; - echo elgg_view('input/form', array('body' => $formbody, 'action' => $vars['url'] . 'action/profile/editdefault')); - echo "
"; -?> \ No newline at end of file + +echo "

" . elgg_echo('profile:explainchangefields') . "

"; +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 @@ 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']; ?> -

@@ -29,13 +26,13 @@ getIcon('medium'); - echo "\"avatar\""; + echo "avatar"; ?>
-
+
@@ -50,21 +47,16 @@
-
+

getIcon('master'); - ?>

-

-<?php echo elgg_echo(" /> -

- -
+
+ <?php echo elgg_echo(" /> +
@@ -144,6 +116,3 @@
-
- -
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 @@ - - * @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 .= "

getUrl() . "\" rel=\"$rel\">" . $vars['entity']->name . "

"; - else - $info .= "

" . $vars['entity']->name . "
".elgg_echo('profile:banned')."

"; - - // 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 @@ - * @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 + * @copyright Curverider Ltd 2008-2010 + * @link http://elgg.com/ + * + * @uses $vars['entity'] The user entity. If none specified, the current user is assumed. + */ ?> - -

- name; ?> -

- +

+ name; ?> +

\ 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 @@ - * @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 + * @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) { + ?> -
+
@@ -87,6 +88,4 @@ \ 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 @@ - * @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 .= "

getUrl() . "\" rel=\"$rel\">" . $vars['entity']->name . "

"; - //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 .= "

" . elgg_echo("profile:location") . ": " . elgg_view("output/tags",array('value' => $vars['entity']->location)) . "

"; - } - } - else - { - $info .= "

"; - if (isadminloggedin()) - $info .= "getUrl() . "\">"; - $info .= $vars['entity']->name; - if (isadminloggedin()) - $info .= ""; - $info .= "

"; - - //$info .= "

" . elgg_echo('profile:banned') . "

"; - - } - - 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 + * @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 .= "

getUrl() . "\" rel=\"$rel\">" . $vars['entity']->name . "

"; + //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 .= "

" . elgg_echo("profile:location") . ": " . elgg_view("output/tags",array('value' => $vars['entity']->location)) . "

"; + } +}else{ + $info .= "

"; + if (isadminloggedin()) + $info .= "getUrl() . "\">"; + $info .= $vars['entity']->name; + if (isadminloggedin()) + $info .= ""; + $info .= "

"; +} + +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 @@ + * @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 - * @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 "

getGUID()}&__elgg_token=$token&__elgg_ts=$ts\">" . elgg_echo("friend:remove") . "

"; - } else { - echo "

getGUID()}&__elgg_token=$token&__elgg_ts=$ts\">" . elgg_echo("friend:add") . "

"; - } +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 @@ guid){ - - $ts = time(); - $token = generate_action_token($ts); - +if (isadminloggedin()){ + if ($_SESSION['id']!=$vars['entity']->guid){ ?> - - 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")); - } + +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 @@ {$adminlinks}

"; - - } - -?> \ No newline at end of file +if (!empty($adminlinks)) { + echo "

{$adminlinks}

"; +} \ 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 @@ - * @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 + * @copyright Curverider Ltd 2008-2010 + * @link http://elgg.com/ + * + * @uses $vars['entity'] The user entity. If none specified, the current user is assumed. + */ ?> -

- -

- canEdit()) - { - ?> +

+ +

+canEdit()){ +?>

- +

- -

- -

-

- -

\ No newline at end of file + +

+ +

+

+ +

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 @@ - * @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 + * @copyright Curverider Ltd 2008-2010 + * @link http://elgg.com/ + * + * @uses $vars['entity'] The user entity. If none specified, the current user is assumed. + */ +?> +canEdit()){ ?> - canEdit()) - { - ?>

- +

- +

+ +

+

+ +

- ?> -

- -

-

- -

- \ 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 @@ - * @copyright Curverider Ltd 2008-2010 - * @link http://elgg.com/ - * - */ - - /* - * - */ - -?> - - - +/** + * 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 + * @copyright Curverider Ltd 2008-2010 + * @link http://elgg.com/ + * + */ + +if ($owner = page_owner_entity()) { ?> + + \ 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 @@ + +
+ $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"; + } + ?> +
+ +
+ true)); +?> +
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 @@ + +
+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'; +?> +

+ : + $vars['entity']->$shortname)); + ?> +

+ + +isBanned()) { + echo "
"; + echo elgg_echo('profile:banned'); + echo "
"; + }else{ + if($vars['entity']->description){ + echo "

" . elgg_echo("profile:aboutme") . "

"; + echo "
" .elgg_view('output/longtext', array('value' => $vars['entity']->description))."
"; + } + ?> + + "; + // profile sidebar + echo "
"; + echo elgg_view('profile/profile_ownerblock'); + echo "
"; +?> 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 @@ +getGUID(),false,'user','',0,10,false); +if(!$friends) + $friends = "

This user has not made any friends yet.

"; + +?> +
+ +
+ +
+ true)); +?> +
\ 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 @@ +twitter; + +// if the twitter username is empty, then do not show +if($twitter_username){ +?> +
+
    +

    + + +
    +
    + true)); +?> +
    + \ 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 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 @@ +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; +} +?> +
    +

    name; ?>

    + +
    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 @@ +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 = "
    "; + $more_info .= "

    {$user->name}

    "; + $more_info .= "

    {$user->briefdescription}

    "; + $more_info .= "

    {$location}

    "; + $more_info .= "
    "; +} +$profile_actions = ""; +if(get_loggedin_user()->getGuid() == page_owner()){ + $profile_actions = ""; +}else{ + $profile_actions = "
    "; + if (isloggedin()) { + if ($_SESSION['user']->getGUID() != $user->getGUID()) { + $ts = time(); + $token = generate_action_token($ts); + + if ($user->isFriend()) { + $profile_actions .= "getGUID()}&__elgg_token=$token&__elgg_ts=$ts\" class='action_button'>" . elgg_echo('friend:remove') . ""; + } else { + $profile_actions .= "getGUID()}&__elgg_token=$token&__elgg_ts=$ts\" class='action_button'>" . elgg_echo('friend:add') . ""; + } + } + } + if(is_plugin_enabled('messages')){ + $profile_actions .= "guid}\" class='action_button'>". elgg_echo('messages:send') .""; + } + $profile_actions .= "
    "; +} + +$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 = "
  • Files
  • "; +}else{ + $file_link = ""; +} +if(is_plugin_enabled('blog')){ + $blog_link = "
  • Blog
  • "; +}else{ + $blog_link = ""; +} +if(is_plugin_enabled('video')){ + $video_link = "
  • Videos
  • "; +}else{ + $video_link = ""; +} +if(is_plugin_enabled('pages')){ + $pages_link = "
  • Pages
  • "; +}else{ + $pages_link = ""; +} +if(is_plugin_enabled('bookmarks')){ + $bookmark_link = "
  • Bookmarks
  • "; +}else{ + $bookmark_link = ""; +} + + + +//contruct the display +$display = << +
    + {$icon} +
    + {$more_info} + {$profile_actions} + + + {$admin_links} +
    + +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 @@ - - * @copyright Curverider Ltd 2008-2010 - * @link http://elgg.com/ - * - * @uses $vars['entity'] The user entity. If none specified, the current user is assumed. - */ - -?> - -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 "
    "; //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 "
    "; //close wrapper div - - } else { - - echo "
    "; //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 "
    "; //close wrapper div - - } - } - else - { // Some nice spacing - echo "
    "; //start the wrapper div - echo "
    "; //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 @@ - - * @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 "
    "; - -?> - - - - - - - - - - - - - - - -
    - -"; - - echo "
    "; - // get the user's main profile picture - echo elgg_view( - "profile/icon", array( - 'entity' => $vars['entity'], - //'align' => "left", - 'size' => $iconsize, - 'override' => true, - ) - ); - - - echo "
    "; - echo "
    "; - // display relevant links - echo elgg_view("profile/profilelinks", array("entity" => $vars['entity'])); - - // close profile_info_column_left - echo ""; - -?> -
    - -
    - canEdit()) { - - ?> -

    - -

    - - - - - guid) - $rel = 'me'; - else if (check_entity_relationship(page_owner(), 'friend', $vars['entity']->guid)) - $rel = 'friend'; - - // display the users name - echo "

    getUrl() . "\" rel=\"$rel\">" . $vars['entity']->name . "

    "; - - //insert a view that can be extended - echo elgg_view("profile/status", array("entity" => $vars['entity'])); - - if ($vars['full'] == true) { - - ?> - 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'; - - ?> -

    - : - $vars['entity']->$shortname - ); - - if ($valtype == 'tags') { - $options['tag_names'] = $shortname; - } - - echo elgg_view("output/{$valtype}", $options); - - ?> - -

    - - -
    - -
    -
    -

    - - isBanned()) { ?> -
    - -
    - - - - $vars['entity']->description)); - //echo autop(filter_tags($vars['entity']->description)); - ?> - - - -
    - -
    - - - -
    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 = "getURL()}\">{$performed_by->name}"; - $string = sprintf(elgg_echo("profile:river:iconupdate"),$url); - $string .= "
    "; - $string .= elgg_view("profile/icon",array('entity' => $performed_by, 'size' => 'small', 'override' => 'true')); - $string .= "
    "; -?> - - \ No newline at end of file + $string = "
    " . sprintf(elgg_echo("profile:river:update"),$url) ."
    "; + + 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 = "getURL()}\">{$performed_by->name}"; - $string = sprintf(elgg_echo("profile:river:update"),$url); + $string = "
    " . sprintf(elgg_echo("profile:river:update"),$url) ."
    "; ?> -- cgit v1.2.3