kareila: (Default)
kareila ([personal profile] kareila) wrote in [site community profile] changelog2010-06-10 12:14 pm

[dw-free] Clean up of Edit Profile page

[commit: http://hg.dwscoalition.org/dw-free/rev/ac80dea7d38e]

http://bugs.dwscoalition.org/show_bug.cgi?id=787

Rearrange Edit Profile page to have better organized layout.

Patch by [personal profile] kareila.

Files modified:
  • bin/upgrading/en.dat
  • cgi-bin/DW/Setting/TxtMsgSetup.pm
  • cgi-bin/LJ/Setting/UserMessaging.pm
  • cgi-bin/LJ/User.pm
  • cgi-bin/LJ/Widget/Location.pm
  • htdocs/manage/profile/index.bml
  • htdocs/manage/profile/index.bml.text
  • htdocs/manage/settings/index.bml
  • htdocs/stc/lj_settings.css
--------------------------------------------------------------------------------
diff -r 98841c035b6a -r ac80dea7d38e bin/upgrading/en.dat
--- a/bin/upgrading/en.dat	Thu Jun 10 19:48:47 2010 +0800
+++ b/bin/upgrading/en.dat	Thu Jun 10 07:14:33 2010 -0500
@@ -2971,6 +2971,8 @@ settings.usermessaging.error.invalid=Inv
 
 settings.usermessaging.helper=Only registered [[sitename]] users can send you messages. You also have options to receive messages only from users on your access list.
 
+settings.usermessaging.label=[[siteabbrev]] Private Messages
+
 settings.usermessaging.opt.a=Everyone
 
 settings.usermessaging.opt.f=Access Only
diff -r 98841c035b6a -r ac80dea7d38e cgi-bin/DW/Setting/TxtMsgSetup.pm
--- a/cgi-bin/DW/Setting/TxtMsgSetup.pm	Thu Jun 10 19:48:47 2010 +0800
+++ b/cgi-bin/DW/Setting/TxtMsgSetup.pm	Thu Jun 10 07:14:33 2010 -0500
@@ -51,6 +51,7 @@ sub option {
 
         $ret .= LJ::html_text( { name => "${key}txtmsg_number",
                                  id   => "${key}txtmsg_number",
+                                 title => $class->ml( 'setting.txtmsgsetup.phone' ),
                                  value => $number,
                                  size => 15, maxlength => 40 } );
 
@@ -79,6 +80,12 @@ sub option {
     }
     return $ret if $args && $args->{info_only};
 
+    unless ( $args && $args->{vis_only} ) {
+        $ret .= "<label for='${key}txtmsg_security'>";
+        $ret .= $class->ml( 'setting.txtmsgsetup.vis' );
+        $ret .= "</label> ";
+    }
+
     $tminfo->{security} = 'none'
         if $u->{'txtmsg_status'} =~ /^(?:off|none)$/;
     my $security = $class->get_arg( $args, "txtmsg_security" ) || $tminfo->{security};
@@ -90,12 +97,9 @@ sub option {
         none    => $class->ml( "settings.usermessaging.opt.n" ),
     );
 
-    $ret .= "<label for='${key}txtmsg_security'>";
-    $ret .= $class->ml( 'setting.txtmsgsetup.vis' );
-    $ret .= "</label> ";
-
     $ret .= LJ::html_select( { name => "${key}txtmsg_security",
                                id   => "${key}txtmsg_security",
+                               title => $class->ml( 'setting.txtmsgsetup.vis' ),
                                selected => $security },
                              @opts );
 
diff -r 98841c035b6a -r ac80dea7d38e cgi-bin/LJ/Setting/UserMessaging.pm
--- a/cgi-bin/LJ/Setting/UserMessaging.pm	Thu Jun 10 19:48:47 2010 +0800
+++ b/cgi-bin/LJ/Setting/UserMessaging.pm	Thu Jun 10 07:14:33 2010 -0500
@@ -18,7 +18,19 @@ use warnings;
 
 sub tags { qw(email message contact) }
 
-sub as_html {
+sub should_render {
+    my ( $class, $u ) = @_;
+    return $u->is_person && LJ::is_enabled( 'user_messaging' );
+}
+
+sub label {
+    my $class = shift;
+    return $class->ml( 'settings.usermessaging.label',
+                       { siteabbrev => $LJ::SITENAMEABBREV }
+                     );
+}
+
+sub option {
     my ($class, $u, $errs, $args) = @_;
     my $key = $class->pkgkey;
     my $ret;
@@ -26,18 +38,16 @@ sub as_html {
 
     $ret .= "<label for='${key}opt_usermsg'>" . $class->ml('settings.usermessaging.question') . "</label>"
         unless $args && $args->{minimal_display};
-    $ret .= LJ::html_select({ 'name' => "${key}opt_usermsg",
-                              'id' => "${key}opt_usermsg",
-                              'class' => "select",
-                              'selected' => $u->opt_usermsg },
-                              { text => LJ::Lang::ml('settings.usermessaging.opt.Y'),
-                                value => "Y",},
-                              { text => LJ::Lang::ml('settings.usermessaging.opt.F'),
-                                value => "F",},
-                              { text => LJ::Lang::ml('settings.usermessaging.opt.M'),
-                                value => "M",},
-                              { text => LJ::Lang::ml('settings.usermessaging.opt.N'),
-                                value => "N",});
+    $ret .= LJ::html_select( { name => "${key}opt_usermsg",
+                               id => "${key}opt_usermsg",
+                               class => "select",
+                               title => $class->label,
+                               selected => $u->opt_usermsg },
+                             Y => LJ::Lang::ml('settings.usermessaging.opt.Y'),
+                             F => LJ::Lang::ml('settings.usermessaging.opt.F'),
+                             M => LJ::Lang::ml('settings.usermessaging.opt.M'),
+                             N => LJ::Lang::ml('settings.usermessaging.opt.N'),
+                           );
     $ret .= "<div class='helper'>" .
             $class->ml('settings.usermessaging.helper', {
                 sitename => $LJ::SITENAMESHORT }) .
diff -r 98841c035b6a -r ac80dea7d38e cgi-bin/LJ/User.pm
--- a/cgi-bin/LJ/User.pm	Thu Jun 10 19:48:47 2010 +0800
+++ b/cgi-bin/LJ/User.pm	Thu Jun 10 07:14:33 2010 -0500
@@ -4435,9 +4435,10 @@ sub interest_list {
 
 # return hashref with intname => intid
 sub interests {
-    my $u = shift;
+    my ( $u, $opts ) = @_;
     return undef unless LJ::isu( $u );
-    my $uints = $u->get_interests();
+    delete $opts->{justids} if $opts && ref $opts;
+    my $uints = $u->get_interests( $opts );
     my %interests;
 
     foreach my $int (@$uints) {
diff -r 98841c035b6a -r ac80dea7d38e cgi-bin/LJ/Widget/Location.pm
--- a/cgi-bin/LJ/Widget/Location.pm	Thu Jun 10 19:48:47 2010 +0800
+++ b/cgi-bin/LJ/Widget/Location.pm	Thu Jun 10 07:14:33 2010 -0500
@@ -71,13 +71,14 @@ sub render_body {
 
         $ret .= "<tr><td class='field_class'>" . $class->ml('widget.location.fn.country') . "</td><td>";
     }
-    $ret .= $class->html_select('id'        => 'country_choice',
-                                'name'      => 'country',
-                                'selected'  => $effective_country,
-                                'class'     => 'country_choice_select',
-                                'list'      => $country_options,
-                                %{$opts{'country_input_attributes'} or {} },
-                                );
+    $ret .= $class->html_select( id        => 'country_choice',
+                                 name      => 'country',
+                                 title     => $class->ml( 'widget.location.fn.country' ),
+                                 selected  => $effective_country,
+                                 class     => 'country_choice_select',
+                                 list      => $country_options,
+                                 %{ $opts{'country_input_attributes'} or {} },
+                               );
     if ($minimal_display) {
         $ret .= " ";
     } else {
@@ -87,13 +88,14 @@ sub render_body {
     }
 
     # state
-    $ret .= $class->html_select('id' => 'reloadable_states',
-                                'name' => 'statedrop',
-                                'selected' => ($regions_cfg ? $effective_state : ''),
-                                'list' => $state_options,
-                                'style' => 'display:' . ($regions_cfg ? 'inline' : 'none'),
-                                %{$opts{'state_inputselect_attributes'} or {} },
-                                );
+    $ret .= $class->html_select( id => 'reloadable_states',
+                                 name => 'statedrop',
+                                 title     => $class->ml( 'widget.location.fn.state' ),
+                                 selected => ( $regions_cfg ? $effective_state : '' ),
+                                 list => $state_options,
+                                 style => 'display:' . ( $regions_cfg ? 'inline' : 'none' ),
+                                 %{ $opts{'state_inputselect_attributes'} or {} },
+                               );
     # other state?
     my $state_val = "";
     my $state_inline_color = "";
@@ -118,7 +120,7 @@ sub render_body {
                               'style' => 'display:' . ($regions_cfg ? 'none' : 'inline') . ";$state_inline_color",
                               'maxlength' => '50',
                               %minimal_display_state_attrs,
-                               %{$opts{'state_inputtext_attributes'} or {} },
+                               %{ $opts{'state_inputtext_attributes'} or {} },
                               );
     $ret .= "</span>";
 
@@ -146,14 +148,15 @@ sub render_body {
         }
 
         $ret .= "<tr><td class='field_class'>" . $class->ml('widget.location.fn.zip') . "</td><td>" unless $minimal_display;
-        $ret .= $class->html_text('id' => 'zip',
-                                  'name' => 'zip',
-                                  'value' => $zip_val,
-                                  'size' => '6', 'maxlength' => '5',
-                                  'disabled' => $minimal_display || $effective_country eq 'US' ? '' : 'disabled',
-                                  'style' => "display: " . ($minimal_display && $effective_country ne 'US' ? "none" : "inline") . ";$zip_inline_color",
-                                  %minimal_display_zip_attrs,
-                                  );
+        $ret .= $class->html_text( id => 'zip',
+                                   name => 'zip',
+                                   title => $class->ml( 'widget.location.fn.zip' ),
+                                   value => $zip_val,
+                                   size => '6', maxlength => '5',
+                                   disabled => $minimal_display || $effective_country eq 'US' ? '' : 'disabled',
+                                   style => "display: " . ( $minimal_display && $effective_country ne 'US' ? "none" : "inline" ) . ";$zip_inline_color",
+                                   %minimal_display_zip_attrs,
+                                 );
         $ret .= " <span class='helper'>(" . $class->ml('widget.location.zip.usonly') . ")</span></td></tr>\n" unless $minimal_display;
     }
 
@@ -172,15 +175,16 @@ sub render_body {
         }
 
         $ret .= "<tr><td class='field_class'>" . $class->ml('widget.location.fn.city') . "</td><td>" unless $minimal_display;
-        $ret .= $class->html_text('id' => 'city',
-                                  'name' => 'city',
-                                  'value' => $city_val,
-                                  'size' => '20',
-                                  'maxlength' => '255',
-                                  'style' => "display: " . ($minimal_display && $effective_country eq 'US' ? "none" : "inline") . ";$city_inline_color",
-                                  %minimal_display_city_attrs,
-                                   %{$opts{'state_input_attributes'} or {} },
-                                  );
+        $ret .= $class->html_text( id => 'city',
+                                   name => 'city',
+                                   title => $class->ml( 'widget.location.fn.city' ),
+                                   value => $city_val,
+                                   size => '20',
+                                   maxlength => '255',
+                                   style => "display: " . ($minimal_display && $effective_country eq 'US' ? "none" : "inline") . ";$city_inline_color",
+                                   %minimal_display_city_attrs,
+                                   %{ $opts{'state_input_attributes'} or {} },
+                                 );
         $ret .= "</td></tr>\n" unless $minimal_display;
     }
 
@@ -192,15 +196,16 @@ sub render_body {
             my $usmap = { map { $_ => $map->{$_} } grep { m!^US/! && $_ ne "US/Pacific-New" } keys %$map };
             my $camap = { map { $_ => $map->{$_} } grep { m!^Canada/! } keys %$map };
 
-            $ret .= $class->html_select('name' => 'timezone',
-                                        'selected' => $u->{'timezone'},
-                                        'list' => [
+            $ret .= $class->html_select( name => 'timezone',
+                                         selected => $u->{'timezone'},
+                                         title => $class->ml( 'widget.location.fn.timezone' ),
+                                         list => [
                                             "", $class->ml('widget.location.timezone.select'),
                                             (map { $usmap->{$_}, $_ } sort keys %$usmap),
                                             (map { $camap->{$_}, $_ } sort keys %$camap),
                                             map { $_, $_ } DateTime::TimeZone::all_names()
-                                        ]
-                                        );
+                                         ]
+                                       );
         }
         $ret .= "</td></tr>\n" unless $minimal_display;
     }
diff -r 98841c035b6a -r ac80dea7d38e htdocs/manage/profile/index.bml
--- a/htdocs/manage/profile/index.bml	Thu Jun 10 19:48:47 2010 +0800
+++ b/htdocs/manage/profile/index.bml	Thu Jun 10 07:14:33 2010 -0500
@@ -46,6 +46,8 @@ body<=
     my @settings = ();
     push @settings, "LJ::Setting::UserMessaging" if LJ::is_enabled('user_messaging');
     push @settings, "LJ::Setting::FindByEmail" if LJ::is_enabled('opt_findbyemail');
+    push @settings, "DW::Setting::ProfileEmail";
+    push @settings, "DW::Setting::TxtMsgSetup";
 
     my $dbr = LJ::get_db_reader();
     my $sth;
@@ -56,7 +58,8 @@ body<=
           icq aolim yahoo msn url jabber
           google_talk skype gizmo
           twitter delicious
-          urlname gender last_fm_user opt_hidefriendofs
+          urlname gender last_fm_user
+          opt_hidefriendofs opt_hidememberofs
           sidx_bdate sidx_bday sidx_loc
           opt_showmutualfriends
           opt_showbday opt_showlocation
@@ -77,17 +80,14 @@ body<=
     LJ::EmbedModule->parse_module_embed($u, \$u->{'bio'}, edit => 1);
     LJ::text_out(\$u->{'bio'}, "force");
 
-    # load interests
-    my $uints = $u->get_interests( { forceids => 1 } );
-    my %interests = ();
-    foreach (@$uints) {
-        $interests{$_->[1]} = $_->[0];  # $interests{name} = intid
-    }
+    # load interests: $interests{name} = intid
+    my %interests = %{ $u->interests( { forceids => 1 } ) };
+
 
     ###
     ### no post, show edit form
     ###
-    unless (LJ::did_post()) {
+    unless ( LJ::did_post() ) {
 
         my $ret;
 
@@ -97,25 +97,40 @@ body<=
         $ret .= LJ::make_authas_select($remote, { 'authas' => $GET{'authas'} });
         $ret .= "</form>\n\n";
 
-        $ret .= "<?p " . BML::ml(".intro1", { 'aopts1' => "href='$LJ::SITEROOT/manage/comments/$getextra'",
-                                             'aopts2' => "href='$LJ::SITEROOT/manage/settings/$getextra${getsep}cat=display'"} )
-                . " p?>";
+        $ret .= "<div style='margin: 1em 0;'> ";
+        $ret .= BML::ml( ".intro", { aopts1 => "href='$LJ::SITEROOT/manage/settings/$getextra${getsep}cat=privacy'",
+                                     aopts2 => "href='$LJ::SITEROOT/manage/settings/$getextra${getsep}cat=display'" } );
+        $ret .= "</div>";
+
+        $ret .= qq {
+<h2> $ML{'.jumpto'} <a href='#identity'>$ML{'.section.id'}</a> |
+    <a href='#contact'>$ML{'.section.contact'}</a> |
+    <a href='#bio'>$ML{'.section.bio2'}</a> |
+    <a href='#interests'>$ML{'.section.interests'}</a> |
+    <a href='#display'>$ML{'.section.display'}</a>
+</h2>
+        };
 
         $ret .= "</div>\n";
 
-        $ret.= "<div class='ljclear'></div>\n";
-
+        $ret .= "<div class='ljclear'></div>\n";
 
         $ret .= "<form method='post' action='./$getextra'>\n";
         $ret .= LJ::form_auth();
 
+        $ret .= "<table width='100%' style='margin: 1em 0;'>\n";
+
         # personal information
-        $ret .= "<div class='section_head'> $ML{'.section.id'} </div>\n";
+        $ret .= qq {
+    <tr class='section_head'><td width='75%' colspan=2>
+    <a name='identity'></a>$ML{'.section.id'}
+    </td><td class='view_options'>
+    $ML{'.showto'}</td></tr>
+
+        };
 
         ### Picture Settings
-        $ret .= "<table class='field_block'>\n";
-
-        $ret .= "<tr><td class='field_name'>$ML{'.fn.userpic'}</td>\n";
+        $ret .= "<tr class='field_block'><td class='field_name'>$ML{'.fn.userpic2'}</td>\n";
         $ret .= "<td><div style='width: 100px; height: 100px; float: left; text-align: center; border: 1px solid #ddd'>";
         if ($u->{'defaultpicid'}) {
             my $picid = $u->{'defaultpicid'};
@@ -134,34 +149,44 @@ body<=
         $ret .= LJ::help_icon('upic_keywords');
         $ret .= "<?p <a href='$LJ::SITEROOT/editicons$getextra'>$ML{'.userpic.change'}</a> p?>\n";
         $ret .= "</td>";
-        $ret .= "</tr>\n";
+
+        $ret .= "<td class='selectvis'>";
+        $ret .= "<?p <i> $ML{'.security.visibility.everybody2'} </i> p?>";
+        $ret .= "</td></tr>\n";
 
         # name
-        $ret .= "<tr><td class='field_name'>$ML{'.fn.name'}</td>\n";
+        $ret .= "<tr class='field_block'><td class='field_name'>$ML{'.fn.name2'}</td>\n<td>";
         if (LJ::text_in($saved{'name'})) {
-            $ret .= "<td><div style='float: left'>";
-            $ret .= LJ::html_text({ 'name' => 'name', 'value' => $u->{'name'},
-                                    'size' => '40', 'maxlength' => '50' });
+            $ret .= "<div style='float: left'>";
+            $ret .= LJ::html_text( { name => 'name', value => $u->name_orig,
+                                     title => $ML{'.fn.name2'},
+                                     size => '35', maxlength => '50' } );
             $ret .= "&nbsp; </div><div class='helper'>$ML{'.name'}</div>";
-            $ret .= "</td></tr>\n";
         } else {
-            $ret .= "<td>" . LJ::html_hidden('name_absent', 'yes');
-            $ret .= "<?inerr " . BML::ml('.error.invalidname2', {'aopts' => "href='$LJ::SITEROOT/utf8convert'"}) . " inerr?></td></tr>\n";
+            $ret .= LJ::html_hidden( 'name_absent', 'yes' );
+            $ret .= "<?inerr " . BML::ml( '.error.invalidname2', {'aopts' => "href='$LJ::SITEROOT/utf8convert'"} ) . " inerr?>";
         }
+
+        $ret .= "</td>\n<td class='selectvis'>";
+        $ret .= "<?p <i> $ML{'.security.visibility.everybody2'} </i> p?>";
+        $ret .= "</td></tr>\n";
 
         if ( $u->is_individual ) {
             # gender
-            $ret .= "<tr><td class='field_name'>$ML{'.fn.gender'}</td><td>";
-            $ret .= LJ::html_select({ name => 'gender', selected => $u->prop( 'gender' ) || 'U' },
-                                      F => $ML{'.gender.female'},
-                                      M => $ML{'.gender.male'},
-                                      O => $ML{'.gender.other'},
-                                      U => $ML{'.gender.unspecified'}, );
+            $ret .= "<tr class='field_block'><td class='field_name'>$ML{'.fn.gender'}</td><td>";
+            $ret .= LJ::html_select( { name => 'gender', title => $ML{'.fn.gender'},
+                                       selected => $u->prop( 'gender' ) || 'U' },
+                                     F => $ML{'.gender.female'},
+                                     M => $ML{'.gender.male'},
+                                     O => $ML{'.gender.other'},
+                                     U => $ML{'.gender.unspecified'}, );
+            $ret .= "</td>\n<td class='selectvis'>";
+            $ret .= "<?p <i> $ML{'.security.visibility.nobody'} </i> p?>";
             $ret .= "</td></tr>\n";
         }
 
         # birthday
-        $ret .= "<tr><td class='field_name'>$ML{'.fn.birthday'}</td><td>";
+        $ret .= "<tr class='field_block'><td class='field_name'>$ML{'.fn.birthday'}</td><td>";
         my %bdpart;
         if ($u->{'bdate'} =~ /^(\d\d\d\d)-(\d\d)-(\d\d)$/) {
             ($bdpart{'year'}, $bdpart{'month'}, $bdpart{'day'}) = ($1, $2, $3);
@@ -169,333 +194,345 @@ body<=
             if ($bdpart{'day'} eq "00") { $bdpart{'day'} = ""; }
         }
 
-        $ret .= LJ::html_select({ 'name' => 'month', 'selected' => int($bdpart{'month'}) },
-                                '', '', map { $_, LJ::Lang::month_long_ml($_) } (1..12)) . " ";
-        $ret .= LJ::html_text({ 'name' => 'day', 'value' => $bdpart{'day'}, 'size' => '3', 'maxlength' => '2' }) . " ";
-        $ret .= LJ::html_text({ 'name' => 'year', 'value' => $bdpart{'year'}, 'size' => '5', 'maxlength' => '4' });
+        $ret .= LJ::html_select( { name => 'month', title => $ML{'.fn.birthday.month'},
+                                 selected => int( $bdpart{'month'} ) },
+                                '', '',
+                                map { $_, LJ::Lang::month_long_ml($_) } (1..12) );
+        $ret .= " ";
+        $ret .= LJ::html_text( { name => 'day', value => $bdpart{'day'},
+                                 size => '3', maxlength => '2',
+                                 title => $ML{'.fn.birthday.day'} } );
+        $ret .= " ";
+        $ret .= LJ::html_text( { name => 'year', value => $bdpart{'year'},
+                                 size => '5', maxlength => '4',
+                                 title => $ML{'.fn.birthday.year'} } );
 
         $ret .= "<div style=\"padding-top: .5em;\">\n";
-        $ret .= " <label for='opt_sharebday'>$ML{'.share.birthday'}</label>\n";
-        my $opt_sharebday = ($u->opt_sharebday =~ m/^(A|F|N|R)$/) ? $u->opt_sharebday : 'F';
-        $ret .= LJ::html_select({ 'name' => 'opt_sharebday',
-                                  'selected' => $opt_sharebday },
-                                  { text => BML::ml(".security.visibility.everybody"),
-                                    value => "A",},
-                                  { text => BML::ml(".security.visibility.regusers"),
-                                    value => "R",},
-                                  { text => BML::ml(".security.visibility.friends"),
-                                    value => "F",},
-                                  { text => BML::ml(".security.visibility.nobody"),
-                                    value => "N",});
-
+        $u->{'opt_showbday'} = "D" unless $u->{'opt_showbday'} =~ m/^(D|F|N|Y)$/;
+        $ret .= LJ::html_select( { name => 'opt_showbday',
+                                   title => $ML{'.fn.birthday.level'},
+                                   selected => $u->{'opt_showbday'} },
+                                 N => $ML{'.show.birthday.nothing2'},
+                                 D => $ML{'.show.birthday.day2'},
+                                 Y => $ML{'.show.birthday.year2'},
+                                 F => $ML{'.show.birthday.full2'} );
         $ret .= "</div>\n";
 
-        $ret .= "<div style=\"padding-top: .5em;\">\n";
-        $ret .= " <label for='opt_showbday'>$ML{'.show.birthday'}</label>\n";
-        $u->{'opt_showbday'} = "D" unless $u->{'opt_showbday'} =~ m/^(D|F|N|Y)$/;
-        $ret .= LJ::html_select({ 'name' => 'opt_showbday',
-                                  'selected' => $u->{'opt_showbday'} },
-                                "N" => BML::ml(".show.birthday.nothing"),
-                                "D" => BML::ml(".show.birthday.day"),
-                                "Y" => BML::ml(".show.birthday.year"),
-                                "F" => BML::ml(".show.birthday.full"));
-        $ret .= "</div>\n";
+        $ret .= "</td>\n<td class='selectvis'>";
+        my $opt_sharebday = ( $u->opt_sharebday =~ m/^(A|F|N|R)$/ ) ? $u->opt_sharebday : 'F';
+        $ret .= LJ::html_select( { name => 'opt_sharebday',
+                                   title => BML::ml( '.privacy.title',
+                                            { name => $ML{'.fn.birthday'} } ),
+                                   selected => $opt_sharebday },
+                                 A => $ML{'.security.visibility.everybody2'},
+                                 R => $ML{'.security.visibility.regusers'},
+                                 F => $ML{'.security.visibility.access'},
+                                 N => $ML{'.security.visibility.nobody'} );
+        $ret .= "</td></tr>\n";
+
+        #location
+        $ret .= "<tr class='field_block'><td class='field_name'>$ML{'.fn.location'}</td><td>\n";
+        $ret .= LJ::Widget::Location->render( skip_timezone => 1, minimal_display => 1 );
+
+        $ret .= "</td><td class='selectvis'>";
+        $ret .= LJ::html_select( { name => 'opt_showlocation',
+                                   title => BML::ml( '.privacy.title',
+                                            { name => $ML{'.fn.location'} } ),
+                                   selected => $u->opt_showlocation },
+                                 Y => $ML{'.security.visibility.everybody2'},
+                                 R => $ML{'.security.visibility.regusers'},
+                                 F => $ML{'.security.visibility.access'},
+                                 N => $ML{'.security.visibility.nobody'} );
+        $ret .= "</td></tr>\n";
+
+        ## CONTACT INFO
+        $ret .= qq {
+    <tr class='section_head'><td width='75%' colspan=2>
+    <a name='contact'></a>$ML{'.section.contact2'}</td>
+    <td class='view_options'> $ML{'.showto'}</td></tr>
+
+    <tr class='section_subhead'><td colspan=3>
+    $ML{'.subsection.web'}</td></tr>
+        };
+
+        # url
+        $ret .= "<tr class='field_block'><td class='field_name'>\n";
+        $ret .= "$ML{'.fn.link2'}</td><td>";
+        $ret .= LJ::html_text( { name => 'url', value => $u->{'url'},
+                                 title => $ML{'.fn.link2'},
+                                 size => '45', maxlength => '255' } );
+        $ret .= "</td><td class='selectvis'>";
+        $ret .= "<?p <i> $ML{'.security.visibility.everybody2'} </i> p?>";
+        $ret .= "</td></tr>\n";
+
+        # urlname
+        $ret .= "<tr class='field_block'><td class='field_name'>\n";
+        $ret .= "$ML{'.fn.sitename2'}</td><td>";
+        $ret .= LJ::html_text( { name => 'urlname', value => $u->{'urlname'},
+                                 title => $ML{'.fn.sitename2'},
+                                 size => '45', maxlength => '255' } );
+        $ret .= "</td><td class='selectvis'>";
+        $ret .= "<?p <i> $ML{'.security.visibility.everybody2'} </i> p?>";
+        $ret .= "</td></tr>\n";
+
+        # email
+        my $curr_privacy = { Y => $ML{'.security.visibility.everybody2'},
+                             R => $ML{'.security.visibility.regusers'},
+                             F => $ML{'.security.visibility.access'},
+                             N => $ML{'.security.visibility.nobody'},
+                           }->{$u->opt_showcontact};
+        $ret .= qq{
+    <tr class='section_subhead'><td colspan=2>$ML{'.subsection.messaging'}
+    </td><td class='view_options'>
+    <a href='$LJ::SITEROOT/manage/settings/$getextra${getsep}cat=privacy'>
+    $ML{'.fn.privacy'}: $curr_privacy</a></td></tr>\n
+        };
+
+        my $u_email_raw = $u->email_raw;
+
+        $ret .= qq {
+    <tr class='field_block'><td class='field_name'>
+    $ML{'.fn.email.system'}</td><td style='vertical-align: middle'>
+    <b>$u_email_raw</b> &nbsp; <a href='$LJ::SITEROOT/changeemail$getextra'>
+    $ML{'.email.change.system'}</a></td><td class='selectvis'>
+
+        };
+
+        # opt_whatemailshow
+        my $cur = $u->opt_whatemailshow;
+        # drop BVL values that govern site alias; we input that below instead
+        $cur =~ tr/BVL/AAN/;  # D reset later
+        $ret .= LJ::html_select( { name => 'opt_whatemailshow',
+                                   title => BML::ml( '.display.title',
+                                            { name => $ML{'.fn.email.system'} } ),
+                                   selected => $cur },
+                                 A => $ML{'.security.visibility.privacy'},
+                                 N => $ML{'.security.visibility.noshow'} );
+        $ret .= "</td></tr>\n";
+
+        $ret .= "<tr class='field_block'><td class='field_name'> $ML{'.fn.email.display'}</td><td>\n";
+
+        $ret .= DW::Setting::ProfileEmail->option( $u );
+        $ret .= "<br /><span class='helper'>$ML{'.email.profile'}</span>";
+
+        $ret .= "</td><td class='selectvis'>";
+#        $ret .= "<?p <i> $ML{'.security.visibility.same'} </i> p?>";
 
         $ret .= "</td></tr>\n";
 
-        $ret .= "</table>\n";
-
-        ## COMMUNITY THEME
-
-        if ($u->is_community) {
-            $ret .= "<div class='section_head'>$ML{'.section.description'}</div>\n";
-            $ret .= $ML{'.theme'} . "<br />";
-            $ret .= LJ::html_text({ 'name' => 'comm_theme', 'value' => $u->{comm_theme},
-                                    'size' => '50', 'maxlength' => '100' });
+        if ( $LJ::USER_EMAIL && $u->can_have_email_alias && ! $u->prop( "no_mail_alias" ) ) {
+            $ret .= "<tr class='field_block'><td class='field_name'>";
+            $ret .= BML::ml( '.fn.email.site', { siteabbrev => $LJ::SITENAMEABBREV } );
+            $ret .= "</td><td style='vertical-align: middle'>\n";
+            $ret .= $u->username . "\@$LJ::USER_DOMAIN";
+            $ret .= "</td><td class='selectvis'>";
+            # this is where we get BVL back
+            my $checked = ( $u->opt_whatemailshow =~ /[BVL]/ ) ? 'Y' : 'N';
+            $ret .= LJ::html_select( { name => 'opt_usesite',
+                                       title => BML::ml( '.display.title',
+                                                { name => $ML{'.fn.email.site'} } ),
+                                       selected => $checked },
+                                     Y => $ML{'.security.visibility.privacy'},
+                                     N => $ML{'.security.visibility.noshow'} );
+            $ret .= "</td></tr>\n";
         }
 
-        ## INTERESTS
+        if ( $u->is_person ) {
 
-        {
-            ### Interests
-            $ret .= "<a name='interests'></a><div class='section_head'>$ML{'.section.interests'}</div>\n";
-            my @eintsl;
-            foreach (sort keys %interests) {
-                push @eintsl, $_ if LJ::text_in($_);
+            if ( LJ::is_enabled( 'ljtalk' ) ) {
+                $ret .= "<tr class='field_block'><td class='field_name'>";
+                $ret .= BML::ml( '.fn.ljtalk.address', { siteabbrev => $LJ::SITENAMEABBREV } );
+                $ret .= "</td><td style='vertical-align: middle'>" . $u->ljtalk_id;
+                # Don't show LJ Talk field? (opt_showljtalk)
+                $ret .= "</td><td class='selectvis'>";
+                $ret .= LJ::html_select( { name => 'opt_showljtalk',
+                                           id => 'opt_showljtalk',
+                                           title => BML::ml( '.display.title',
+                                                    { name => $ML{'.fn.ljtalk.address'} } ),
+                                           selected => $u->hide_ljtalk ? 'N' : 'Y' },
+                                         Y => $ML{'.security.visibility.privacy'},
+                                         N => $ML{'.security.visibility.noshow'} );
+                $ret .= "</td></tr>\n";
+
+                my $jabber_title = LJ::Hooks::run_hook("jabber_title") || $ML{'/manage/settings/index.bml.jabber.title'};
+                $ret .= "<tr class='field_block'><td class='field_name'>";
+                $ret .= BML::ml( '.fn.ljtalk.status', { siteabbrev => $LJ::SITENAMEABBREV } );
+                $ret .= "</td><td>$ML{'.fn.showljtalk'}<br />";
+                $ret .= "<span class='helper'>" . BML::ml('/manage/settings/index.bml.jabber.text', {'jabbertitle' => $jabber_title}) . "</span>";
+                # Jabber Online Status
+                $ret .= "</td><td class='selectvis'>";
+                $ret .= LJ::html_select( { name => 'opt_showonlinestatus',
+                                           id => 'opt_showonlinestatus',
+                                           title => BML::ml( '.privacy.title',
+                                                    { name => $ML{'.fn.ljtalk.status'} } ),
+                                           selected => $u->opt_showonlinestatus },
+                                         Y => $ML{'.security.visibility.everybody2'},
+                                         F => $ML{'.security.visibility.access'},
+                                         N => $ML{'.security.visibility.nobody'} );
+                $ret .= "</td></tr>\n";
             }
 
-            $ret .= "<table>\n";
+            # opt_findbyemail
+            if ( LJ::is_enabled( 'opt_findbyemail' ) ) {
+                $ret .= "<tr class='field_block'><td class='field_name'>";
+                $ret .= LJ::Setting::FindByEmail->label . "</td><td><span class='helper'>";
+                $ret .= BML::ml( 'settings.findbyemail.helper', {
+                    sitename => $LJ::SITENAMESHORT,
+                    siteabbrev => $LJ::SITENAMEABBREV } );
+                $ret .= "</span></td>\n<td class='selectvis'>";
+                $ret .= LJ::Setting::FindByEmail->as_html( $u, undef, { minimal_display => 1, helper => 0 } );
+                $ret .= "</td></tr>\n";
+            }
 
-            $ret .= "<tr><td colspan='2'>$ML{'.fn.interests'}</td></tr>";
-            $ret .= "<tr><td>";
-            $ret .= LJ::html_textarea({ 'name' => 'interests', 'value' => join(", ", @eintsl),
-                                        'rows' => '10', 'cols' => '50', 'wrap' => 'soft' });
-            $ret .= "</td><td class='example'>";
-            $ret .= "<?p $ML{'.interest.line1'} p?>";
-            $ret .= "<?p $ML{'.interest.line2'} p?>";
-            $ret .= "<?p $ML{'.interest.line3'} p?>";
-            $ret .= "<?p $ML{'.interest.line4'} p?>";
-            $ret .= "<?p $ML{'.interest.line5'} p?>";
-            $ret .= "</td></tr>\n\n";
+            # opt_usermsg
+            if ( LJ::is_enabled( 'user_messaging' ) ) {
+                $ret .= "<tr class='field_block'><td class='field_name'>";
+                $ret .= LJ::Setting::UserMessaging->label;
+                $ret .= "</td><td><span class='helper'>";
+                $ret .= BML::ml( 'settings.usermessaging.helper', { sitename => $LJ::SITENAMESHORT } );
+                $ret .= "</span></td>\n<td class='selectvis'>";
+                $ret .= LJ::Setting::UserMessaging->option( $u, undef, { minimal_display => 1, helper => 0 } );
+                $ret .= "</td></tr>\n";
+            }
 
-            $ret .= "</table>\n";
+        } # end is_person check
+
+        if ( $u->can_use_textmessaging ) {
+
+            $ret .= "<tr class='field_block'><td class='field_name'>$ML{'.section.textmsg'}</td><td>\n";
+
+            $ret .= DW::Setting::TxtMsgSetup->option( $u, undef, { info_only => 1 } );
+            $ret .= "</td>\n<td class='selectvis'>";
+            $ret .= DW::Setting::TxtMsgSetup->option( $u, undef, { vis_only => 1 } );
+
+            $ret .= "</td></tr>\n";
         }
+        
+        if ( $u->is_person ) {
+
+            # chat thingies
+
+            $ret .= qq{
+    <tr class='section_subhead'><td colspan=2>$ML{'.subsection.other'}
+    </td><td class='view_options'>
+    <a href='$LJ::SITEROOT/manage/settings/$getextra${getsep}cat=privacy'>
+    $ML{'.fn.privacy'}: $curr_privacy</a></td></tr>\n
+        };
+
+            $u->{'gizmo'} = $u->gizmo_account();
+
+            $ret .= "<tr><td colspan=3><table>";
+            my $oddeven = 0;
+
+            foreach my $p (
+                           ["aolim", $ML{'.chat.aolim'}, 28], ["icq", $ML{'.chat.icquin'}, 12],
+                           ["yahoo", $ML{'.chat.yahooid'}, 33], ["msn", $ML{'.chat.msnusername'}, 60],
+                           ["jabber", $ML{'.chat.jabber'}, 60], ["google_talk", $ML{'.chat.googletalk'}, 60],
+                           ["skype", $ML{'.chat.skype'}, 40],
+                           ["gizmo", $ML{'.chat.gizmo'}, 40],
+                           ["twitter", $ML{ '.services.twitter' }, 40],
+                           ["delicious", $ML{ '.services.delicious' }, 40],
+                           ["last_fm_user", $ML{'.services.last_fm'}, 255],
+                          )
+
+            {
+                $oddeven = !$oddeven;
+                $ret .= "<tr class='field_block'>" if $oddeven;
+                $ret .= "<td class='field_name' width='20%'>$p->[1]</td><td width='30%'>";
+                $ret .= LJ::html_text( { name => $p->[0],
+                                         value => $u->{$p->[0]},
+                                         title => $p->[1],
+                                         size => '20',
+                                         maxlength => $p->[2] } );
+                $ret .= "</td>\n";
+                $ret .= "</tr>" unless $oddeven;
+            }
+
+            $ret .= "<td></td><td></td></tr>" if $oddeven;
+            $ret .= "</table></td></tr>\n";
+
+        } # end is_person check
+
+        $ret .= "</table>\n";
 
         ## BIO
 
-        ### User bio
-        $ret .= "<a name='bio'></a><div class='section_head'>$ML{'.section.bio'}</div>";
-        if (LJ::text_in($saved{'bio'})) {
-            $ret .= "<table class='field_block'>";
-            if ($u->is_identity) {
-                $ret .= "<tr><td colspan='2'>$ML{'.fn.bio.openid'}<br />\n";
-            } else {
-                $ret .= "<tr><td colspan='2'>$ML{'.fn.bio'}<br />\n";
-            }
-            $ret .= LJ::html_textarea({ 'name' => 'bio', 'rows' => '10', 'cols' => '50',
-                                        'wrap' => 'soft', 'value' => $u->{'bio'}, 'style' => "width: 90%", }) . "</td></tr>\n";
-            $ret .= "</table>\n";
+        $ret .= "<div class='section_head'><a name='bio'></a>$ML{'.section.bio2'}</div>";
+        if ( LJ::text_in( $saved{'bio'} ) ) {
+            $ret .= $u->is_identity ? $ML{'.fn.bio.openid'} : $ML{'.fn.bio'};
+            $ret .= "<br />\n";
+            $ret .= LJ::html_textarea( { name => 'bio',
+                                         title => $ML{'.section.bio2'},
+                                         rows => '10', cols => '50',
+                                         wrap => 'soft',
+                                         style => "width: 90%",
+                                         value => $u->{bio} } );
         } else {
             $ret .= LJ::html_hidden('bio_absent', 'yes');
             $ret .= "<?p <?inerr " . BML::ml('.error.invalidbio', {'aopts' => "href='$LJ::SITEROOT/utf8convert'"}) . " inerr?> p?>\n";
         }
 
-        $ret .= "<div class='section_head'>$ML{'.section.web'}</div>\n";
+        ## INTERESTS
 
-        $ret .= "<table class='field_block'>\n";
-        # url
-        $ret .= "<tr><td class='field_name'>$ML{'.fn.link'}</td><td>";
-        $ret .= LJ::html_text({ 'name' => 'url', 'value' => $u->{'url'}, 'size' => '40', 'maxlength' => '255' });
-        $ret .= " <span class='helper'>($ML{'.optional'})</span></td></tr>\n";
+        $ret .= "<div class='section_head'><a name='interests'></a>$ML{'.section.interests'}</div>\n";
 
-        # urlname
-        $ret .= "<tr><td class='field_name'>$ML{'.fn.sitename'}</td><td>";
-        $ret .= LJ::html_text({ 'name' => 'urlname', 'value' => $u->{'urlname'}, 'size' => '40', 'maxlength' => '255' });
-        $ret .= " <span class='helper'>($ML{'.optional'})</span></td></tr>\n";
-        $ret .= "</table>\n";
+        if ( $u->is_community ) {
+            $ret .= $ML{'.fn.commdescription2'} . "<br />";
+            $ret .= LJ::html_text( { name => 'comm_theme',
+                                     title => $ML{'.fn.commdesc'},
+                                     value => $u->{comm_theme},
+                                     size => '50', maxlength => '100' } );
+            $ret .=  "<br /><br />";
+        }
 
-        $ret .= "<div class='section_head'>$ML{'.section.location'}\n";
-        $ret .= "<span class='view_options'>";
-        $ret .= "<label for='opt_showlocation'>$ML{'.location'}</label> ";
-        $ret .= LJ::html_select({ 'name' => 'opt_showlocation',
-                                   'selected' => $u->opt_showlocation },
-                                "Y" => BML::ml(".security.visibility.everybody"),
-                                "R" => BML::ml(".security.visibility.regusers"),
-                                "F" => BML::ml(".security.visibility.friends"),
-                                "N" => BML::ml(".security.visibility.nobody"));
-        $ret .= "</span></div>";
+        my @eintsl;
+        foreach ( sort keys %interests ) {
+            push @eintsl, $_ if LJ::text_in( $_ );
+        }
 
-        $ret .= LJ::Widget::Location->render( skip_timezone => 1 );
+        $ret .= $ML{'.fn.interests'};
+        $ret .= LJ::html_textarea( { name => 'interests',
+                                     title => $ML{'.section.interests'},
+                                     value => join(", ", @eintsl),
+                                     rows => '10', cols => '50', wrap => 'soft',
+                                     style => "width: 90%" } );
 
-
-        ## CONTACT INFO
-        $ret .= "<div class='section_head'>$ML{'.section.contact'} \n";
-
-        # contactshow_sec
-        $ret .= "<span class='view_options'>$ML{'.fn.contactinfo'} ";
-        $ret .= LJ::html_select({ 'name' => 'allow_contactshow',
-                                      'selected' => $u->opt_showcontact},
-                                      { text => BML::ml(".security.visibility.everybody"),
-                                        value => "Y",},
-                                      { text => BML::ml(".security.visibility.regusers"),
-                                        value => "R",},
-                                      { text => BML::ml(".security.visibility.friends"),
-                                        value => "F",},
-                                      { text => BML::ml(".security.visibility.nobody"),
-                                        value => "N",});
-
-
-        $ret .= "</span></div>\n";
-
-        $ret .= "<table class='field_block'>\n";
+        ## CIRCLE
+        $ret .= "<table width='100%' style='margin: 1em 0;'>";
+        $ret .= "<tr class='section_head'><td width='75%' colspan=3>";
+        $ret .= "<a name='display'></a>";
+        $ret .= $u->is_community ? $ML{'.section.display.members'} : $ML{'.section.display.circle'};
         $ret .= "</td></tr>\n";
 
-        # email
-
-        $ret .= "<tr><td class='field_name'> $ML{'.fn.email.system'}</td><td>\n";
-        $ret .= "<b>" . $u->email_raw . "</b> &nbsp; <a href='$LJ::SITEROOT/changeemail$getextra'>$ML{'.email.change.system'}</a></td></tr>";
-
-        $ret .= "<tr><td class='field_name'> $ML{'.fn.email.display'}</td><td>\n";
-
-        my $emailsettingurl = $getextra ? "<a href='$LJ::SITEROOT/manage/settings/$getextra&cat=privacy'>" : "<a href='$LJ::SITEROOT/manage/settings/?cat=privacy'>";
-
-        $ret .= "<b>" . $u->prop( 'opt_profileemail' ) . "</b> &nbsp; " . $emailsettingurl . "$ML{'.email.change.display'}</a></td></tr>";
-
-        # opt_whatemailshow
-        $ret .= "<tr><td class='field_name'> $ML{'.fn.emaildisplay'}</td><td> ";
-        my $cur = $u->opt_whatemailshow;
-        my @vals = ( ( $LJ::USER_EMAIL && $u->can_have_email_alias )
-                     ? ("A" => BML::ml(".email.opt.actual"),
-                        "D" => BML::ml(".email.opt.display"),
-                        "L" => BML::ml(".email.opt.site", { sitenameshort => $LJ::SITENAMESHORT } ),
-                        "B" => BML::ml(".email.opt.both.actual", { sitenameshort => $LJ::SITENAMESHORT } ),
-                        "V" => BML::ml(".email.opt.both.display", { sitenameshort => $LJ::SITENAMESHORT } ),
-                        "N" => BML::ml(".email.opt.none"))
-                     : ("A" => BML::ml(".email.opt.actual"),
-                        "D" => BML::ml(".email.opt.display"),
-                        "N" => BML::ml(".email.opt.none")));
-        $ret .= LJ::html_select({ 'name' => 'opt_whatemailshow', 'selected' => $cur }, @vals) . "\n";
-
-        $ret .= "</td></tr>\n";
-
-
-        if ($u->is_person) {
-
-        # opt_findbyemail
-        if ( LJ::is_enabled('opt_findbyemail') ) {
-            $ret .= "<tr><td class='field_name'>" .
-                    LJ::Setting::FindByEmail->label . "</td><td>";
-            $ret .= LJ::Setting::FindByEmail->as_html($u);
+        # opt_showmutualfriends
+        unless ( $u->is_community ) {
+            $ret .= "<tr class='field_block'><td class='field_name'>";
+            $ret .= "$ML{'.fn.mutualfriends3'}</td><td width='10px'>";
+            $ret .= LJ::html_check( { type => 'check', name => 'opt_showmutualfriends',
+                                      id => 'opt_showmutualfriends', selected => $u->{'opt_showmutualfriends'} } );
+            $ret .= "</td><td style='vertical-align: middle'>";
+            $ret .= "<label for='opt_showmutualfriends'>$ML{'.mutualfriends3'}</label>";
             $ret .= "</td></tr>\n";
         }
 
-        # opt_usermsg
-        if ( LJ::is_enabled('user_messaging') ) {
-            $ret .= "<tr><td class='field_name'>" . BML::ml('.section.usermessaging', { siteabbrev => $LJ::SITENAMEABBREV } ) ."</td><td>";
-            $ret .= LJ::Setting::UserMessaging->as_html($u);
-            $ret .= "</td></tr>\n";
-        }
+        # opt_hidefriendofs
+        $ret .= "<tr class='field_block'><td class='field_name' width='15%'>";
+        $ret .= $u->is_community ? $ML{'.fn.subscriberof'} : $ML{'.fn.friendof3'};
+        $ret .= "</td><td width='10px'>";
+        $ret .= LJ::html_check( { type => 'check', name => 'opt_hidefriendofs',
+                                  id => 'opt_hidefriendofs', selected => ! $u->{'opt_hidefriendofs'} } );
+        $ret .= "</td><td style='vertical-align: middle'><label for='opt_hidefriendofs'>";
+        $ret .= $u->is_community ? $ML{'.subscriberof'} : $ML{'.friendof3'};
+        $ret .= "</label></td></tr>\n";
 
-        # chat thingies
-        $ret .= "<tr><td colspan='2'></td></tr><tr><td class='field_name' colspan='2' style='text-align: center;'><a name='iminfo'></a>$ML{'.fn.imservices3'}</td></tr>";
-
-
-        $u->{'gizmo'} = $u->gizmo_account();
-
-        my $ljtalk_title = '<a href="' . LJ::Hooks::run_hook('jabber_link') . '">' .
-            LJ::Hooks::run_hook('jabber_title') . '</a>';
-
-        foreach my $p (
-                       ["ljtalk", $ljtalk_title, 40],
-                       ["aolim", $ML{'.chat.aolim'}, 28], ["icq", $ML{'.chat.icquin'}, 12],
-                       ["yahoo", $ML{'.chat.yahooid'}, 33], ["msn", $ML{'.chat.msnusername'}, 60],
-                       ["jabber", $ML{'.chat.jabber'}, 60], ["google_talk", $ML{'.chat.googletalk'}, 60],
-                       ["skype", $ML{'.chat.skype'}, 40],
-                       ["gizmo", $ML{'.chat.gizmo'}, 40],
-                       ["twitter", $ML{ '.services.twitter' }, 40],
-                       ["delicious", $ML{ '.services.delicious' }, 40],
-)
-
-        {
-            next if $p->[0] eq "ljtalk" && ! LJ::is_enabled('ljtalk');
-
-            $ret .= "<tr><td class='field_name'>$p->[1]</td><td>";
-            unless ($p->[0] eq "ljtalk") {
-                $ret .= LJ::html_text({ 'name' => $p->[0], 'value' => $u->{$p->[0]}, 'size' => '20', 'maxlength' => $p->[2] });
-            } else {
-                $ret .= $u->ljtalk_id;
-                # Don't show LJ Talk field? (opt_showljtalk)
-                $ret .= LJ::html_check({ 'type' => 'check',
-                                         'name' => 'opt_showljtalk',
-                                         'id' => 'opt_showljtalk',
-                                         'selected' => $u->hide_ljtalk });
-                $ret .= "<label for='opt_showljtalk' style='font-size: 10px;'>$ML{'.showljtalk'}</label>";
-
-                # Jabber Online Status
-                my $jabber_title = LJ::Hooks::run_hook("jabber_title") || $ML{'/manage/settings/index.bml.jabber.title'};
-                $ret .= "<br />";
-                $ret .= BML::ml('/manage/settings/index.bml.jabber', {'jabbertitle' => $jabber_title}) . " ";
-                $ret .= LJ::html_select({ 'name' => 'opt_showonlinestatus',
-                                          'id' => 'opt_showonlinestatus',
-                                          'selected' => $u->opt_showonlinestatus },
-                                          "Y" => BML::ml("/manage/settings/index.bml.security.visibility.everybody"),
-                                          "F" => BML::ml("/manage/settings/index.bml.security.visibility.friends"),
-                                          "N"  => BML::ml("/manage/settings/index.bml.security.visibility.nobody") );
-                $ret .= "<br />\n<span class='helper'>" . BML::ml('/manage/settings/index.bml.jabber.text', {'jabbertitle' => $jabber_title}) . "</span>";
-            }
-            $ret .= "</td></tr>\n";
-        }
-
-        # last_fm_user
-        $ret .= "<tr><td class='field_name'>$ML{'.fn.last_fm'}</td><td>";
-        $ret .= LJ::html_text({ 'name' => 'last_fm_user', 'value' => $u->{'last_fm_user'}, 'size' => '20', 'maxlength' => '255' });
-        $ret .= "</td></tr>";
-        $ret .= "</td></tr>\n";
-
-        } # end is_person check
-
-        $ret .= "</table>\n";
-
-        ## TEXT MESSAGING
-
-        $ret .= "<a name='txtmsg'></a><div class='section_head'>$ML{'.section.textmsg'}\n";
-        unless ( $u->can_use_textmessaging ) {
-            my $inline;
-            if ($inline .= LJ::Hooks::run_hook("cprod_inline", $u, 'TextMessaging')) {
-                $ret .= "</div>$inline";
-            } else {
-                $ret .= "</div>".BML::ml('cprod.textmessaging.text3.v1');
-            }
-        }
-        if ( $u->can_use_textmessaging ) {
-            my $tminfo = LJ::TextMessage->tm_info($u, remap_result => 1);
-            foreach (values %$tminfo) { LJ::text_out(\$_); }
-            $tminfo->{'security'} = "N" if ($u->{'txtmsg_status'} eq 'off' || $u->{'txtmsg_status'} eq 'none');
-
-            $ret .= "<span class='view_options'>$ML{'.fn.txtmsg'}";
-            $ret .= LJ::html_select({ 'name' => 'txtmsg_security', 'selected' => $tminfo->{'security'} },
-                                      "all" => BML::ml(".security.visibility.everybody"),
-                                      "reg" => BML::ml(".security.visibility.regusers"),
-                                      "friends" => BML::ml(".security.visibility.friends"),
-                                      "N"   => BML::ml(".security.visibility.nobody") );
-            $ret .= "</span></div>\n";
-
-            $ret .= "<table class='field_block'>\n";
-
-            foreach (values %$tminfo) { LJ::text_out(\$_); }
-
-            $ret .= "<tr><td class='field_name'>$ML{'.fn.servprov'}</td><td>";
-            {
-                my @opts = ("", "");
-                foreach my $p (LJ::TextMessage::providers()) {
-                    my $info = LJ::TextMessage::provider_info($p);
-                    push @opts, ($p, $info->{'name'});
-                }
-                $ret .= LJ::html_select({ 'name' => 'txtmsg_provider',
-                                          'selected' => $tminfo->{'provider'}, },
-                                          @opts);
-            }
-
-            $ret .= " " . BML::ml('.txt.details', {'aopts' => "href='$LJ::SITEROOT/tools/textmessage?mode=details'"}) . "</td></tr>\n";
-            $ret .= "<tr><td class='field_name'>$ML{'.fn.txtnum'}</td><td>";
-            $ret .= LJ::html_text({ 'name' => 'txtmsg_number',  'value' => $tminfo->{'number'},
-                                    'size' => '15', 'maxlength' => '40' });
-            $ret .= "</td></tr>\n";
-            $ret .= "</table>\n";
-        }
-
-        ## FRIENDS
-        if ($u->is_community) {
-            $ret .= "<div class='section_head'>$ML{'.section.members'}</div>\n";
-        }
-        else {
-            $ret .= "<div class='section_head'>$ML{'.section.friends'}</div>\n";
-        }
-
-        $ret .= "<table class='field_block'>\n";
-
-        # opt_showmutualfriends
-        unless ($u->is_community) {
-            $ret .= "<tr><td class='field_name'><label for='opt_showmutualfriends'>$ML{'.fn.mutualfriends'}</label></td><td>";
-            $ret .= LJ::html_check({ 'type' => 'check', 'name' => 'opt_showmutualfriends', 'id' => 'opt_showmutualfriends',
-                                 'selected' => $u->{'opt_showmutualfriends'} });
-            $ret .= " <label for='opt_showmutualfriends'>$ML{'.mutualfriends'}</label></td></tr>\n";
-       } 
-
-        # opt_hidefriendofs
-        if ($u->is_community) {
-            $ret .= "<tr><td class='field_name'><label for='opt_hidefriendofs'>$ML{'.fn.subscriberof'}</label></td><td>";
-        }
-        else {
-            $ret .= "<tr><td class='field_name'><label for='opt_hidefriendofs'>$ML{'.fn.friendof'}</label></td><td>";
-        }
-        $ret .= LJ::html_check({ 'type' => 'check', 'name' => 'opt_hidefriendofs', 'id' => 'opt_hidefriendofs',
-                                 'selected' => ! $u->{'opt_hidefriendofs'} });
-        if ($u->is_community) {
-            $ret .= " <label for='opt_hidefriendofs'>$ML{'.subscriberof'}</label></td></tr>\n";
-        }
-        else { 
-            $ret .= " <label for='opt_hidefriendofs'>$ML{'.friendof'}</label></td></tr>\n";
+        # opt_hidememberofs
+        unless ( $u->is_community ) {
+            $ret .= "<tr class='field_block'><td class='field_name'>";
+            $ret .= "$ML{'.fn.comms'}</td><td width='10px'>";
+            $ret .= LJ::html_check( { type => 'check', name => 'opt_hidememberofs',
+                                      id => 'opt_hidememberofs', selected => ! $u->{'opt_hidememberofs'} } );
+            $ret .= "</td><td style='vertical-align: middle'>";
+            $ret .= "<label for='opt_hidememberofs'>$ML{'.comms'}</label></td></tr>\n";
         }
 
         $ret .= "</table>\n";
@@ -514,7 +551,7 @@ body<=
     ### we have a post, process edits
     ###
 
-    if (LJ::did_post()) {
+    if ( LJ::did_post() ) {
         return "<?h1 $ML{'Error'} h1?><?p $ML{'error.invalidform'} p?>" unless LJ::check_form_auth();
 
         return "<?badinput?>" unless LJ::text_in(\%POST);
@@ -552,26 +589,16 @@ body<=
         }
 
         if ($POST{'LJ__Setting__UserMessaging_opt_usermsg'} && !$POST{'LJ__Setting__UserMessaging_opt_usermsg'} =~ /^[MFNY]$/) {
-            push @errors, BML::ml(".error.usermessaging");
+            push @errors, $ML{'.error.usermessaging'};
         }
 
         if ($POST{'LJ__Setting__FindByEmail_opt_findbyemail'} && !$POST{'LJ__Setting__FindByEmail_opt_findbyemail'} =~ /^[HNY]$/) {
-            push @errors, BML::ml(".error.findbyemail");
+            push @errors, $ML{'.error.findbyemail'};
         }
 
         # bio
         if (length($POST{'bio'}) >= LJ::BMAX_BIO) {
             push @errors, $ML{'.error.bio.toolong'};
-        }
-
-        # text messaging
-        if ($POST{'txtmsg_security'} =~ m/^(all|reg|friends)$/) {
-            unless ($POST{'txtmsg_provider'}) {
-                push @errors, $ML{'.error.txt.require_provider'};
-            }
-            unless ($POST{'txtmsg_number'}) {
-                push @errors, $ML{'.error.txt.require.number'};
-            }
         }
 
         # FIXME: validation AND POSTING are handled by widgets' handle_post() methods
@@ -597,18 +624,16 @@ body<=
 
         my $newbio = defined($POST{'bio_absent'}) ? $saved{'bio'} : $POST{'bio'};
         my $has_bio = ($newbio =~ /\S/) ? "Y" : "N";
-        my $txtmsg_status = $POST{'txtmsg_security'} =~ m/^(all|reg|friends)$/ ? "on" : "off";
         # setup what we're gonna update in the user table:
         my %update = (
                       'name' => $newname,
                       'bdate' => sprintf("%04d-%02d-%02d", $POST{'year'}, $POST{'month'}, $POST{'day'}),
                       'has_bio' => $has_bio,
                       'allow_getljnews' => $POST{'allow_getljnews'} ? "Y" : "N",
-                      'txtmsg_status' => $txtmsg_status,
                       );
 
         if ($POST{'allow_contactshow'}) {
-            $update{'allow_contactshow'} = $POST{'allow_contactshow'} if $POST{'allow_contactshow'} =~ m/^(N|R|Y|F)$/;
+            $update{'allow_contactshow'} = $POST{'allow_contactshow'} if $POST{'allow_contactshow'} =~ m/^[NRYF]$/;
         }
 
         if (defined $POST{'oldenc'}) {
@@ -624,16 +649,21 @@ body<=
             # opts
             $POST{'opt_showmutualfriends'} = $POST{'opt_showmutualfriends'} ? 1 : 0;
             $POST{'opt_hidefriendofs'} = $POST{'opt_hidefriendofs'} ? 0 : 1;
+            $POST{'opt_hidememberofs'} = $POST{'opt_hidememberofs'} ? 0 : 1;
             $POST{'gender'} = 'U' unless $POST{'gender'} =~ m/^[UMFO]$/;
-            $POST{'opt_sharebday'} = undef unless $POST{'opt_sharebday'} =~ m/^(A|F|N|R)$/;
-            $POST{'opt_showbday'} = 'D' unless $POST{'opt_showbday'} =~ m/^(D|F|N|Y)$/;
+            $POST{'opt_sharebday'} = undef unless $POST{'opt_sharebday'} =~ m/^[AFNR]$/;
+            $POST{'opt_showbday'} = 'D' unless $POST{'opt_showbday'} =~ m/^[DFNY]$/;
             # undefined means show to everyone, "N" means don't show
-            $POST{'opt_showlocation'} = undef unless $POST{'opt_showlocation'} =~ m/^(N|R|Y|F)$/;
+            $POST{'opt_showlocation'} = undef unless $POST{'opt_showlocation'} =~ m/^[NRYF]$/;
             # Does the user want to show the LJ Talk field?  Y=Yes, N=No
             # In this case, the question is actually if they want to hide
             # it, hence looking for a value of 'N' before 'Y'.
             $POST{'opt_showljtalk'} = $POST{'opt_showljtalk'} ? 'N' : 'Y';
-            $POST{'opt_showonlinestatus'} = '' unless $POST{'opt_showonlinestatus'} =~ m/^(Y|F|N)$/;
+            $POST{'opt_showonlinestatus'} = '' unless $POST{'opt_showonlinestatus'} =~ m/^[YFN]$/;
+            # change value of opt_whatemailshow based on opt_usesite and
+            # $u->profile_email (changed above by DW::Setting::ProfileEmail)
+            $POST{'opt_whatemailshow'} =~ tr/A/D/ if $u->profile_email;
+            $POST{'opt_whatemailshow'} =~ tr/ADN/BVL/ if $POST{'opt_usesite'} eq 'Y';
 
             # for the directory.
             $POST{'sidx_bdate'} = undef;
@@ -660,7 +690,8 @@ body<=
               icq aolim yahoo msn url jabber
               google_talk skype
               twitter delicious
-              urlname gender last_fm_user opt_hidefriendofs
+              urlname gender last_fm_user
+              opt_hidefriendofs opt_hidememberofs
               sidx_bdate sidx_bday
               opt_showmutualfriends
               opt_showbday opt_showlocation opt_showljtalk
@@ -690,26 +721,6 @@ body<=
         LJ::EmbedModule->parse_module_embed($u, \$POST{'bio'});
         $u->set_bio($POST{'bio'}, $POST{'bio_absent'});
 
-        # update their text messaging info
-        my $tminfo = LJ::TextMessage->tm_info($u);
-        # Check that text messaging is turned off and either
-        # the provider or number have been set to null
-        if ($txtmsg_status eq "off" &&
-            (($tminfo->{'provider'} && ! $POST{'txtmsg_provider'}) ||
-            ($tminfo->{'number'} && ! $POST{'txtmsg_number'})) )
-        {
-            $dbh->do("DELETE FROM txtmsg WHERE userid=?", undef, $u->{'userid'});
-        } elsif ($txtmsg_status eq "on") {
-            $dbh->do("REPLACE INTO txtmsg (userid, provider, number, security) VALUES (?, ?, ?, ?)",
-                     undef, $u->{'userid'}, $POST{'txtmsg_provider'}, $POST{'txtmsg_number'}, $POST{'txtmsg_security'});
-        }
-
-        # clear text message security caches
-        my $userid = $u->id;
-        delete $u->{_txtmsgsecurity};
-        my $memkey = [$userid, "txtmsgsecurity:$userid"];
-        LJ::MemCache::delete($memkey);
-
         # update interests
         unless ($POST{'interests_absent'}) {
             my $maxinterests = $u->count_max_interests;
@@ -719,7 +730,10 @@ body<=
             my @interrors = ();
 
             # Don't bother validating the interests if there are already too many
-            return LJ::bad_input( BML::ml('error.interest.excessive2', { intcount => $intcount, maxinterests => $maxinterests } ) ) if $intcount > $maxinterests;
+            return LJ::bad_input( BML::ml('error.interest.excessive2',
+                                  { intcount => $intcount,
+                                    maxinterests => $maxinterests } ) )
+                if $intcount > $maxinterests;
 
             # Clean interests, and make sure they're valid
             my @valid_ints = LJ::validate_interest_list(\@interrors, @ints);
diff -r 98841c035b6a -r ac80dea7d38e htdocs/manage/profile/index.bml.text
--- a/htdocs/manage/profile/index.bml.text	Thu Jun 10 19:48:47 2010 +0800
+++ b/htdocs/manage/profile/index.bml.text	Thu Jun 10 07:14:33 2010 -0500
@@ -1,8 +1,4 @@
 ;; -*- coding: utf-8 -*-
-.birthday=Show your birthday to other users
-
-.birthday.year.opt=year is optional
-
 .chat.aolim=AOL IM
 
 .chat.gizmo=Gizmo Project
@@ -19,25 +15,21 @@
 
 .chat.yahooid=Yahoo! ID
 
-.country.choose=Pick a country
+.comms=Display communities of which you are a member.
+
+.display.title=Display Settings for [[name]]
 
 .email=Email
 
 .email.change.system=Change email used by system
 
-.email.change.display=Change email shown on profile
-
-.email.opt.actual=Show actual email address
-
 .email.opt.both.actual=Show actual email + [[sitenameshort]] email
 
 .email.opt.both.display=Show display email + [[sitenameshort]] email
 
-.email.opt.display=Show display email address
+.email.opt.site=[[sitenameshort]] email only
 
-.email.opt.none=Don't show any email address
-
-.email.opt.site=[[sitenameshort]] email only
+.email.profile=If specified, this address will be displayed <i>instead of</i> the system email if shown.
 
 .error.bio.toolong=Your user bio is too long.
 
@@ -89,45 +81,61 @@
 
 .fn.birthday=Birthday
 
+.fn.birthday.day=Day of birth
+
+.fn.birthday.level=Amount of birthday information to share
+
+.fn.birthday.month=Month of birth
+
+.fn.birthday.year=Year of birth
+
 .fn.city=City
 
-.fn.contactinfo=Who can view your contact info?
+.fn.commdesc=Community Description
+
+.fn.commdescription2=Briefly describe the central focus of your community. This community description will be shown in interest searches.
+
+.fn.comms=Communities
 
 .fn.country=Country
 
 .fn.email.display=Profile email
 
+.fn.email.site=[[siteabbrev]] email
+
 .fn.email.system=System email
 
-.fn.emaildisplay=Display
-
-.fn.friendof="Friend of" list
-
-.fn.subscriberof=Subscriber list
+.fn.friendof3=Circled By
 
 .fn.gender=Gender
 
-.fn.imservices2=Instant Messaging
-
-.fn.imservices3=Instant Messaging and other
-
 .fn.interests=List all your interests, separated by commas, to allow other users to find you using the Interest Search.
 
-.fn.last_fm=Last.fm username 
+.fn.link2=Link URL
 
-.fn.link=Link
+.fn.ljtalk.address=[[siteabbrev]] Chat Address
 
-.fn.mutualfriends=Mutual friends
+.fn.ljtalk.status=[[siteabbrev]] Chat Status
 
-.fn.name=Name
+.fn.location=Location
+
+.fn.mutualfriends3=Mutual Lists
+
+.fn.name2=Display Name
+
+.fn.privacy=Privacy Level
 
 .fn.province=or non-US State/province/territory
 
 .fn.servprov=Service Provider
 
-.fn.sitename=Name
+.fn.showljtalk=Who can see your online chat status?
+
+.fn.sitename2=Link Name
 
 .fn.state=State
+
+.fn.subscriberof=Subscriber list
 
 .fn.timezone=Timezone
 
@@ -135,13 +143,11 @@
 
 .fn.txtnum=Full phone number
 
-.fn.userpic=Default userpic
+.fn.userpic2=Default Icon
 
 .fn.zip=ZIP Code
 
-.friendof=Show other users who have friended you, but you have not friended
-
-.subscriberof=Show subscribers of the community
+.friendof3=Show all accounts that have given you access or subscribed to you, and not just the ones you reciprocate.
 
 .gender.female=Female
 
@@ -151,81 +157,77 @@
 
 .gender.unspecified=(Unspecified)
 
-.im=IM/Chat
+.intro=This is where you fill in the information to be displayed on your Profile. You don't have to display all of this information to everyone; you can set options below. You may also want to edit your <a [[aopts1]]>privacy settings</a> or your <a [[aopts2]]>viewing options</a>.
 
-.interest.line1=Short single-word phrases are best.
+.jumpto=Jump to:
 
-.interest.line2=Rule of thumb: You should be able to put the interest in the sentence "I like ________".
-
-.interest.line3=When referring to nouns, use the plural form for consistency, e.g.: "I like DVDs" instead of "I like DVD".
-
-.interest.line4=<font color='#009000'><b>GOOD</b></font> Example: <b>biking, snow skiing, computers, dvds, mp3s, cheese</b>
-
-.interest.line5=<font color='#ff0000'><b>BAD</b></font> Example: <b>I like lots of bands and watching movies and talking to friends and going to clubs.</b>  That sort of stuff goes in your bio below.
-
-.intro1=Here's where you fill out your Profile page. You don't have to display all of your info to everyone - check out the options below. You may also want to edit your <a [[aopts1]]>comment settings</a> or your <a [[aopts2]]>viewing options</a>.
-
-.location=Show your location to
-
-.mutualfriends=Show friends who have also friended you
+.mutualfriends3=Split access list into "mutual access", "also has access to", and "also gives access to". <br />Split subscriptions into "mutual subscriptions", "other subscriptions", and "other subscribers".
 
 .name=Your name will be displayed on your Profile and in search results
 
-.optional=Optional
+.privacy.title=Privacy Settings for [[name]]
 
 .save_button=Save Changes
 
-.section.bio=Bio
+.section.bio2=Mini Bio
 
 .section.contact=Contact Info
 
-.section.description=Community Description
+.section.contact2=Contact Info and Links
 
-.section.friends=Friends
+.section.display=Display Options
 
-.section.members=Members
+.section.display.circle=Circle Display Options
+
+.section.display.members=Member Display Options
 
 .section.id=Identity
 
 .section.interests=Interests
 
-.section.location=Location
-
-.section.usermessaging=[[siteabbrev]] User Messaging
-
 .section.textmsg=Text Messaging
 
-.section.theme=Community Theme
+.security.visibility.access=Access Only
 
-.section.web=Web Page
-
-.security.visibility.everybody=Everybody
-
-.security.visibility.friends=Friends only
+.security.visibility.everybody2=Everyone
 
 .security.visibility.nobody=Nobody
 
+.security.visibility.noshow=Do not show
+
+.security.visibility.privacy=Obey privacy level
+
 .security.visibility.regusers=Registered Users
 
-.services.twitter=Twitter
+.security.visibility.same=Same as above
 
-.services.delicious=Delicious
+.select.provider=-- Select Carrier --
 
-.share.birthday=Show your Birthday to:
+.services.delicious=Delicious Username
 
-.show.birthday=Birthday display options:
+.services.last_fm=Last.fm Username
 
-.show.birthday.day=Display only the month and day
+.services.twitter=Twitter Username
 
-.show.birthday.full=Display month, day, and year
+.show.birthday.day2=Show only month and day
 
-.show.birthday.nothing=Do not display
+.show.birthday.full2=Show month, day, and year
 
-.show.birthday.year=Display only the year
+.show.birthday.nothing2=Do not show on profile
 
-.showljtalk=Do not show field?
+.show.birthday.year2=Show only year
+
+.showto=Show to:
 
 .state.us=US States
+
+.subscriberof=Show subscribers of the community
+
+.subsection.messaging=Email and Messaging
+
+.subsection.other=Other Sites
+
+.subsection.web=Website (Optional)
 
 .success.editicons=Manage your userpics
 
@@ -238,8 +240,6 @@
 .success.text=Your profile has been updated.
 
 .success.viewprofile=View your profile
-
-.theme=Briefly describe the central focus of your community. This will be shown in interest searches.
 
 .timezone.select=(Select your timezone)
 
diff -r 98841c035b6a -r ac80dea7d38e htdocs/manage/settings/index.bml
--- a/htdocs/manage/settings/index.bml	Thu Jun 10 19:48:47 2010 +0800
+++ b/htdocs/manage/settings/index.bml	Thu Jun 10 07:14:33 2010 -0500
@@ -131,7 +131,6 @@ body<=
                 LJ::Setting::CommentCaptcha
                 LJ::Setting::CommentIP
                 LJ::Setting::Display::BanUsers
-                DW::Setting::ProfileEmail
                 DW::Setting::RandomPaidGifts
                 DW::Setting::GlobalSearch
                 DW::Setting::AllowSearchBy
diff -r 98841c035b6a -r ac80dea7d38e htdocs/stc/lj_settings.css
--- a/htdocs/stc/lj_settings.css	Thu Jun 10 19:48:47 2010 +0800
+++ b/htdocs/stc/lj_settings.css	Thu Jun 10 07:14:33 2010 -0500
@@ -4,16 +4,19 @@
 
 .field_block {
     margin: 5px 0px 5px 0px;
+    border-bottom: 3px ridge #fff;
 }
 
 .field_block td {
     vertical-align: top;
     padding-top: .3em;
     padding-bottom: .3em;
+    padding-left: 5px;
 }
 
 .field_name {
     padding-right: 5px;
+    padding-left: 2px;
     white-space: nowrap;
     font-size: .9em;
     font-weight: bold;
@@ -27,6 +30,7 @@
 
 .helper {
     font-size: 0.8em;
+    padding-right: 3em;
 }
 
 .helper li {
@@ -49,9 +53,33 @@
 	background: #ccc;
 }
 
+.section_head td {
+    padding: 5px;
+}
+
+.section_subhead {
+    font-size: 1.1em;
+    font-weight: bold;
+    margin-top: 5px;
+    background: #eee;
+    border-bottom: 3px ridge #fff;
+}
+
+.section_subhead td {
+    padding: 3px 5px;
+}
+
+.selectvis label {
+    font-size: 10px;
+}
+
+.selectvis select {
+    width: 15em;
+}
+
 .view_options {
     margin-left: 20px;
-    font-size: .7em;
+    font-size: smaller;
     font-weight: bold;
 }
 
--------------------------------------------------------------------------------

Post a comment in response:

This account has disabled anonymous posting.
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting

If you are unable to use this captcha for any reason, please contact us by email at support@dreamwidth.org