! [Topic Solved] Fix the permission calling hook, as well as setting correct strings for simple permissions mode [Bug 773]
gruffen

gruffen commited on 2011-07-06 01:26:49
Showing 3 changed files, with 18 additions and 6 deletions.

... ...
@@ -18,12 +18,16 @@ $txt['modlog_solve_log'] = 'Topic solved log';
18 18
 $txt['modlog_solve_log_desc'] = 'Below is a list of all topics that have been solved or unsolved by your users.<br /><strong>Please note:</strong> Entries cannot be removed from this log until they are at least twenty-four hours old.';
19 19
 $txt['modlog_solve_log_no_entries_found'] = 'There are currently no entries in the topic solved log.';
20 20
 $txt['solve_log_help'] = '<strong>Topic solved log</strong><br />This section allows members of the moderation team to track all usage of the topic solved/not solved feature. To ensure that moderators cannot remove references to the actions they have performed, entries may not be deleted until 24 hours after the action was taken.';
21
+
21 22
 $txt['permissionname_solve_topic'] = 'Mark topics solved/not solved';
23
+$txt['permissionhelp_solve_topic'] = 'This permission will allow the user to mark topics as solved and not solved.';
22 24
 $txt['permissionname_solve_topic_any'] = 'Any topic';
23 25
 $txt['permissionname_solve_topic_own'] = 'Own topic';
26
+$txt['permissionname_simple_solve_topic_own'] = 'Mark their own topics solved';
27
+$txt['permissionname_simple_solve_topic_any'] = 'Mark any topics solved';
28
+
24 29
 $txt['cannot_solve_topic_any'] = 'You do not have permission to mark topics solved.';
25 30
 $txt['cannot_solve_topic_own'] = 'You do not have permission to mark topics solved.';
26
-$txt['permissionhelp_solve_topic'] = 'This permission will allow the user to mark topics as solved and not solved.';
27 31
 $txt['enable_solved_log'] = 'Enable logging of topic solving (Requires moderation logging to be enabled)';
28 32
 $txt['topicsolved_board_desc'] = '<span class="smalltext">Please select the boards you wish to enable the topic solved feature in.</span>';
29 33
 $txt['topicsolved_highlight'] = 'Highlight solved topics on the message index';
... ...
@@ -47,15 +51,21 @@ $txt['modlog_solve_log'] = 'Topic solved log';
47 51
 $txt['modlog_solve_log_desc'] = 'Below is a list of all topics that have been solved or unsolved by your users.<br /><strong>Please note:</strong> Entries cannot be removed from this log until they are at least twenty-four hours old.';
48 52
 $txt['modlog_solve_log_no_entries_found'] = 'There are currently no entries in the topic solved log.';
49 53
 $txt['solve_log_help'] = '<strong>Topic solved log</strong><br />This section allows members of the moderation team to track all usage of the topic solved/not solved feature. To ensure that moderators cannot remove references to the actions they have performed, entries may not be deleted until 24 hours after the action was taken.';
54
+
50 55
 $txt['permissionname_solve_topic'] = 'Mark topics solved/not solved';
51
-$txt['permissionname_solve_topic_any'] = 'Any topics';
52
-$txt['permissionname_solve_topic_own'] = 'Own topics';
56
+$txt['permissionhelp_solve_topic'] = 'This permission will allow the user to mark topics as solved and not solved.';
57
+$txt['permissionname_solve_topic_any'] = 'Any topic';
58
+$txt['permissionname_solve_topic_own'] = 'Own topic';
59
+$txt['permissionname_simple_solve_topic_own'] = 'Mark their own topics solved';
60
+$txt['permissionname_simple_solve_topic_any'] = 'Mark any topics solved';
61
+
53 62
 $txt['cannot_solve_topic_any'] = 'You do not have permission to mark topics solved.';
54 63
 $txt['cannot_solve_topic_own'] = 'You do not have permission to mark topics solved.';
55
-$txt['permissionhelp_solve_topic'] = 'This permission will allow the user to mark topics as solved and not solved.';
56
-$txt['enable_solved_log'] = 'Enable logging of topic solving';
64
+$txt['enable_solved_log'] = 'Enable logging of topic solving (Requires moderation logging to be enabled)';
57 65
 $txt['topicsolved_board_desc'] = '<span class="smalltext">Please select the boards you wish to enable the topic solved feature in.</span>';
58
-$txt['topicsolved_highlight'] = 'Highlight solved topics in green on the message index';
66
+$txt['topicsolved_highlight'] = 'Highlight solved topics on the message index';
67
+$txt['topicsolved_highlight_col1'] = 'Color for highlighted solved topics (lighter columns, such as replies/view)';
68
+$txt['topicsolved_highlight_col2'] = 'Color for highlighted solved topics (darker columns, such as subject/started by)';
59 69
 $txt['topicsolved_display_notice'] = 'Display a notice inside of solved topics';
60 70
 $txt['topicsolved_is_solved'] = '<strong style="color: green;">Topic solved</strong><br />This topic is marked as solved and as such require no attention unless you want to bump this issue.';
61 71
 $txt['topicsolved_not_enabled'] = 'Topic solved is not enabled on this board.';]]></add>
... ...
@@ -29,6 +29,7 @@ add_integration_function('integrate_mod_buttons', 'add_topicsolved_button', true
29 29
 add_integration_function('integrate_admin_include', '$sourcedir/SolveTopic-Admin.php', true);
30 30
 add_integration_function('integrate_modify_modifications', 'add_ts_settings_menu', true);
31 31
 add_integration_function('integrate_admin_areas', 'add_ts_adminmenu', true);
32
+add_integration_function('integrate_load_permissions', 'add_ts_permissions', true);
32 33
 
33 34
 if (SMF == 'SSI')
34 35
 {
... ...
@@ -10,6 +10,7 @@ remove_integration_function('integrate_mod_buttons', 'add_topicsolved_button');
10 10
 remove_integration_function('integrate_admin_include', '$sourcedir/SolveTopic-Admin.php');
11 11
 remove_integration_function('integrate_modify_modifications', 'add_ts_settings_menu');
12 12
 remove_integration_function('integrate_admin_areas', 'add_ts_adminmenu');
13
+remove_integration_function('integrate_load_permissions', 'add_ts_permissions');
13 14
 
14 15
 if (SMF == 'SSI')
15 16
 {
16 17