|
@@ -92,42 +92,46 @@ function ModifyProfile($post_errors = array())
|
|
'label' => $txt['summary'],
|
|
'label' => $txt['summary'],
|
|
'file' => 'Profile-View.php',
|
|
'file' => 'Profile-View.php',
|
|
'function' => 'summary',
|
|
'function' => 'summary',
|
|
|
|
+ 'icon' => 'administration.png',
|
|
'permission' => array(
|
|
'permission' => array(
|
|
- 'own' => 'profile_view_own',
|
|
|
|
- 'any' => 'profile_view_any',
|
|
|
|
|
|
+ 'own' => 'is_not_guest',
|
|
|
|
+ 'any' => 'profile_view',
|
|
),
|
|
),
|
|
),
|
|
),
|
|
'statistics' => array(
|
|
'statistics' => array(
|
|
'label' => $txt['statPanel'],
|
|
'label' => $txt['statPanel'],
|
|
'file' => 'Profile-View.php',
|
|
'file' => 'Profile-View.php',
|
|
'function' => 'statPanel',
|
|
'function' => 'statPanel',
|
|
|
|
+ 'icon' => 'stats.png',
|
|
'permission' => array(
|
|
'permission' => array(
|
|
- 'own' => 'profile_view_own',
|
|
|
|
- 'any' => 'profile_view_any',
|
|
|
|
|
|
+ 'own' => 'is_not_guest',
|
|
|
|
+ 'any' => 'profile_view',
|
|
),
|
|
),
|
|
),
|
|
),
|
|
'showposts' => array(
|
|
'showposts' => array(
|
|
'label' => $txt['showPosts'],
|
|
'label' => $txt['showPosts'],
|
|
'file' => 'Profile-View.php',
|
|
'file' => 'Profile-View.php',
|
|
'function' => 'showPosts',
|
|
'function' => 'showPosts',
|
|
|
|
+ 'icon' => 'posts.png',
|
|
'subsections' => array(
|
|
'subsections' => array(
|
|
- 'messages' => array($txt['showMessages'], array('profile_view_own', 'profile_view_any')),
|
|
|
|
- 'topics' => array($txt['showTopics'], array('profile_view_own', 'profile_view_any')),
|
|
|
|
- 'unwatchedtopics' => array($txt['showUnwatched'], array('profile_view_own', 'profile_view_any'), 'enabled' => $modSettings['enable_unwatch'] && $context['user']['is_owner']),
|
|
|
|
- 'attach' => array($txt['showAttachments'], array('profile_view_own', 'profile_view_any')),
|
|
|
|
|
|
+ 'messages' => array($txt['showMessages'], array('is_not_guest', 'profile_view')),
|
|
|
|
+ 'topics' => array($txt['showTopics'], array('is_not_guest', 'profile_view')),
|
|
|
|
+ 'unwatchedtopics' => array($txt['showUnwatched'], array('is_not_guest', 'profile_view'), 'enabled' => $modSettings['enable_unwatch'] && $context['user']['is_owner']),
|
|
|
|
+ 'attach' => array($txt['showAttachments'], array('is_not_guest', 'profile_view')),
|
|
),
|
|
),
|
|
'permission' => array(
|
|
'permission' => array(
|
|
- 'own' => 'profile_view_own',
|
|
|
|
- 'any' => 'profile_view_any',
|
|
|
|
|
|
+ 'own' => 'is_not_guest',
|
|
|
|
+ 'any' => 'profile_view',
|
|
),
|
|
),
|
|
),
|
|
),
|
|
'showdrafts' => array(
|
|
'showdrafts' => array(
|
|
'label' => $txt['drafts_show'],
|
|
'label' => $txt['drafts_show'],
|
|
'file' => 'Drafts.php',
|
|
'file' => 'Drafts.php',
|
|
'function' => 'showProfileDrafts',
|
|
'function' => 'showProfileDrafts',
|
|
|
|
+ 'icon' => 'drafts.png',
|
|
'enabled' => !empty($modSettings['drafts_post_enabled']) && $context['user']['is_owner'],
|
|
'enabled' => !empty($modSettings['drafts_post_enabled']) && $context['user']['is_owner'],
|
|
'permission' => array(
|
|
'permission' => array(
|
|
- 'own' => 'profile_view_own',
|
|
|
|
|
|
+ 'own' => 'is_not_guest',
|
|
'any' => array(),
|
|
'any' => array(),
|
|
),
|
|
),
|
|
),
|
|
),
|
|
@@ -135,6 +139,7 @@ function ModifyProfile($post_errors = array())
|
|
'label' => $txt['showPermissions'],
|
|
'label' => $txt['showPermissions'],
|
|
'file' => 'Profile-View.php',
|
|
'file' => 'Profile-View.php',
|
|
'function' => 'showPermissions',
|
|
'function' => 'showPermissions',
|
|
|
|
+ 'icon' => 'permissions.png',
|
|
'permission' => array(
|
|
'permission' => array(
|
|
'own' => 'manage_permissions',
|
|
'own' => 'manage_permissions',
|
|
'any' => 'manage_permissions',
|
|
'any' => 'manage_permissions',
|
|
@@ -144,11 +149,12 @@ function ModifyProfile($post_errors = array())
|
|
'label' => $txt['trackUser'],
|
|
'label' => $txt['trackUser'],
|
|
'file' => 'Profile-View.php',
|
|
'file' => 'Profile-View.php',
|
|
'function' => 'tracking',
|
|
'function' => 'tracking',
|
|
|
|
+ 'icon' => 'logs.png',
|
|
'subsections' => array(
|
|
'subsections' => array(
|
|
'activity' => array($txt['trackActivity'], 'moderate_forum'),
|
|
'activity' => array($txt['trackActivity'], 'moderate_forum'),
|
|
'ip' => array($txt['trackIP'], 'moderate_forum'),
|
|
'ip' => array($txt['trackIP'], 'moderate_forum'),
|
|
'edits' => array($txt['trackEdits'], 'moderate_forum', 'enabled' => !empty($modSettings['userlog_enabled'])),
|
|
'edits' => array($txt['trackEdits'], 'moderate_forum', 'enabled' => !empty($modSettings['userlog_enabled'])),
|
|
- 'logins' => array($txt['trackLogins'], array('profile_view_own', 'moderate_forum')),
|
|
|
|
|
|
+ 'logins' => array($txt['trackLogins'], array('is_not_guest', 'moderate_forum')),
|
|
),
|
|
),
|
|
'permission' => array(
|
|
'permission' => array(
|
|
'own' => 'moderate_forum',
|
|
'own' => 'moderate_forum',
|
|
@@ -160,8 +166,9 @@ function ModifyProfile($post_errors = array())
|
|
'enabled' => $modSettings['warning_settings'][0] == 1 && $cur_profile['warning'] && (!empty($modSettings['warning_show']) && ($context['user']['is_owner'] || $modSettings['warning_show'] == 2)),
|
|
'enabled' => $modSettings['warning_settings'][0] == 1 && $cur_profile['warning'] && (!empty($modSettings['warning_show']) && ($context['user']['is_owner'] || $modSettings['warning_show'] == 2)),
|
|
'file' => 'Profile-View.php',
|
|
'file' => 'Profile-View.php',
|
|
'function' => 'viewWarning',
|
|
'function' => 'viewWarning',
|
|
|
|
+ 'icon' => 'warning.png',
|
|
'permission' => array(
|
|
'permission' => array(
|
|
- 'own' => 'profile_view_own',
|
|
|
|
|
|
+ 'own' => 'is_not_guest', // @todo this needs to be a view-own warning
|
|
'any' => 'issue_warning',
|
|
'any' => 'issue_warning',
|
|
),
|
|
),
|
|
),
|
|
),
|
|
@@ -174,6 +181,7 @@ function ModifyProfile($post_errors = array())
|
|
'label' => $txt['account'],
|
|
'label' => $txt['account'],
|
|
'file' => 'Profile-Modify.php',
|
|
'file' => 'Profile-Modify.php',
|
|
'function' => 'account',
|
|
'function' => 'account',
|
|
|
|
+ 'icon' => 'maintain.png',
|
|
'enabled' => $context['user']['is_admin'] || ($cur_profile['id_group'] != 1 && !in_array(1, explode(',', $cur_profile['additional_groups']))),
|
|
'enabled' => $context['user']['is_admin'] || ($cur_profile['id_group'] != 1 && !in_array(1, explode(',', $cur_profile['additional_groups']))),
|
|
'sc' => 'post',
|
|
'sc' => 'post',
|
|
'token' => 'profile-ac%u',
|
|
'token' => 'profile-ac%u',
|
|
@@ -187,6 +195,7 @@ function ModifyProfile($post_errors = array())
|
|
'label' => $txt['forumprofile'],
|
|
'label' => $txt['forumprofile'],
|
|
'file' => 'Profile-Modify.php',
|
|
'file' => 'Profile-Modify.php',
|
|
'function' => 'forumProfile',
|
|
'function' => 'forumProfile',
|
|
|
|
+ 'icon' => 'members.png',
|
|
'sc' => 'post',
|
|
'sc' => 'post',
|
|
'token' => 'profile-fp%u',
|
|
'token' => 'profile-fp%u',
|
|
'permission' => array(
|
|
'permission' => array(
|
|
@@ -198,6 +207,7 @@ function ModifyProfile($post_errors = array())
|
|
'label' => $txt['theme'],
|
|
'label' => $txt['theme'],
|
|
'file' => 'Profile-Modify.php',
|
|
'file' => 'Profile-Modify.php',
|
|
'function' => 'theme',
|
|
'function' => 'theme',
|
|
|
|
+ 'icon' => 'features.png',
|
|
'sc' => 'post',
|
|
'sc' => 'post',
|
|
'token' => 'profile-th%u',
|
|
'token' => 'profile-th%u',
|
|
'permission' => array(
|
|
'permission' => array(
|
|
@@ -209,6 +219,7 @@ function ModifyProfile($post_errors = array())
|
|
'label' => $txt['authentication'],
|
|
'label' => $txt['authentication'],
|
|
'file' => 'Profile-Modify.php',
|
|
'file' => 'Profile-Modify.php',
|
|
'function' => 'authentication',
|
|
'function' => 'authentication',
|
|
|
|
+ 'icon' => 'openid.png',
|
|
'enabled' => !empty($modSettings['enableOpenID']) || !empty($cur_profile['openid_uri']),
|
|
'enabled' => !empty($modSettings['enableOpenID']) || !empty($cur_profile['openid_uri']),
|
|
'sc' => 'post',
|
|
'sc' => 'post',
|
|
'token' => 'profile-au%u',
|
|
'token' => 'profile-au%u',
|
|
@@ -223,6 +234,7 @@ function ModifyProfile($post_errors = array())
|
|
'label' => $txt['notification'],
|
|
'label' => $txt['notification'],
|
|
'file' => 'Profile-Modify.php',
|
|
'file' => 'Profile-Modify.php',
|
|
'function' => 'notification',
|
|
'function' => 'notification',
|
|
|
|
+ 'icon' => 'mail.png',
|
|
'sc' => 'post',
|
|
'sc' => 'post',
|
|
'token' => 'profile-nt%u',
|
|
'token' => 'profile-nt%u',
|
|
'permission' => array(
|
|
'permission' => array(
|
|
@@ -230,23 +242,11 @@ function ModifyProfile($post_errors = array())
|
|
'any' => array('profile_extra_any'),
|
|
'any' => array('profile_extra_any'),
|
|
),
|
|
),
|
|
),
|
|
),
|
|
- // Without profile_extra_own, settings are accessible from the PM section.
|
|
|
|
- 'pmprefs' => array(
|
|
|
|
- 'label' => $txt['pmprefs'],
|
|
|
|
- 'file' => 'Profile-Modify.php',
|
|
|
|
- 'function' => 'pmprefs',
|
|
|
|
- 'enabled' => allowedTo(array('profile_extra_own', 'profile_extra_any')),
|
|
|
|
- 'sc' => 'post',
|
|
|
|
- 'token' => 'profile-pm%u',
|
|
|
|
- 'permission' => array(
|
|
|
|
- 'own' => array('pm_read'),
|
|
|
|
- 'any' => array('profile_extra_any'),
|
|
|
|
- ),
|
|
|
|
- ),
|
|
|
|
'ignoreboards' => array(
|
|
'ignoreboards' => array(
|
|
'label' => $txt['ignoreboards'],
|
|
'label' => $txt['ignoreboards'],
|
|
'file' => 'Profile-Modify.php',
|
|
'file' => 'Profile-Modify.php',
|
|
'function' => 'ignoreboards',
|
|
'function' => 'ignoreboards',
|
|
|
|
+ 'icon' => 'boards.png',
|
|
'enabled' => !empty($modSettings['allow_ignore_boards']),
|
|
'enabled' => !empty($modSettings['allow_ignore_boards']),
|
|
'sc' => 'post',
|
|
'sc' => 'post',
|
|
'token' => 'profile-ib%u',
|
|
'token' => 'profile-ib%u',
|
|
@@ -259,6 +259,7 @@ function ModifyProfile($post_errors = array())
|
|
'label' => $txt['editBuddyIgnoreLists'],
|
|
'label' => $txt['editBuddyIgnoreLists'],
|
|
'file' => 'Profile-Modify.php',
|
|
'file' => 'Profile-Modify.php',
|
|
'function' => 'editBuddyIgnoreLists',
|
|
'function' => 'editBuddyIgnoreLists',
|
|
|
|
+ 'icon' => 'frenemy.png',
|
|
'enabled' => !empty($modSettings['enable_buddylist']) && $context['user']['is_owner'],
|
|
'enabled' => !empty($modSettings['enable_buddylist']) && $context['user']['is_owner'],
|
|
'sc' => 'post',
|
|
'sc' => 'post',
|
|
'token' => 'profile-bl%u',
|
|
'token' => 'profile-bl%u',
|
|
@@ -275,12 +276,13 @@ function ModifyProfile($post_errors = array())
|
|
'label' => $txt['groupmembership'],
|
|
'label' => $txt['groupmembership'],
|
|
'file' => 'Profile-Modify.php',
|
|
'file' => 'Profile-Modify.php',
|
|
'function' => 'groupMembership',
|
|
'function' => 'groupMembership',
|
|
|
|
+ 'icon' => 'membergroups.png',
|
|
'enabled' => !empty($modSettings['show_group_membership']) && $context['user']['is_owner'],
|
|
'enabled' => !empty($modSettings['show_group_membership']) && $context['user']['is_owner'],
|
|
'sc' => 'request',
|
|
'sc' => 'request',
|
|
'token' => 'profile-gm%u',
|
|
'token' => 'profile-gm%u',
|
|
'token_type' => 'request',
|
|
'token_type' => 'request',
|
|
'permission' => array(
|
|
'permission' => array(
|
|
- 'own' => array('profile_view_own'),
|
|
|
|
|
|
+ 'own' => array('is_not_guest'),
|
|
'any' => array('manage_membergroups'),
|
|
'any' => array('manage_membergroups'),
|
|
),
|
|
),
|
|
),
|
|
),
|
|
@@ -292,6 +294,7 @@ function ModifyProfile($post_errors = array())
|
|
'sendpm' => array(
|
|
'sendpm' => array(
|
|
'label' => $txt['profileSendIm'],
|
|
'label' => $txt['profileSendIm'],
|
|
'custom_url' => $scripturl . '?action=pm;sa=send',
|
|
'custom_url' => $scripturl . '?action=pm;sa=send',
|
|
|
|
+ 'icon' => 'personal_message.png',
|
|
'permission' => array(
|
|
'permission' => array(
|
|
'own' => array(),
|
|
'own' => array(),
|
|
'any' => array('pm_send'),
|
|
'any' => array('pm_send'),
|
|
@@ -302,6 +305,7 @@ function ModifyProfile($post_errors = array())
|
|
'enabled' => $modSettings['warning_settings'][0] == 1,
|
|
'enabled' => $modSettings['warning_settings'][0] == 1,
|
|
'file' => 'Profile-Actions.php',
|
|
'file' => 'Profile-Actions.php',
|
|
'function' => 'issueWarning',
|
|
'function' => 'issueWarning',
|
|
|
|
+ 'icon' => 'warning.png',
|
|
'token' => 'profile-iw%u',
|
|
'token' => 'profile-iw%u',
|
|
'permission' => array(
|
|
'permission' => array(
|
|
'own' => array(),
|
|
'own' => array(),
|
|
@@ -311,6 +315,7 @@ function ModifyProfile($post_errors = array())
|
|
'banuser' => array(
|
|
'banuser' => array(
|
|
'label' => $txt['profileBanUser'],
|
|
'label' => $txt['profileBanUser'],
|
|
'custom_url' => $scripturl . '?action=admin;area=ban;sa=add',
|
|
'custom_url' => $scripturl . '?action=admin;area=ban;sa=add',
|
|
|
|
+ 'icon' => 'ban.png',
|
|
'enabled' => $cur_profile['id_group'] != 1 && !in_array(1, explode(',', $cur_profile['additional_groups'])),
|
|
'enabled' => $cur_profile['id_group'] != 1 && !in_array(1, explode(',', $cur_profile['additional_groups'])),
|
|
'permission' => array(
|
|
'permission' => array(
|
|
'own' => array(),
|
|
'own' => array(),
|
|
@@ -321,9 +326,10 @@ function ModifyProfile($post_errors = array())
|
|
'label' => $txt['subscriptions'],
|
|
'label' => $txt['subscriptions'],
|
|
'file' => 'Profile-Actions.php',
|
|
'file' => 'Profile-Actions.php',
|
|
'function' => 'subscriptions',
|
|
'function' => 'subscriptions',
|
|
|
|
+ 'icon' => 'paid.png',
|
|
'enabled' => !empty($modSettings['paid_enabled']),
|
|
'enabled' => !empty($modSettings['paid_enabled']),
|
|
'permission' => array(
|
|
'permission' => array(
|
|
- 'own' => array('profile_view_own'),
|
|
|
|
|
|
+ 'own' => array('is_not_guest'),
|
|
'any' => array('moderate_forum'),
|
|
'any' => array('moderate_forum'),
|
|
),
|
|
),
|
|
),
|
|
),
|
|
@@ -331,6 +337,7 @@ function ModifyProfile($post_errors = array())
|
|
'label' => $txt['deleteAccount'],
|
|
'label' => $txt['deleteAccount'],
|
|
'file' => 'Profile-Actions.php',
|
|
'file' => 'Profile-Actions.php',
|
|
'function' => 'deleteAccount',
|
|
'function' => 'deleteAccount',
|
|
|
|
+ 'icon' => 'members_delete.png',
|
|
'sc' => 'post',
|
|
'sc' => 'post',
|
|
'token' => 'profile-da%u',
|
|
'token' => 'profile-da%u',
|
|
'password' => true,
|
|
'password' => true,
|
|
@@ -342,6 +349,7 @@ function ModifyProfile($post_errors = array())
|
|
'activateaccount' => array(
|
|
'activateaccount' => array(
|
|
'file' => 'Profile-Actions.php',
|
|
'file' => 'Profile-Actions.php',
|
|
'function' => 'activateAccount',
|
|
'function' => 'activateAccount',
|
|
|
|
+ 'icon' => 'regcenter.png',
|
|
'sc' => 'get',
|
|
'sc' => 'get',
|
|
'token' => 'profile-aa%u',
|
|
'token' => 'profile-aa%u',
|
|
'permission' => array(
|
|
'permission' => array(
|
|
@@ -590,7 +598,7 @@ function ModifyProfile($post_errors = array())
|
|
{
|
|
{
|
|
authentication($memID, true);
|
|
authentication($memID, true);
|
|
}
|
|
}
|
|
- elseif (in_array($current_area, array('account', 'forumprofile', 'theme', 'pmprefs')))
|
|
|
|
|
|
+ elseif (in_array($current_area, array('account', 'forumprofile', 'theme')))
|
|
saveProfileFields();
|
|
saveProfileFields();
|
|
else
|
|
else
|
|
{
|
|
{
|