|
@@ -496,6 +496,12 @@ function ModifyBasicSettings($return_config = false)
|
|
|
{
|
|
|
global $txt, $scripturl, $context, $settings, $sc, $modSettings;
|
|
|
|
|
|
+ // We need to know if personal text is enabled, and if it's in the registration fields option.
|
|
|
+ // If admins have set it up as an on-registration thing, they can't set a default value (because it'll never be used)
|
|
|
+ $disabled_fields = isset($modSettings['disabled_profile_fields']) ? explode(',', $modSettings['disabled_profile_fields']) : array();
|
|
|
+ $reg_fields = isset($modSettings['registration_fields']) ? explode(',', $modSettings['registration_fields']) : array();
|
|
|
+ $can_personal_text = !in_array('personal_text', $disabled_fields) && !in_array('personal_text', $reg_fields);
|
|
|
+
|
|
|
$config_vars = array(
|
|
|
// Big Options... polls, sticky, bbc....
|
|
|
array('select', 'pollMode', array($txt['disable_polls'], $txt['enable_polls'], $txt['polls_as_topics'])),
|
|
@@ -507,7 +513,7 @@ function ModifyBasicSettings($return_config = false)
|
|
|
array('check', 'allow_editDisplayName'),
|
|
|
array('check', 'allow_hideOnline'),
|
|
|
array('check', 'titlesEnable'),
|
|
|
- array('text', 'default_personal_text', 'subtext' => $txt['default_personal_text_note']),
|
|
|
+ array('text', 'default_personal_text', 'subtext' => $txt['default_personal_text_note'], 'disabled' => !$can_personal_text),
|
|
|
'',
|
|
|
// Jquery source
|
|
|
array('select', 'jquery_source', array('auto' => $txt['jquery_auto'], 'local' => $txt['jquery_local'], 'cdn' => $txt['jquery_cdn'], 'custom' => $txt['jquery_custom']), 'onchange' => 'if (this.value == \'custom\'){document.getElementById(\'jquery_custom\').disabled = false; } else {document.getElementById(\'jquery_custom\').disabled = true;}'),
|
|
@@ -1385,7 +1391,7 @@ function ShowCustomProfiles()
|
|
|
$context['sub_template'] = 'show_custom_profile';
|
|
|
|
|
|
// What about standard fields they can tweak?
|
|
|
- $standard_fields = array('icq', 'aim', 'yim', 'skype', 'location', 'gender', 'website', 'posts', 'warning_status');
|
|
|
+ $standard_fields = array('icq', 'aim', 'yim', 'skype', 'location', 'gender', 'website', 'personal_text', 'posts', 'warning_status');
|
|
|
// What fields can't you put on the registration page?
|
|
|
$context['fields_no_registration'] = array('posts', 'warning_status');
|
|
|
|
|
@@ -1618,7 +1624,7 @@ function list_getProfileFields($start, $items_per_page, $sort, $standardFields)
|
|
|
|
|
|
if ($standardFields)
|
|
|
{
|
|
|
- $standard_fields = array('icq', 'aim', 'yim', 'skype', 'location', 'gender', 'website', 'posts', 'warning_status');
|
|
|
+ $standard_fields = array('icq', 'aim', 'yim', 'skype', 'location', 'gender', 'website', 'personal_text', 'posts', 'warning_status');
|
|
|
$fields_no_registration = array('posts', 'warning_status');
|
|
|
$disabled_fields = isset($modSettings['disabled_profile_fields']) ? explode(',', $modSettings['disabled_profile_fields']) : array();
|
|
|
$registration_fields = isset($modSettings['registration_fields']) ? explode(',', $modSettings['registration_fields']) : array();
|