Moved User CP profile settings to front page of CP, and changed associated language
authorDan
Wed, 29 Jul 2009 11:49:57 -0400
changeset 1064 5a34101dfcf9
parent 1063 46e08815594e
child 1069 d54e7620bd3e
Moved User CP profile settings to front page of CP, and changed associated language
language/english/user.json
plugins/SpecialUserPrefs.php
--- a/language/english/user.json	Wed Jul 29 11:49:30 2009 -0400
+++ b/language/english/user.json	Wed Jul 29 11:49:57 2009 -0400
@@ -271,10 +271,7 @@
       
       // CP home
       intro_heading_main: '%username%, welcome to your control panel',
-      intro_para1: 'Here you can make changes to your profile, view statistics on yourself on this site, and set your preferences.',
-      intro_para2: 'Your <a href="%userpage_link%">user page</a> <sup>(<a href="%userpage_link%#do:comments">comments</a>)</sup> is your free writing space. You can use it to tell the other members of this site a little bit about yourself. If you haven\'t already made a user page, why not <a href="%userpage_link%#do:edit">make one now</a>?',
-      intro_para3: 'Use the menu at the top to navigate around. If you have any questions, you may contact the %admin_contact_link%.',
-      intro_para3_admin_link: 'administrator',
+      intro: '<p>Your User Control Panel lets you change settings on the site.</p><p>If you haven\'t created a <a href="%userpage_link%">user page</a> yet, consider doing so - it\'s your free writing space. It\'s also where information you put on this page can be viewed by others. People can also leave <a href="%userpage_link%#do:comments">comments</a> on your user page.</p>',
       
       // E-mail / password change form
       emailpassword_title: 'Change E-mail Address or Password',
--- a/plugins/SpecialUserPrefs.php	Wed Jul 29 11:49:30 2009 -0400
+++ b/plugins/SpecialUserPrefs.php	Wed Jul 29 11:49:57 2009 -0400
@@ -116,7 +116,7 @@
   
   userprefs_menu_add('usercp_sec_profile', 'usercp_sec_profile_emailpassword', makeUrlNS('Special', 'Preferences/EmailPassword') . '" onclick="ajaxLoginNavTo(\'Special\', \'Preferences/EmailPassword\', '.USER_LEVEL_CHPREF.'); return false;');
   userprefs_menu_add('usercp_sec_profile', 'usercp_sec_profile_signature', makeUrlNS('Special', 'Preferences/Signature'));
-  userprefs_menu_add('usercp_sec_profile', 'usercp_sec_profile_publicinfo', makeUrlNS('Special', 'Preferences/Profile'));
+  // userprefs_menu_add('usercp_sec_profile', 'usercp_sec_profile_publicinfo', makeUrlNS('Special', 'Preferences/Profile'));
   userprefs_menu_add('usercp_sec_profile', 'usercp_sec_profile_usergroups', makeUrlNS('Special', 'Usergroups'));
   if ( getConfig('avatar_enable') == '1' )
   {
@@ -299,19 +299,6 @@
   
   switch ( $section )
   {
-    case 'Home':
-      global $email;
-      $userpage_id = $paths->nslist['User'] . sanitize_page_id($session->username);
-      $userpage_exists = ( isPage($userpage_id) ) ? '' : ' class="wikilink-nonexistent"';
-      $user_page = makeUrlNS('User', sanitize_page_id($session->username));
-      $site_admin = $email->encryptEmail(getConfig('contact_email'), '', '', $lang->get('usercp_intro_para3_admin_link'));
-      
-      echo '<h3 style="margin-top: 0;">' . $lang->get('usercp_intro_heading_main', array('username' => $session->username)) . '</h3>';
-      
-      echo '<p>' . $lang->get('usercp_intro_para1') . '</p>
-            <p>' . $lang->get('usercp_intro_para2', array('userpage_link' => $user_page)) . '</p>
-            <p>' . $lang->get('usercp_intro_para3', array('admin_contact_link' => $site_admin)) . '</p>';
-      break;
     case 'EmailPassword':
       
       $errors = trim($errors);
@@ -380,6 +367,18 @@
       echo '</form>';
       break;
     case "Profile":
+    case 'Home':
+      
+      global $email;
+      $userpage_id = $paths->nslist['User'] . sanitize_page_id($session->username);
+      $userpage_exists = ( isPage($userpage_id) ) ? '' : ' class="wikilink-nonexistent"';
+      $user_page = makeUrlNS('User', sanitize_page_id($session->username));
+      $site_admin = $email->encryptEmail(getConfig('contact_email'), '', '', $lang->get('usercp_intro_para3_admin_link'));
+      
+      echo '<h3 style="margin-top: 0;">' . $lang->get('usercp_intro_heading_main', array('username' => $session->username)) . '</h3>';
+      
+      echo  $lang->get('usercp_intro', array('userpage_link' => $user_page));
+      
       $available_ranks = $session->get_user_possible_ranks($session->user_id);
       $current_rank = $session->get_user_rank($session->user_id);