mirror of
https://github.com/slawkens/myaac.git
synced 2025-05-01 19:59:21 +02:00
Move rest of config to settings
Remove config.php completely Add new settings category: Game Fix account_login_by_email Min textarea size = 2 + adjusted automatically
This commit is contained in:
parent
eca896954c
commit
cb6e777c69
3
.gitignore
vendored
3
.gitignore
vendored
@ -2,6 +2,9 @@ Thumbs.db
|
||||
.DS_Store
|
||||
.idea
|
||||
|
||||
#
|
||||
/.htaccess
|
||||
|
||||
# composer
|
||||
composer.lock
|
||||
vendor
|
||||
|
@ -143,7 +143,6 @@ if(!IS_CLI) {
|
||||
//define('CURRENT_URL', BASE_URL . $_SERVER['REQUEST_URI']);
|
||||
}
|
||||
|
||||
require SYSTEM . 'config.php';
|
||||
if (file_exists(BASE . 'config.local.php')) {
|
||||
require BASE . 'config.local.php';
|
||||
}
|
||||
|
@ -24,6 +24,12 @@ $deprecatedConfig = [
|
||||
'outfit_images_wrong_looktypes',
|
||||
'item_images_url',
|
||||
'account_country',
|
||||
'towns',
|
||||
'quests',
|
||||
'character_samples',
|
||||
'character_towns',
|
||||
'characters_per_account',
|
||||
'characters_search_limit',
|
||||
'news_author',
|
||||
'news_limit',
|
||||
'news_ticker_limit',
|
||||
@ -52,6 +58,8 @@ $deprecatedConfig = [
|
||||
'status_ip',
|
||||
'status_port',
|
||||
'mail_enabled',
|
||||
'account_login_by_email',
|
||||
'account_login_by_email_fallback',
|
||||
'account_mail_verify',
|
||||
'account_create_character_create',
|
||||
'account_change_character_name',
|
||||
@ -70,3 +78,26 @@ foreach ($deprecatedConfig as $key => $value) {
|
||||
|
||||
//var_dump($settings['core.'.$value]['value']);
|
||||
}
|
||||
|
||||
$deprecatedConfigCharacters = [
|
||||
'level',
|
||||
'experience',
|
||||
'magic_level',
|
||||
'balance',
|
||||
'marriage_info' => 'marriage',
|
||||
'outfit',
|
||||
'creation_date',
|
||||
'quests',
|
||||
'skills',
|
||||
'equipment',
|
||||
'frags',
|
||||
'deleted',
|
||||
];
|
||||
|
||||
$tmp = [];
|
||||
foreach ($deprecatedConfigCharacters as $key => $value) {
|
||||
$tmp[(is_string($key) ? $key : $value)] = setting('core.characters_'.$value);
|
||||
}
|
||||
|
||||
config(['characters', $tmp]);
|
||||
unset($tmp);
|
||||
|
@ -1,71 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* This is MyAAC's Main Configuration file
|
||||
*
|
||||
* All the default values are kept here, you should not modify it but use
|
||||
* a config.local.php file instead to override the settings from here.
|
||||
*
|
||||
* This is a piece of PHP code so PHP syntax applies!
|
||||
* For boolean values please use true/false.
|
||||
*
|
||||
* Minimally 'server_path' directive have to be filled, other options are optional.
|
||||
*
|
||||
* @package MyAAC
|
||||
* @author Slawkens <slawkens@gmail.com>
|
||||
* @copyright 2019 MyAAC
|
||||
* @link https://my-aac.org
|
||||
*/
|
||||
|
||||
// TODO:
|
||||
// this file will be deleted, once all migrated to settings
|
||||
$config = array(
|
||||
'account_mail_block_plus_sign' => true, // block email with '+' signs like test+box@gmail.com (help protect against spamming accounts)
|
||||
'characters_per_account' => 10, // max. number of characters per account
|
||||
|
||||
// new character config
|
||||
'character_samples' => array( // vocations, format: ID_of_vocation => 'Name of Character to copy'
|
||||
//0 => 'Rook Sample',
|
||||
1 => 'Sorcerer Sample',
|
||||
2 => 'Druid Sample',
|
||||
3 => 'Paladin Sample',
|
||||
4 => 'Knight Sample'
|
||||
),
|
||||
|
||||
'use_character_sample_skills' => false,
|
||||
|
||||
// it must show limited number of players after using search in character page
|
||||
'characters_search_limit' => 15,
|
||||
|
||||
// town list used when creating character
|
||||
// won't be displayed if there is only one item (rookgaard for example)
|
||||
'character_towns' => array(1),
|
||||
|
||||
// list of towns
|
||||
// if you use TFS 1.3 with support for 'towns' table in database, then you can ignore this - it will be configured automatically (from MySQL database - Table - towns)
|
||||
// otherwise it will try to load from your .OTBM map file
|
||||
// if you don't see towns on website, then you need to fill this out
|
||||
'towns' => array(
|
||||
0 => 'No town',
|
||||
1 => 'Sample town'
|
||||
),
|
||||
|
||||
// characters page
|
||||
'characters' => array( // what things to display on character view page (true/false in each option)
|
||||
'level' => true,
|
||||
'experience' => false,
|
||||
'magic_level' => false,
|
||||
'balance' => false,
|
||||
'marriage_info' => true, // only 0.3
|
||||
'outfit' => true,
|
||||
'creation_date' => true,
|
||||
'quests' => true,
|
||||
'skills' => true,
|
||||
'equipment' => true,
|
||||
'frags' => false,
|
||||
'deleted' => false, // should deleted characters from same account be still listed on the list of characters? When enabled it will show that character is "[DELETED]"
|
||||
),
|
||||
'quests' => array(
|
||||
//'Some Quest' => 123,
|
||||
//'Some Quest Two' => 456,
|
||||
), // quests list (displayed in character view), name => storage
|
||||
);
|
@ -149,7 +149,7 @@ class CreateCharacter
|
||||
$char_to_copy = new OTS_Player();
|
||||
$char_to_copy->find($char_to_copy_name);
|
||||
if(!$char_to_copy->isLoaded())
|
||||
$errors[] = 'Wrong characters configuration. Try again or contact with admin. ADMIN: Edit file config.php and set valid characters to copy names. Character to copy: <b>'.$char_to_copy_name.'</b> doesn\'t exist.';
|
||||
$errors[] = 'Wrong characters configuration. Try again or contact with admin. ADMIN: Go to Admin Panel -> Settings -> Create Character and set valid characters to copy names. Character to copy: <b>'.$char_to_copy_name.'</b> doesn\'t exist.';
|
||||
}
|
||||
|
||||
if(!empty($errors)) {
|
||||
@ -195,7 +195,7 @@ class CreateCharacter
|
||||
|
||||
for($skill = POT::SKILL_FIRST; $skill <= POT::SKILL_LAST; $skill++) {
|
||||
$value = 10;
|
||||
if (config('use_character_sample_skills')) {
|
||||
if (setting('core.use_character_sample_skills')) {
|
||||
$value = $char_to_copy->getSkill($skill);
|
||||
}
|
||||
|
||||
@ -241,7 +241,7 @@ class CreateCharacter
|
||||
if($db->hasTable('player_skills')) {
|
||||
for($skill = POT::SKILL_FIRST; $skill <= POT::SKILL_LAST; $skill++) {
|
||||
$value = 10;
|
||||
if (config('use_character_sample_skills')) {
|
||||
if (setting('core.use_character_sample_skills')) {
|
||||
$value = $char_to_copy->getSkill($skill);
|
||||
}
|
||||
$skillExists = $db->query('SELECT `skillid` FROM `player_skills` WHERE `player_id` = ' . $player->getId() . ' AND `skillid` = ' . $skill);
|
||||
|
@ -248,7 +248,13 @@ class Settings implements ArrayAccess
|
||||
}
|
||||
|
||||
else if($setting['type'] === 'textarea') {
|
||||
echo '<textarea class="form-control" name="settings[' . $key . ']" id="' . $key . '">' . ($settingsDb[$key] ?? ($setting['default'] ?? '')) . '</textarea>';
|
||||
$value = ($settingsDb[$key] ?? ($setting['default'] ?? ''));
|
||||
$valueWithSpaces = array_map('trim', preg_split('/\r\n|\r|\n/', trim($value)));
|
||||
$rows = count($valueWithSpaces);
|
||||
if ($rows < 2) {
|
||||
$rows = 2; // always min 2 rows for textarea
|
||||
}
|
||||
echo '<textarea class="form-control" rows="' . $rows . '" name="settings[' . $key . ']" id="' . $key . '">' . $value . '</textarea>';
|
||||
}
|
||||
|
||||
else if ($setting['type'] === 'options') {
|
||||
@ -314,8 +320,7 @@ class Settings implements ArrayAccess
|
||||
?>
|
||||
</td>
|
||||
<td>
|
||||
<div class="well">
|
||||
<?php
|
||||
<div class="well setting-default"><?php
|
||||
echo ($setting['desc'] ?? '');
|
||||
echo '<br/>';
|
||||
echo '<strong>Default:</strong> ';
|
||||
@ -331,8 +336,7 @@ class Settings implements ArrayAccess
|
||||
echo $setting['options'][$setting['default']];
|
||||
}
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
?></div>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
|
@ -117,7 +117,7 @@ class Validator
|
||||
return false;
|
||||
}
|
||||
|
||||
if(config('account_mail_block_plus_sign')) {
|
||||
if(setting('core.account_mail_block_plus_sign')) {
|
||||
$explode = explode('@', $email);
|
||||
if(isset($explode[0]) && (strpos($explode[0],'+') !== false)) {
|
||||
self::$lastError = 'Please do not use plus (+) sign in your e-mail.';
|
||||
|
@ -26,11 +26,11 @@ return [
|
||||
'name' => 'App Environment',
|
||||
'type' => 'options',
|
||||
'options' => ['prod' => 'Production', 'dev' => 'Development'],
|
||||
'desc' => 'if you use this script on your live server - set production<br/>
|
||||
* if you want to test and debug the script locally, or develop plugins, set to development<br/>
|
||||
* WARNING: on "development" cache is disabled, so site will be significantly slower !!!<br/>
|
||||
* WARNING2: on "development" all PHP errors/warnings are displayed<br/>
|
||||
* Recommended: "production" cause of speed (page load time is better)',
|
||||
'desc' => 'if you use this script on your live server - set production<br/>' .
|
||||
'* if you want to test and debug the script locally, or develop plugins, set to development<br/>' .
|
||||
'* WARNING: on "development" cache is disabled, so site will be significantly slower !!!<br/>' .
|
||||
'* WARNING2: on "development" all PHP errors/warnings are displayed<br/>' .
|
||||
'* Recommended: "production" cause of speed (page load time is better)',
|
||||
'default' => 'prod',
|
||||
'is_config' => true,
|
||||
],
|
||||
@ -41,28 +41,6 @@ return [
|
||||
'default' => '',
|
||||
'is_config' => true,
|
||||
],
|
||||
'gzip_output' => [
|
||||
'name' => 'gzip Output',
|
||||
'type' => 'boolean',
|
||||
'desc' => 'gzip page content before sending it to the browser, uses less bandwidth but more cpu cycles',
|
||||
'default' => false,
|
||||
'is_config' => true,
|
||||
],
|
||||
'cache_engine' => [
|
||||
'name' => 'Cache Engine',
|
||||
'type' => 'options',
|
||||
'options' => ['auto' => 'Auto', 'file' => 'Files', 'apc' => 'APC', 'apcu' => 'APCu', 'eaccelerator' => 'eAccelerator', 'disable' => 'Disable'],
|
||||
'desc' => 'Auto is most reasonable. It will detect the best cache engine',
|
||||
'default' => 'auto',
|
||||
'is_config' => true,
|
||||
],
|
||||
'cache_prefix' => [
|
||||
'name' => 'Cache Prefix',
|
||||
'type' => 'text',
|
||||
'desc' => 'Have to be unique if running more MyAAC instances on the same server (except file system cache)',
|
||||
'default' => 'myaac_' . generateRandomString(8, true, false, true),
|
||||
'is_config' => true,
|
||||
],
|
||||
'date_timezone' => [
|
||||
'name' => 'Date Timezone',
|
||||
'type' => 'options',
|
||||
@ -70,27 +48,22 @@ return [
|
||||
'desc' => 'Timezone of the server, more info at http://php.net/manual/en/timezones.php',
|
||||
'default' => 'Europe/Warsaw',
|
||||
],
|
||||
'genders' => [
|
||||
'name' => 'Genders (aka sex)',
|
||||
'type' => 'textarea',
|
||||
'desc' => 'Separated with comma',
|
||||
'default' => 'Female, Male',
|
||||
'callbacks' => [
|
||||
'get' => function ($value) {
|
||||
return array_map('trim', explode(',', $value));
|
||||
},
|
||||
],
|
||||
],
|
||||
'account_types' => [
|
||||
'name' => 'Account Types',
|
||||
'type' => 'textarea',
|
||||
'desc' => 'Separated with comma, you may need to adjust this for older tfs versions by removing Community Manager',
|
||||
'default' => 'None, Normal, Tutor, Senior Tutor, Gamemaster, Community Manager, God',
|
||||
'callbacks' => [
|
||||
'get' => function ($value) {
|
||||
return array_map('trim', explode(',', $value));
|
||||
},
|
||||
'friendly_urls' => [
|
||||
'name' => 'Friendly URLs',
|
||||
'type' => 'boolean',
|
||||
'desc' => 'It makes links looks more elegant to eye, and also are SEO friendly<br/><br/>' .
|
||||
'yes: http://example.net/guilds/Testing<br/>' .
|
||||
'no: http://example.net/index.php/guilds/Testing<br/><br/>' .
|
||||
'<strong>apache2:</strong> mod_rewrite is required for this + remember to rename .htaccess.dist to .htaccess<br/>' .
|
||||
'<strong>nginx:</strong> check included nginx-sample.conf',
|
||||
'default' => false,
|
||||
],
|
||||
'gzip_output' => [
|
||||
'name' => 'gzip Output',
|
||||
'type' => 'boolean',
|
||||
'desc' => 'gzip page content before sending it to the browser, uses less bandwidth but more cpu cycles',
|
||||
'default' => false,
|
||||
'is_config' => true,
|
||||
],
|
||||
'google_analytics_id' => [
|
||||
'name' => 'Google Analytics ID',
|
||||
@ -204,6 +177,103 @@ return [
|
||||
'type' => 'section',
|
||||
'title' => 'Misc'
|
||||
],
|
||||
'cache_engine' => [
|
||||
'name' => 'Cache Engine',
|
||||
'type' => 'options',
|
||||
'options' => ['auto' => 'Auto', 'file' => 'Files', 'apc' => 'APC', 'apcu' => 'APCu', 'eaccelerator' => 'eAccelerator', 'disable' => 'Disable'],
|
||||
'desc' => 'Auto is most reasonable. It will detect the best cache engine',
|
||||
'default' => 'auto',
|
||||
'is_config' => true,
|
||||
],
|
||||
'cache_prefix' => [
|
||||
'name' => 'Cache Prefix',
|
||||
'type' => 'text',
|
||||
'desc' => 'Have to be unique if running more MyAAC instances on the same server (except file system cache)',
|
||||
'default' => 'myaac_' . generateRandomString(8, true, false, true),
|
||||
'is_config' => true,
|
||||
],
|
||||
'session_prefix' => [
|
||||
'name' => 'Session Prefix',
|
||||
'type' => 'text',
|
||||
'desc' => 'must be unique for every site on your server',
|
||||
'default' => 'myaac_',
|
||||
],
|
||||
'backward_support' => [
|
||||
'name' => 'Gesior Backward Support',
|
||||
'type' => 'boolean',
|
||||
'desc' => 'gesior backward support (templates & pages)<br/>' .
|
||||
'allows using gesior templates and pages with myaac<br/>' .
|
||||
'might bring some performance when disabled',
|
||||
'default' => true,
|
||||
],
|
||||
'anonymous_usage_statistics' => [
|
||||
'name' => 'Anonymous Usage Statistics',
|
||||
'type' => 'boolean',
|
||||
'desc' => 'Allow MyAAC to report anonymous usage statistics to developers? The data is sent only once per 30 days and is fully confidential. It won\'t affect the performance of your website',
|
||||
'default' => true,
|
||||
],
|
||||
[
|
||||
'type' => 'category',
|
||||
'title' => 'Game',
|
||||
],
|
||||
[
|
||||
'type' => 'section',
|
||||
'title' => 'Game'
|
||||
],
|
||||
'client' => [
|
||||
'name' => 'Client Version',
|
||||
'type' => 'options',
|
||||
'options' => '$clients',
|
||||
'desc' => 'what client version are you using on this OT?<br/>used for the Downloads page and some templates aswell',
|
||||
'default' => 710
|
||||
],
|
||||
'towns' => [
|
||||
'name' => 'Towns',
|
||||
'type' => 'textarea',
|
||||
'desc' => "if you use TFS 1.3 with support for 'towns' table in database, then you can ignore this - it will be configured automatically (from MySQL database - Table - towns)<br/>" .
|
||||
"otherwise it will try to load from your .OTBM map file<br/>" .
|
||||
"if you don't see towns on website, then you need to fill this out",
|
||||
'default' => "0=No Town\n1=Sample Town",
|
||||
'callbacks' => [
|
||||
'get' => function ($value) {
|
||||
$ret = [];
|
||||
$towns = array_map('trim', preg_split('/\r\n|\r|\n/', trim($value)));
|
||||
|
||||
foreach ($towns as $town) {
|
||||
if (empty($town)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$explode = explode('=', $town);
|
||||
$ret[$explode[0]] = $explode[1];
|
||||
}
|
||||
|
||||
return $ret;
|
||||
},
|
||||
],
|
||||
],
|
||||
'genders' => [
|
||||
'name' => 'Genders (aka sex)',
|
||||
'type' => 'textarea',
|
||||
'desc' => 'Separated with comma',
|
||||
'default' => 'Female, Male',
|
||||
'callbacks' => [
|
||||
'get' => function ($value) {
|
||||
return array_map('trim', explode(',', $value));
|
||||
},
|
||||
],
|
||||
],
|
||||
'account_types' => [
|
||||
'name' => 'Account Types',
|
||||
'type' => 'textarea',
|
||||
'desc' => 'Separated with comma, you may need to adjust this for older tfs versions by removing Community Manager',
|
||||
'default' => 'None, Normal, Tutor, Senior Tutor, Gamemaster, Community Manager, God',
|
||||
'callbacks' => [
|
||||
'get' => function ($value) {
|
||||
return array_map('trim', explode(',', $value));
|
||||
},
|
||||
],
|
||||
],
|
||||
'vocations_amount' => [
|
||||
'name' => 'Vocations Amount',
|
||||
'type' => 'number',
|
||||
@ -221,43 +291,6 @@ return [
|
||||
},
|
||||
],
|
||||
],
|
||||
'client' => [
|
||||
'name' => 'Client Version',
|
||||
'type' => 'options',
|
||||
'options' => '$clients',
|
||||
'desc' => 'what client version are you using on this OT?<br/>used for the Downloads page and some templates aswell',
|
||||
'default' => 710
|
||||
],
|
||||
'session_prefix' => [
|
||||
'name' => 'Session Prefix',
|
||||
'type' => 'text',
|
||||
'desc' => 'must be unique for every site on your server',
|
||||
'default' => 'myaac_',
|
||||
],
|
||||
'friendly_urls' => [
|
||||
'name' => 'Friendly URLs',
|
||||
'type' => 'boolean',
|
||||
'desc' => 'It makes links looks more elegant to eye, and also are SEO friendly<br/><br/>
|
||||
yes: http://example.net/guilds/Testing<br/>
|
||||
no: http://example.net/?subtopic=guilds&name=Testing<br/><br/>
|
||||
<strong>apache2:</strong> mod_rewrite is required for this + remember to rename .htaccess.dist to .htaccess<br/>
|
||||
<strong>nginx:</strong> check included nginx-sample.conf',
|
||||
'default' => false,
|
||||
],
|
||||
'backward_support' => [
|
||||
'name' => 'Gesior Backward Support',
|
||||
'type' => 'boolean',
|
||||
'desc' => 'gesior backward support (templates & pages)<br/>
|
||||
allows using gesior templates and pages with myaac<br/>
|
||||
might bring some performance when disabled',
|
||||
'default' => true,
|
||||
],
|
||||
'anonymous_usage_statistics' => [
|
||||
'name' => 'Anonymous Usage Statistics',
|
||||
'type' => 'boolean',
|
||||
'desc' => 'Allow MyAAC to report anonymous usage statistics to developers? The data is sent only once per 30 days and is fully confidential. It won\'t affect the performance of your website',
|
||||
'default' => true,
|
||||
],
|
||||
[
|
||||
'type' => 'category',
|
||||
'title' => 'Database',
|
||||
@ -552,7 +585,7 @@ Sent by MyAAC,<br/>
|
||||
],
|
||||
],
|
||||
'mail_lost_account_interval' => [
|
||||
'name' => 'Default Account Premium Days',
|
||||
'name' => 'Mail Lost Interface Interval',
|
||||
'type' => 'number',
|
||||
'desc' => 'Time in seconds between e-mails to one account from lost account interface, block spam',
|
||||
'default' => 60,
|
||||
@ -585,6 +618,9 @@ Sent by MyAAC,<br/>
|
||||
'type' => 'boolean',
|
||||
'desc' => "allow also additionally login by Account Name/Number (for users that might forget their email). Works only if Account Login By E-Mail is also enabled",
|
||||
'default' => false,
|
||||
'show_if' => [
|
||||
'account_login_by_email', '=', 'true'
|
||||
],
|
||||
],
|
||||
'account_create_auto_login' => [
|
||||
'name' => 'Account Create Auto Login',
|
||||
@ -622,6 +658,12 @@ Sent by MyAAC,<br/>
|
||||
'desc' => 'How many days user need to change email to account - block hackers',
|
||||
'default' => 2,
|
||||
],
|
||||
'account_mail_block_plus_sign' => [
|
||||
'name' => 'Account Mail Block Plus Sign (+)',
|
||||
'type' => 'boolean',
|
||||
'desc' => "Block E-Mails with '+' signs like test+box@gmail.com (help protect against spamming accounts)",
|
||||
'default' => true,
|
||||
],
|
||||
'account_country' => [
|
||||
'name' => 'Account Country',
|
||||
'type' => 'boolean',
|
||||
@ -634,10 +676,52 @@ Sent by MyAAC,<br/>
|
||||
'desc' => 'should country of user be automatically recognized by his IP? This makes an external API call to http://ipinfo.io',
|
||||
'default' => true,
|
||||
],
|
||||
'characters_per_account' => [
|
||||
'name' => 'Characters per Account',
|
||||
'type' => 'number',
|
||||
'desc' => 'Max. number of characters per account',
|
||||
'default' => 10,
|
||||
],
|
||||
'create_character' => [
|
||||
'type' => 'section',
|
||||
'title' => 'Create Character',
|
||||
],
|
||||
'character_samples' => [
|
||||
'name' => 'Character Samples',
|
||||
'type' => 'textarea',
|
||||
'desc' => "Character Samples used when creating character.<br/>" .
|
||||
"Format: <strong>ID_of_vocation =Name of Character to copy</strong><br/>" .
|
||||
"For Rook use - <strong>0=Rook Sample</strong>",
|
||||
'default' => "1=Sorcerer Sample\n2=Druid Sample\n3=Paladin Sample\n4=Knight Sample",
|
||||
'callbacks' => [
|
||||
'get' => function ($value) {
|
||||
$ret = [];
|
||||
$vocs = array_map('trim', preg_split('/\r\n|\r|\n/', trim($value)));
|
||||
|
||||
foreach ($vocs as $voc) {
|
||||
if (empty($voc)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$explode = explode('=', $voc);
|
||||
$ret[$explode[0]] = $explode[1];
|
||||
}
|
||||
|
||||
return $ret;
|
||||
},
|
||||
],
|
||||
],
|
||||
'character_towns' => [
|
||||
'name' => 'Towns List',
|
||||
'type' => 'text',
|
||||
'desc' => "Towns List used when creating character separated by comma (,). Won't be displayed if there is only one item (rookgaard for example)",
|
||||
'default' => '1,2',
|
||||
'callbacks' => [
|
||||
'get' => function ($value) {
|
||||
return array_map('trim', explode(',', $value));
|
||||
},
|
||||
],
|
||||
],
|
||||
'create_character_name_min_length' => [
|
||||
'name' => 'Name Min Length',
|
||||
'type' => 'number',
|
||||
@ -701,6 +785,12 @@ Sent by MyAAC,<br/>
|
||||
'desc' => 'Should spells names and words be blocked when creating character?',
|
||||
'default' => true,
|
||||
],
|
||||
'use_character_sample_skills' => [
|
||||
'name' => 'Use Character Sample Skills',
|
||||
'type' => 'boolean',
|
||||
'desc' => 'No = default skill = 10, yes - use sample skills',
|
||||
'default' => false,
|
||||
],
|
||||
'account_mail_confirmed_reward' => [
|
||||
'type' => 'section',
|
||||
'title' => 'Reward Users for confirming their E-Mails. Works only with Account Mail Verify enabled',
|
||||
@ -709,7 +799,7 @@ Sent by MyAAC,<br/>
|
||||
],
|
||||
],
|
||||
'account_mail_confirmed_reward_premium_days' => [
|
||||
'name' => 'Reward Premium Points',
|
||||
'name' => 'Reward Premium Days',
|
||||
'type' => 'number',
|
||||
'desc' => '0 to disable',
|
||||
'default' => 0,
|
||||
@ -727,7 +817,7 @@ Sent by MyAAC,<br/>
|
||||
],
|
||||
],
|
||||
'account_mail_confirmed_reward_coins' => [
|
||||
'name' => 'Reward Premium Points',
|
||||
'name' => 'Reward Coins',
|
||||
'type' => 'number',
|
||||
'desc' => '0 to disable. Works only with servers that supports coins',
|
||||
'default' => 0,
|
||||
@ -980,6 +1070,114 @@ Sent by MyAAC,<br/>
|
||||
},
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'section',
|
||||
'title' => 'Characters Page',
|
||||
],
|
||||
'characters_search_limit' => [
|
||||
'name' => 'Characters Search Limit',
|
||||
'type' => 'number',
|
||||
'desc' => "How many characters (players) to show when using search function",
|
||||
'default' => 15,
|
||||
],
|
||||
'characters_level' => [
|
||||
'name' => 'Display Level',
|
||||
'type' => 'boolean',
|
||||
'desc' => 'Show characters level',
|
||||
'default' => true,
|
||||
],
|
||||
'characters_experience' => [
|
||||
'name' => 'Display Experience',
|
||||
'type' => 'boolean',
|
||||
'desc' => 'Show characters experience points',
|
||||
'default' => false,
|
||||
],
|
||||
'characters_magic_level' => [
|
||||
'name' => 'Display Magic Level',
|
||||
'type' => 'boolean',
|
||||
'desc' => 'Show characters magic level',
|
||||
'default' => false,
|
||||
],
|
||||
'characters_balance' => [
|
||||
'name' => 'Display Balance',
|
||||
'type' => 'boolean',
|
||||
'desc' => 'Show characters bank balance',
|
||||
'default' => false,
|
||||
],
|
||||
'characters_marriage' => [
|
||||
'name' => 'Display Marriage',
|
||||
'type' => 'boolean',
|
||||
'desc' => 'Show characters marriage info. Works only in TFS 0.3',
|
||||
'default' => true,
|
||||
],
|
||||
'characters_outfit' => [
|
||||
'name' => 'Display Outfit',
|
||||
'type' => 'boolean',
|
||||
'desc' => 'Show characters outfit',
|
||||
'default' => true,
|
||||
],
|
||||
'characters_creation_date' => [
|
||||
'name' => 'Display Creation Date',
|
||||
'type' => 'boolean',
|
||||
'desc' => 'Show characters date of creation',
|
||||
'default' => true,
|
||||
],
|
||||
'characters_quests' => [
|
||||
'name' => 'Display Quests',
|
||||
'type' => 'boolean',
|
||||
'desc' => 'Show characters quests. Can be configured below',
|
||||
'default' => true,
|
||||
],
|
||||
'quests' => [
|
||||
'name' => 'Quests List',
|
||||
'type' => 'textarea',
|
||||
'desc' => 'Character Quests List. Format: NameOfQuest=StorageValue',
|
||||
'default' => "Some Quest=123\nSome Quest Two=456",
|
||||
'show_if' => [
|
||||
'characters_quests', '=', 'true'
|
||||
],
|
||||
'callbacks' => [
|
||||
'get' => function ($value) {
|
||||
$ret = [];
|
||||
$quests = array_map('trim', preg_split('/\r\n|\r|\n/', trim($value)));
|
||||
|
||||
foreach ($quests as $quest) {
|
||||
if (empty($quest)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$explode = explode('=', $quest);
|
||||
$ret[$explode[0]] = $explode[1];
|
||||
}
|
||||
|
||||
return $ret;
|
||||
},
|
||||
],
|
||||
],
|
||||
'characters_skills' => [
|
||||
'name' => 'Display Skills',
|
||||
'type' => 'boolean',
|
||||
'desc' => 'Show characters skills',
|
||||
'default' => true,
|
||||
],
|
||||
'characters_equipment' => [
|
||||
'name' => 'Display Equipment',
|
||||
'type' => 'boolean',
|
||||
'desc' => 'Show characters equipment',
|
||||
'default' => true,
|
||||
],
|
||||
'characters_frags' => [
|
||||
'name' => 'Display Frags',
|
||||
'type' => 'boolean',
|
||||
'desc' => 'Show characters frags',
|
||||
'default' => false,
|
||||
],
|
||||
'characters_deleted' => [
|
||||
'name' => 'Display Deleted',
|
||||
'type' => 'boolean',
|
||||
'desc' => 'Should deleted characters from same account be still listed on the list of characters? When enabled it will show that character is "[DELETED]',
|
||||
'default' => false,
|
||||
],
|
||||
[
|
||||
'type' => 'section',
|
||||
'title' => 'Online Page'
|
||||
@ -1192,7 +1390,7 @@ Sent by MyAAC,<br/>
|
||||
'monsters_images_preview' => [
|
||||
'name' => 'Monsters Images Preview',
|
||||
'type' => 'boolean',
|
||||
'desc' => 'Set to true to allow picture previews for creatures',
|
||||
'desc' => 'Set to yes to allow picture previews for creatures',
|
||||
'default' => false,
|
||||
],
|
||||
'monsters_items_url' => [
|
||||
@ -1204,7 +1402,7 @@ Sent by MyAAC,<br/>
|
||||
'monsters_loot_percentage' => [
|
||||
'name' => 'Monsters Items URL',
|
||||
'type' => 'boolean',
|
||||
'desc' => 'Set to true to show the loot tooltip percent',
|
||||
'desc' => 'Set to yes to show the loot tooltip percent',
|
||||
'default' => true,
|
||||
],
|
||||
// this is hidden, because no implemented yet
|
||||
|
@ -18,6 +18,11 @@
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<style>
|
||||
.setting-default {
|
||||
white-space: pre-wrap;
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
function doShowHide(el, show)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user