=== modified file 'modules/blog/blog.module' --- modules/blog/blog.module 2006-08-31 20:22:34 +0000 +++ modules/blog/blog.module 2006-09-01 17:49:16 +0000 @@ -48,9 +48,11 @@ function blog_access($op, $node) { */ function blog_user($type, &$edit, &$user) { if ($type == 'view' && user_access('edit own blog', $user)) { - $items[] = array('title' => t('Blog'), - 'value' => l(t('view recent blog entries'), "blog/$user->uid", array('title' => t("Read @username's latest blog entries.", array('@username' => $user->name)))), - 'class' => 'blog', + $user->content['summary']['blog'] = array( + '#type' => 'profile_item', + '#title' => t('Blog'), + '#value' => l(t('view recent blog entries'), "blog/$user->uid", array('title' => t("Read @username's latest blog entries.", array('@username' => $user->name)))), + '#attributes' => array('class' => 'blog'), ); return array(t('History') => $items); } === modified file 'modules/profile/profile.css' --- modules/profile/profile.css 2006-08-14 07:14:50 +0000 +++ modules/profile/profile.css 2006-09-03 13:36:37 +0000 @@ -4,14 +4,8 @@ clear: both; margin: 1em 0; } + .profile .picture { float: right; margin: 0 1em 1em 0; -} -.profile dt { - margin: 1em 0 0.2em 0; - font-weight: bold; -} -.profile dd { - margin:0; -} +} \ No newline at end of file === modified file 'modules/profile/profile.module' --- modules/profile/profile.module 2006-08-31 20:22:34 +0000 +++ modules/profile/profile.module 2006-09-01 17:49:16 +0000 @@ -588,7 +588,7 @@ function profile_view_field($user, $fiel } } -function profile_view_profile($user) { +function profile_view_profile(&$user) { profile_load_profile($user); @@ -604,14 +604,24 @@ function profile_view_profile($user) { if ($value = profile_view_field($user, $field)) { $description = ($field->visibility == PROFILE_PRIVATE) ? t('The content of this field is private and only visible to yourself.') : ''; $title = ($field->type != 'checkbox') ? check_plain($field->title) : NULL; - $item = array('title' => $title, - 'value' => $value, - 'class' => $field->name, + + // create a single fieldset for each category + if (!isset($user->content[$field->category])) { + $user->content[$field->category] = array( + '#type' => 'profile_category', + '#title' => $field->category, + ); + } + + $user->content[$field->category][$field->name] = array( + '#type' => 'profile_item', + '#title' => $title, + '#value' => $value, + '#weight' => $field->weight, + '#attributes' => array('class' => 'profile-'. $field->name), ); - $fields[$field->category][] = $item; } } - return $fields; } function _profile_form_explanation($field) { === modified file 'modules/user/user.css' --- modules/user/user.css 2006-08-17 19:19:15 +0000 +++ modules/user/user.css 2006-09-03 13:36:50 +0000 @@ -31,3 +31,20 @@ clear: right; } +.profile h3 { + border-bottom: 1px solid #ccc; +} + +.profile dl { + margin: 0 0 1.5em 0; +} + +.profile dt { + margin: 0 0 0.2em 0; + font-weight: bold; +} +.profile dd { + margin:0 0 1em 0; +} + + === modified file 'modules/user/user.module' --- modules/user/user.module 2006-09-01 07:32:58 +0000 +++ modules/user/user.module 2006-09-01 17:59:15 +0000 @@ -443,14 +443,23 @@ function user_search($op = 'search', $ke /** * Implementation of hook_user(). */ -function user_user($type, &$edit, &$user, $category = NULL) { +function user_user($type, &$edit, &$account, $category = NULL) { if ($type == 'view') { - $items['history'] = array('title' => t('Member for'), - 'value' => format_interval(time() - $user->created), - 'class' => 'member', + $account->content['user_picture'] = array( + '#value' => theme('user_picture', $account), + '#weight' => -10, + ); + $account->content['summary'] = array( + '#type' => 'profile_category', + '#attributes' => array('class' => 'user-member'), + '#weight' => -5, + '#title' => t('History'), + ); + $account->content['summary']['member_for'] = array( + '#type' => 'profile_item', + '#title' => t('Member for'), + '#value' => format_interval(time() - $account->created) ); - - return array(t('History') => $items); } if ($type == 'form' && $category == 'account') { return user_edit_form(arg(1), $edit); @@ -620,32 +629,13 @@ function theme_user_picture($account) { /** * Theme a user page * @param $account the user object - * @param $fields a multidimensional array for the fields, in the form of array ( - * 'category1' => array(item_array1, item_array2), 'category2' => array(item_array3, - * .. etc.). Item arrays are formatted as array(array('title' => 'item title', - * 'value' => 'item value', 'class' => 'class-name'), ... etc.). Module names are incorporated - * into the CSS class. * * @ingroup themeable */ -function theme_user_profile($account, $fields) { +function theme_user_profile($account) { $output = '