소스 검색

Merge pull request #702 from Arantor/release-2.1

Refining the admin experience a little bit... by getting rid of some of 'Core Features'
Arantor 11 년 전
부모
커밋
a2b1258ea0

+ 1 - 2
Sources/Admin.php

@@ -119,7 +119,7 @@ function AdminMain()
 						'layout' => array($txt['mods_cat_layout']),
 						'karma' => array($txt['karma'], 'enabled' => in_array('k', $context['admin_features'])),
 						'sig' => array($txt['signature_settings_short']),
-						'profile' => array($txt['custom_profile_shorttitle'], 'enabled' => in_array('cp', $context['admin_features'])),
+						'profile' => array($txt['custom_profile_shorttitle']),
 					),
 				),
 				'securitysettings' => array(
@@ -417,7 +417,6 @@ function AdminMain()
 					),
 				),
 				'reports' => array(
-					'enabled' => in_array('rg', $context['admin_features']),
 					'label' => $txt['generate_reports'],
 					'file' => 'Reports.php',
 					'function' => 'ReportsMain',

+ 1 - 1
Sources/Load.php

@@ -1797,7 +1797,7 @@ function loadTheme($id_theme = 0, $initialize = true)
 		$modSettings['memberCount'] = $modSettings['totalMembers'];
 
 	// This allows us to change the way things look for the admin.
-	$context['admin_features'] = isset($modSettings['admin_features']) ? explode(',', $modSettings['admin_features']) : array('cd,cp,k,w,rg,ml,pm');
+	$context['admin_features'] = isset($modSettings['admin_features']) ? explode(',', $modSettings['admin_features']) : array('cd,k,w,ml,pm');
 
 	// Default JS variables for use in every theme
 	$context['javascript_vars'] = array(

+ 1 - 32
Sources/ManageSettings.php

@@ -63,11 +63,7 @@ function ModifyFeatureSettings()
 
 	call_integration_hook('integrate_modify_features', array(&$subActions));
 
-	// If Advanced Profile Fields are disabled don't show the setting page
-	if (!in_array('cp', $context['admin_features']))
-		unset($subActions['profile']);
-
-	// Same for Karma
+	// If karma is disabled don't show the setting page.
 	if (!in_array('k', $context['admin_features']))
 		unset($subActions['karma']);
 
@@ -202,29 +198,6 @@ function ModifyCoreFeatures($return_config = false)
 				'cal_enabled' => 1,
 			),
 		),
-		// cp = custom profile fields.
-		'cp' => array(
-			'url' => 'action=admin;area=featuresettings;sa=profile',
-			'save_callback' => create_function('$value', '
-				global $smcFunc;
-				if (!$value)
-				{
-					$smcFunc[\'db_query\'](\'\', \'
-						UPDATE {db_prefix}custom_fields
-						SET active = 0\');
-				}
-			'),
-			'setting_callback' => create_function('$value', '
-				if (!$value)
-					return array(
-						\'disabled_profile_fields\' => \'\',
-						\'registration_fields\' => \'\',
-						\'displayFields\' => \'\',
-					);
-				else
-					return array();
-			'),
-		),
 		// dr = drafts
 		'dr' => array(
 			'url' => 'action=admin;area=managedrafts',
@@ -317,10 +290,6 @@ function ModifyCoreFeatures($return_config = false)
 				}
 			'),
 		),
-		// rg = report generator.
-		'rg' => array(
-			'url' => 'action=admin;area=reports',
-		),
 		// w = warning.
 		'w' => array(
 			'url' => 'action=admin;area=securitysettings;sa=moderation',

BIN
Themes/default/images/admin/feature_cp.png


BIN
Themes/default/images/admin/feature_rg.png


+ 0 - 4
Themes/default/languages/ManageSettings.english.php

@@ -300,8 +300,6 @@ $txt['core_settings_item_cd'] = 'Calendar';
 $txt['core_settings_item_cd_desc'] = 'Enabling this feature will open up a selection of options to enable your users to view the calendar, add and review events, see users birthdates on a calendar and much, much more.';
 $txt['core_settings_item_dr'] = 'Drafts';
 $txt['core_settings_item_dr_desc'] = 'Enabling this feature will allow users to save drafts of their posts so they can return later to post them.';
-$txt['core_settings_item_cp'] = 'Advanced Profile Fields';
-$txt['core_settings_item_cp_desc'] = 'This enables you to hide standard profile fields, add profile fields to registration, and create new profile fields for your forum.';
 $txt['core_settings_item_ih'] = 'Integration Hooks Management';
 $txt['core_settings_item_ih_desc'] = 'This feature allows you to enable or disable any integration hooks added by modifications. Changing hooks can prevent your forum from working properly, so use this feature only if you know what you are doing.';
 $txt['core_settings_item_k'] = 'Karma';
@@ -312,8 +310,6 @@ $txt['core_settings_item_pm'] = 'Post Moderation';
 $txt['core_settings_item_pm_desc'] = 'Post moderation enables you to select groups and boards within which posts must be approved before they become public. Upon enabling this feature be sure to visit the permission section to set up the relevant permissions.';
 $txt['core_settings_item_ps'] = 'Paid Subscriptions';
 $txt['core_settings_item_ps_desc'] = 'Paid subscriptions allow users to pay for subscriptions to change membergroups within the forum and thus change their access rights.';
-$txt['core_settings_item_rg'] = 'Report Generation';
-$txt['core_settings_item_rg_desc'] = 'This administration feature allows the generation of reports (which can be printed) to present your current forum setup in an easy to view manner - particularly useful for large forums.';
 $txt['core_settings_item_sp'] = 'Search Engine Tracking';
 $txt['core_settings_item_sp_desc'] = 'Enabling this feature will allow administrators to track search engines as they index your forum.';
 $txt['core_settings_item_w'] = 'Warning System';