diff options
-rw-r--r-- | languages/en.php | 13 | ||||
-rw-r--r-- | mod/profile/views/default/profile/css.php | 7 | ||||
-rw-r--r-- | mod/profile/views/default/profile/details.php | 44 |
3 files changed, 40 insertions, 24 deletions
diff --git a/languages/en.php b/languages/en.php index 85c3861d7..b6232bc58 100644 --- a/languages/en.php +++ b/languages/en.php @@ -380,6 +380,19 @@ $english = array( 'avatar:crop:fail' => 'Avatar cropping failed', 'profile:edit' => 'Edit profile', + 'profile:aboutme' => "About me", + 'profile:description' => "About me", + 'profile:briefdescription' => "Brief description", + 'profile:location' => "Location", + 'profile:skills' => "Skills", + 'profile:interests' => "Interests", + 'profile:contactemail' => "Contact email", + 'profile:phone' => "Telephone", + 'profile:mobile' => "Mobile phone", + 'profile:website' => "Website", + 'profile:twitter' => "Twitter username", + 'profile:saved' => "Your profile was successfully saved.", + /** diff --git a/mod/profile/views/default/profile/css.php b/mod/profile/views/default/profile/css.php index f280db565..b2a3ff935 100644 --- a/mod/profile/views/default/profile/css.php +++ b/mod/profile/views/default/profile/css.php @@ -87,18 +87,17 @@ margin:0 0 7px 0; padding:2px 4px 2px 4px; } -#profile-details .aboutme_title { +.profile-aboutme-title { background-color:#f4f4f4; -webkit-border-radius: 4px; -moz-border-radius: 4px; margin:0 0 0px 0; padding:2px 4px 2px 4px; } -#profile-details .aboutme_contents { +.profile-aboutme-contents { padding:2px 0 0 3px; } -/* banned user full profile panel */ -#profile_content .banned_user { +.profile-banned-user { border:2px solid red; padding:4px 8px; -webkit-border-radius: 6px; diff --git a/mod/profile/views/default/profile/details.php b/mod/profile/views/default/profile/details.php index b81db30fd..0afceec0b 100644 --- a/mod/profile/views/default/profile/details.php +++ b/mod/profile/views/default/profile/details.php @@ -6,41 +6,45 @@ $user = elgg_get_page_owner(); +$profile_fields = elgg_get_config('profile'); + echo '<div id="profile-details" class="elgg-body pll">'; echo "<h2>{$user->name}</h2>"; $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 = $user->$shortname; - if (!empty($value)) { - //This function controls the alternating class - $even_odd = ( 'odd' != $even_odd ) ? 'odd' : 'even'; - ?> - <p class="<?php echo $even_odd; ?>"> - <b><?php - echo elgg_echo("profile:{$shortname}"); - ?>: </b> +if (is_array($profile_fields) && sizeof($profile_fields) > 0) { + foreach ($profile_fields as $shortname => $valtype) { + if ($shortname == "description") { + // skip about me and put at bottom + continue; + } + $value = $user->$shortname; + if (!empty($value)) { + //This function controls the alternating class + $even_odd = ( 'odd' != $even_odd ) ? 'odd' : 'even'; + ?> + <p class="<?php echo $even_odd; ?>"> + <b><?php echo elgg_echo("profile:{$shortname}"); ?>: </b> <?php echo elgg_view("output/{$valtype}", array('value' => $user->$shortname)); ?> - </p> - <?php - } + </p> + <?php } } } if (!get_plugin_setting('user_defined_fields', 'profile')) { if ($user->isBanned()) { - echo "<div class='banned_user'>"; + echo "<p class='profile-banned-user'>"; echo elgg_echo('banned'); - echo "</div>"; + echo "</p>"; } else { - if ($vars['entity']->description) { - echo "<p class='aboutme_title'><b>" . elgg_echo("profile:aboutme") . "</b></p>"; - echo "<div class='aboutme_contents'>" . elgg_view('output/longtext', array('value' => $vars['entity']->description)) . "</div>"; + if ($user->description) { + echo "<p class='profile-aboutme-title'><b>" . elgg_echo("profile:aboutme") . "</b></p>"; + echo "<div class='profile-aboutme-contents'>"; + echo elgg_view('output/longtext', array('value' => $user->description)); + echo "</div>"; } } } |