Skip to content

Commit 455165c

Browse files
add a cheat setting
Signed-off-by: Diego Andrés <diegoandres_cortes@outlook.com>
1 parent 06349e0 commit 455165c

1 file changed

Lines changed: 19 additions & 0 deletions

File tree

Sources/Class-TopicSolved.php

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,25 @@ public static function hooks()
3737
// Permissions
3838
add_integration_function('integrate_load_permissions', __CLASS__ . '::permissions#', false, $sourcedir . '/Class-TopicSolved.php');
3939
add_integration_function('integrate_helpadmin', __CLASS__ . '::language#', false, $sourcedir . '/Class-TopicSolved.php');
40+
41+
// Settings
42+
add_integration_function('integrate_general_mod_settings', __CLASS__ . '::settings#', false, $sourcedir . '/Class-TopicSolved.php');
43+
}
44+
45+
/**
46+
* Mod Settings. A cheat setting to select boards.
47+
*
48+
* @return void
49+
*/
50+
public static function settings(&$config_vars)
51+
{
52+
global $txt;
53+
54+
if (!empty($config_vars))
55+
$config_vars[] = '';
56+
57+
$config_vars[] = ['title', 'TopicSolved_settings'];
58+
$config_vars[] = ['boards', 'TopicSolved_boards_can_solve', 'label' => $txt['TopicSolved_boards_select']];
4059
}
4160

4261
/**

0 commit comments

Comments
 (0)