]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
moved profile fields language strings into core and update profile plugin details...
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>
Mon, 27 Dec 2010 21:00:53 +0000 (21:00 +0000)
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>
Mon, 27 Dec 2010 21:00:53 +0000 (21:00 +0000)
git-svn-id: http://code.elgg.org/elgg/trunk@7729 36083f99-b078-4883-b0ff-0f9b5a30f544

languages/en.php
mod/profile/views/default/profile/css.php
mod/profile/views/default/profile/details.php

index 85c3861d709a0f1f15414924918c6289e9b45b7f..b6232bc582e3bc0750c9de56949a5849ed478dd4 100644 (file)
@@ -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.",
+
        
 
 /**
index f280db565c21527c48096cb34a3fecbde1c823ba..b2a3ff935a50ad9b67f09ed5c991855fcfe648f9 100644 (file)
        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; 
index b81db30fd4184fc20dbb1a41a05f7ecc2dc84935..0afceec0b93d3c856bfc52eef602c8f74429d54b 100644 (file)
@@ -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>";
                }
        }
 }