Browse Source

Reorganization of the Moderate menu

emanuele 13 years ago
parent
commit
c0ef0371da
2 changed files with 32 additions and 31 deletions
  1. 30 29
      Sources/ModerationCenter.php
  2. 2 2
      Themes/default/languages/ModerationCenter.english.php

+ 30 - 29
Sources/ModerationCenter.php

@@ -56,17 +56,31 @@ function ModerationMain($dont_call = false)
 					'label' => $txt['moderation_center'],
 					'function' => 'ModerationHome',
 				),
-				'modlog' => array(
-					'label' => $txt['modlog_view'],
-					'enabled' => !empty($modSettings['modlog_enabled']) && $context['can_moderate_boards'],
-					'file' => 'Modlog.php',
-					'function' => 'ViewModlog',
+				'settings' => array(
+					'label' => $txt['mc_settings'],
+					'function' => 'ModerationSettings',
+				),
+				'modlogoff' => array(
+					'label' => $txt['mc_logoff'],
+					'function' => 'ModEndSession',
+					'enabled' => empty($modSettings['securityDisable_moderate']),
 				),
 				'notice' => array(
 					'file' => 'ModerationCenter.php',
 					'function' => 'ShowNotice',
 					'select' => 'index'
 				),
+			),
+		),
+		'logs' => array(
+			'title' => $txt['mc_logs'],
+			'areas' => array(
+				'modlog' => array(
+					'label' => $txt['modlog_view'],
+					'enabled' => !empty($modSettings['modlog_enabled']) && $context['can_moderate_boards'],
+					'file' => 'Modlog.php',
+					'function' => 'ViewModlog',
+				),
 				'warnings' => array(
 					'label' => $txt['mc_warnings'],
 					'enabled' => in_array('w', $context['admin_features']) && $modSettings['warning_settings'][0] == 1 && $context['can_moderate_boards'],
@@ -76,15 +90,6 @@ function ModerationMain($dont_call = false)
 						'templates' => array($txt['mc_warning_templates'], 'issue_warning'),
 					),
 				),
-				'userwatch' => array(
-					'label' => $txt['mc_watched_users_title'],
-					'enabled' => in_array('w', $context['admin_features']) && $modSettings['warning_settings'][0] == 1 && $context['can_moderate_boards'],
-					'function' => 'ViewWatchedUsers',
-					'subsections' => array(
-						'member' => array($txt['mc_watched_users_member']),
-						'post' => array($txt['mc_watched_users_post']),
-					),
-				),
 			),
 		),
 		'posts' => array(
@@ -125,6 +130,15 @@ function ModerationMain($dont_call = false)
 			'title' => $txt['mc_groups'],
 			'enabled' => $context['can_moderate_groups'],
 			'areas' => array(
+				'userwatch' => array(
+					'label' => $txt['mc_watched_users_title'],
+					'enabled' => in_array('w', $context['admin_features']) && $modSettings['warning_settings'][0] == 1 && $context['can_moderate_boards'],
+					'function' => 'ViewWatchedUsers',
+					'subsections' => array(
+						'member' => array($txt['mc_watched_users_member']),
+						'post' => array($txt['mc_watched_users_post']),
+					),
+				),
 				'groups' => array(
 					'label' => $txt['mc_group_requests'],
 					'file' => 'Groups.php',
@@ -138,20 +152,6 @@ function ModerationMain($dont_call = false)
 				),
 			),
 		),
-		'prefs' => array(
-			'title' => $txt['mc_prefs'],
-			'areas' => array(
-				'settings' => array(
-					'label' => $txt['mc_settings'],
-					'function' => 'ModerationSettings',
-				),
-				'modlogoff' => array(
-					'label' => $txt['mc_logoff'],
-					'function' => 'ModEndSession',
-					'enabled' => empty($modSettings['securityDisable_moderate']),
-				),
-			),
-		),
 	);
 
 	// Any files to include for moderation?
@@ -1618,9 +1618,10 @@ function ViewWarningLog()
 				),
 			),
 		),
+/*		Commented out because of an Assertion failed error and an undefined index (href)
 		'form' => array(
 			'token' => 'mod-wt',
-		),
+		),*/
 	);
 
 	// Create the watched user list.

+ 2 - 2
Themes/default/languages/ModerationCenter.english.php

@@ -5,8 +5,9 @@ global $scripturl;
 
 $txt['moderation_center'] = 'Moderation Center';
 $txt['mc_main'] = 'Main';
+$txt['mc_logs'] = 'Logs';
 $txt['mc_posts'] = 'Posts';
-$txt['mc_groups'] = 'Membergroups';
+$txt['mc_groups'] = 'Members and groups';
 
 $txt['mc_view_groups'] = 'View Membergroups';
 
@@ -125,7 +126,6 @@ $txt['mc_warning_template_personal'] = 'Personal Template';
 $txt['mc_warning_template_personal_desc'] = 'If you select this option only you will be able to see, edit and use this template. If not selected all moderators will be able to use this template.';
 $txt['mc_warning_template_error_empty'] = 'You must set both a title and notification body.';
 
-$txt['mc_prefs'] = 'Preferences';
 $txt['mc_settings'] = 'Change Settings';
 $txt['mc_prefs_title'] = 'Moderation Preferences';
 $txt['mc_prefs_desc'] = 'This section allows you to set some personal preferences for moderation related activities such as email notifications.';