plugins/SpecialUserPrefs.php
changeset 334 c72b545f1304
parent 329 0437a7cf1acc
child 343 eefe9ab7fe7c
equal deleted inserted replaced
333:32429702305e 334:c72b545f1304
   101   global $userprefs_menu_links;
   101   global $userprefs_menu_links;
   102   
   102   
   103   userprefs_menu_add('Profile/membership', 'Edit e-mail address and password', makeUrlNS('Special', 'Preferences/EmailPassword') . '" onclick="ajaxLoginNavTo(\'Special\', \'Preferences/EmailPassword\', '.USER_LEVEL_CHPREF.'); return false;');
   103   userprefs_menu_add('Profile/membership', 'Edit e-mail address and password', makeUrlNS('Special', 'Preferences/EmailPassword') . '" onclick="ajaxLoginNavTo(\'Special\', \'Preferences/EmailPassword\', '.USER_LEVEL_CHPREF.'); return false;');
   104   userprefs_menu_add('Profile/membership', 'Edit signature', makeUrlNS('Special', 'Preferences/Signature'));
   104   userprefs_menu_add('Profile/membership', 'Edit signature', makeUrlNS('Special', 'Preferences/Signature'));
   105   userprefs_menu_add('Profile/membership', 'Edit public profile', makeUrlNS('Special', 'Preferences/Profile'));
   105   userprefs_menu_add('Profile/membership', 'Edit public profile', makeUrlNS('Special', 'Preferences/Profile'));
       
   106   userprefs_menu_add('Profile/membership', 'Group memberships', makeUrlNS('Special', 'Usergroups'));
   106   if ( getConfig('avatar_enable') == '1' )
   107   if ( getConfig('avatar_enable') == '1' )
   107   {
   108   {
   108     userprefs_menu_add('Profile/membership', 'Avatar settings', makeUrlNS('Special', 'Preferences/Avatar'));
   109     userprefs_menu_add('Profile/membership', 'Avatar settings', makeUrlNS('Special', 'Preferences/Avatar'));
   109   }
   110   }
   110   userprefs_menu_add('Private messages', 'Inbox', makeUrlNS('Special', 'PrivateMessages/Folder/Inbox'));
   111   userprefs_menu_add('Private messages', 'Inbox', makeUrlNS('Special', 'PrivateMessages/Folder/Inbox'));
   111   userprefs_menu_add('Private messages', 'Outbox', makeUrlNS('Special', 'PrivateMessages/Folder/Outbox'));
   112   userprefs_menu_add('Private messages', 'Outbox', makeUrlNS('Special', 'PrivateMessages/Folder/Outbox'));
   112   userprefs_menu_add('Private messages', 'Sent items', makeUrlNS('Special', 'PrivateMessages/Folder/Sent'));
   113   userprefs_menu_add('Private messages', 'Sent items', makeUrlNS('Special', 'PrivateMessages/Folder/Sent'));
   113   userprefs_menu_add('Private messages', 'Drafts', makeUrlNS('Special', 'PrivateMessages/Folder/Drafts'));
   114   userprefs_menu_add('Private messages', 'Drafts', makeUrlNS('Special', 'PrivateMessages/Folder/Drafts'));
   114   userprefs_menu_add('Private messages', 'Archive', makeUrlNS('Special', 'PrivateMessages/Folder/Archive'));
   115   userprefs_menu_add('Private messages', 'Archive', makeUrlNS('Special', 'PrivateMessages/Folder/Archive'));
       
   116   /*
       
   117   userprefs_menu_add('Private messages', 'Inbox', makeUrlNS('Special',      'Private_Messages#folder:inbox'));
       
   118   userprefs_menu_add('Private messages', 'Starred', makeUrlNS('Special',     'Private_Messages#folder:starred'));
       
   119   userprefs_menu_add('Private messages', 'Sent items', makeUrlNS('Special', 'Private_Messages#folder:sent'));
       
   120   userprefs_menu_add('Private messages', 'Drafts', makeUrlNS('Special',     'Private_Messages#folder:drafts'));
       
   121   userprefs_menu_add('Private messages', 'Archive', makeUrlNS('Special',    'Private_Messages#folder:archive'));
       
   122   userprefs_menu_add('Private messages', 'Trash', makeUrlNS('Special',    'Private_Messages#folder:trash'));
       
   123   */
   115   
   124   
   116   $userprefs_menu_links['Profile/membership'] = makeUrlNS('Special', 'Preferences');
   125   $userprefs_menu_links['Profile/membership'] = makeUrlNS('Special', 'Preferences');
   117   $userprefs_menu_links['Private messages']  = makeUrlNS('Special', 'PrivateMessages');
   126   $userprefs_menu_links['Private messages']  = makeUrlNS('Special', 'PrivateMessages');
   118   
   127   
   119   $code = $plugins->setHook('userprefs_jbox');
   128   $code = $plugins->setHook('userprefs_jbox');
   121   {
   130   {
   122     eval($cmd);
   131     eval($cmd);
   123   }
   132   }
   124 }
   133 }
   125 
   134 
   126 $plugins->attachHook('session_started', 'userprefs_menu_init();');
   135 $plugins->attachHook('common_post', 'userprefs_menu_init();');
   127 
   136 
   128 function page_Special_Preferences()
   137 function page_Special_Preferences()
   129 {
   138 {
   130   global $db, $session, $paths, $template, $plugins; // Common objects
   139   global $db, $session, $paths, $template, $plugins; // Common objects
   131   global $lang;
   140   global $lang;