mirror of
https://github.com/slawkens/myaac.git
synced 2025-04-26 09:19:22 +02:00
Reviewed some settings again, fixing many glitches
This commit is contained in:
parent
3ef53aff6c
commit
0746708743
@ -16,7 +16,7 @@ $title = 'Account editor';
|
||||
$admin_base = ADMIN_URL . '?p=accounts';
|
||||
$use_datatable = true;
|
||||
|
||||
if ($config['account_country'])
|
||||
if (setting('core.account_country'))
|
||||
require SYSTEM . 'countries.conf.php';
|
||||
|
||||
$nameOrNumberColumn = 'name';
|
||||
@ -30,7 +30,7 @@ $hasPointsColumn = $db->hasColumn('accounts', 'premium_points');
|
||||
$hasTypeColumn = $db->hasColumn('accounts', 'type');
|
||||
$hasGroupColumn = $db->hasColumn('accounts', 'group_id');
|
||||
|
||||
if ($config['account_country']) {
|
||||
if (setting('core.account_country')) {
|
||||
$countries = array();
|
||||
foreach (array('pl', 'se', 'br', 'us', 'gb') as $c)
|
||||
$countries[$c] = $config['countries'][$c];
|
||||
|
@ -54,7 +54,7 @@ if (!empty($mail_content) && !empty($mail_subject) && empty($mail_to)) {
|
||||
$failed = 0;
|
||||
|
||||
$add = '';
|
||||
if (config('account_mail_verify')) {
|
||||
if (setting('core.account_mail_verify')) {
|
||||
note('Note: Sending only to users with verified E-Mail.');
|
||||
$add = ' AND `email_verified` = 1';
|
||||
}
|
||||
|
@ -569,7 +569,7 @@ else if (isset($_REQUEST['search'])) {
|
||||
<?php } ?>
|
||||
</div>
|
||||
<div class="tab-pane fade" id="tabs-pos">
|
||||
<?php $outfit = $config['outfit_images_url'] . '?id=' . $player->getLookType() . ($hasLookAddons ? '&addons=' . $player->getLookAddons() : '') . '&head=' . $player->getLookHead() . '&body=' . $player->getLookBody() . '&legs=' . $player->getLookLegs() . '&feet=' . $player->getLookFeet(); ?>
|
||||
<?php $outfit = setting('core.outfit_images_url') . '?id=' . $player->getLookType() . ($hasLookAddons ? '&addons=' . $player->getLookAddons() : '') . '&head=' . $player->getLookHead() . '&body=' . $player->getLookBody() . '&legs=' . $player->getLookLegs() . '&feet=' . $player->getLookFeet(); ?>
|
||||
<div id="imgchar" style="width:64px;height:64px;position:absolute; top:30px; right:30px">
|
||||
<img id="player_outfit" style="margin-left:0;margin-top:0;width:64px;height:64px;" src="<?php echo $outfit; ?>" alt="player outfit"/>
|
||||
</div>
|
||||
@ -858,7 +858,7 @@ else if (isset($_REQUEST['search'])) {
|
||||
<?php if($hasLookAddons): ?>
|
||||
look_addons = '&addons=' + $('#look_addons').val();
|
||||
<?php endif; ?>
|
||||
$("#player_outfit").attr("src", '<?= $config['outfit_images_url']; ?>?id=' + look_type + look_addons + '&head=' + look_head + '&body=' + look_body + '&legs=' + look_legs + '&feet=' + look_feet);
|
||||
$("#player_outfit").attr("src", '<?= setting('core.outfit_images_url'); ?>?id=' + look_type + look_addons + '&head=' + look_head + '&body=' + look_body + '&legs=' + look_legs + '&feet=' + look_feet);
|
||||
}
|
||||
</script>
|
||||
<?php } ?>
|
||||
|
@ -1,3 +1,3 @@
|
||||
To play on {{ config.lua.serverName }} you need an account.
|
||||
All you have to do to create your new account is to enter an account {% if constant('USE_ACCOUNT_NAME') %}name{% else %}number{% endif %}, password{% if config.account_country %}, country{% endif %} and your email address.
|
||||
All you have to do to create your new account is to enter an account {% if constant('USE_ACCOUNT_NAME') %}name{% else %}number{% endif %}, password{% if setting('core.account_country') %}, country{% endif %} and your email address.
|
||||
Also you have to agree to the terms presented below. If you have done so, your account {% if constant('USE_ACCOUNT_NAME') %}name{% else %}number{% endif %} will be shown on the following page and your account password will be sent to your email address along with further instructions. If you do not receive the email with your password, please check your spam filter.<br/><br/>
|
||||
|
@ -1,33 +1,37 @@
|
||||
<?php
|
||||
defined('MYAAC') or die('Direct access not allowed!');
|
||||
|
||||
$reward = config('account_mail_confirmed_reward');
|
||||
$reward = setting('core.account_mail_confirmed_reward');
|
||||
|
||||
$hasCoinsColumn = $db->hasColumn('accounts', 'coins');
|
||||
if ($reward['coins'] > 0 && $hasCoinsColumn) {
|
||||
log_append('email_confirm_error.log', 'accounts.coins column does not exist.');
|
||||
$rewardCoins = setting('core.account_mail_confirmed_reward_coins');
|
||||
if ($rewardCoins > 0 && !$hasCoinsColumn) {
|
||||
log_append('error.log', 'email_confirm: accounts.coins column does not exist.');
|
||||
}
|
||||
|
||||
if (!isset($account) || !$account->isLoaded()) {
|
||||
log_append('email_confirm_error.log', 'Account not loaded.');
|
||||
return;
|
||||
}
|
||||
|
||||
if ($reward['premium_points'] > 0) {
|
||||
$account->setCustomField('premium_points', (int)$account->getCustomField('premium_points') + $reward['premium_points']);
|
||||
$rewardMessage = 'You received %d %s for confirming your E-Mail address.';
|
||||
|
||||
success(sprintf($reward['message'], $reward['premium_points'], 'premium points'));
|
||||
$rewardPremiumPoints = setting('core.account_mail_confirmed_reward_premium_points');
|
||||
if ($rewardPremiumPoints > 0) {
|
||||
$account->setCustomField('premium_points', (int)$account->getCustomField('premium_points') + $rewardPremiumPoints);
|
||||
|
||||
success(sprintf($rewardMessage, $rewardPremiumPoints, 'premium points'));
|
||||
}
|
||||
|
||||
if ($reward['coins'] > 0 && $hasCoinsColumn) {
|
||||
$account->setCustomField('coins', (int)$account->getCustomField('coins') + $reward['coins']);
|
||||
if ($rewardCoins > 0 && $hasCoinsColumn) {
|
||||
$account->setCustomField('coins', (int)$account->getCustomField('coins') + $rewardCoins);
|
||||
|
||||
success(sprintf($reward['message'], $reward['coins'], 'coins'));
|
||||
success(sprintf($rewardMessage, $rewardCoins, 'coins'));
|
||||
}
|
||||
|
||||
if ($reward['premium_days'] > 0) {
|
||||
$account->setPremDays($account->getPremDays() + $reward['premium_days']);
|
||||
$rewardPremiumDays = setting('core.account_mail_confirmed_reward_premium_days');
|
||||
if ($rewardPremiumDays > 0) {
|
||||
$account->setPremDays($account->getPremDays() + $rewardPremiumDays);
|
||||
$account->save();
|
||||
|
||||
success(sprintf($reward['message'], $reward['premium_days'], 'premium days'));
|
||||
success(sprintf($rewardMessage, $rewardPremiumDays, 'premium days'));
|
||||
}
|
||||
|
@ -68,10 +68,12 @@ $deprecatedConfig = [
|
||||
'status_ip',
|
||||
'status_port',
|
||||
'mail_enabled',
|
||||
'mail_address',
|
||||
'account_login_by_email',
|
||||
'account_login_by_email_fallback',
|
||||
'account_mail_verify',
|
||||
'account_mail_unique',
|
||||
'account_mail_change',
|
||||
'account_premium_days',
|
||||
'account_premium_points',
|
||||
'account_create_character_create',
|
||||
|
@ -151,8 +151,7 @@ function getItemImage($id, $count = 1)
|
||||
if($count > 1)
|
||||
$file_name .= '-' . $count;
|
||||
|
||||
global $config;
|
||||
return '<img src="' . $config['item_images_url'] . $file_name . config('item_images_extension') . '"' . $tooltip . ' width="32" height="32" border="0" alt="' .$id . '" />';
|
||||
return '<img src="' . setting('core.item_images_url') . $file_name . setting('core.item_images_extension') . '"' . $tooltip . ' width="32" height="32" border="0" alt="' .$id . '" />';
|
||||
}
|
||||
|
||||
function getItemRarity($chance) {
|
||||
@ -490,8 +489,8 @@ function template_place_holder($type): string
|
||||
*/
|
||||
function template_header($is_admin = false): string
|
||||
{
|
||||
global $title_full, $config, $twig;
|
||||
$charset = $config['charset'] ?? 'utf-8';
|
||||
global $title_full, $twig;
|
||||
$charset = setting('core.charset') ?? 'utf-8';
|
||||
|
||||
return $twig->render('templates.header.html.twig',
|
||||
[
|
||||
@ -1036,14 +1035,14 @@ function get_browser_real_ip() {
|
||||
return '0';
|
||||
}
|
||||
function setSession($key, $data) {
|
||||
$_SESSION[config('session_prefix') . $key] = $data;
|
||||
$_SESSION[setting('core.session_prefix') . $key] = $data;
|
||||
}
|
||||
function getSession($key) {
|
||||
$key = config('session_prefix') . $key;
|
||||
$key = setting('core.session_prefix') . $key;
|
||||
return isset($_SESSION[$key]) ? $_SESSION[$key] : false;
|
||||
}
|
||||
function unsetSession($key) {
|
||||
unset($_SESSION[config('session_prefix') . $key]);
|
||||
unset($_SESSION[setting('core.session_prefix') . $key]);
|
||||
}
|
||||
|
||||
function getTopPlayers($limit = 5) {
|
||||
@ -1270,7 +1269,7 @@ function getCustomPage($name, &$success): string
|
||||
set_error_handler('error_handler');
|
||||
|
||||
global $config;
|
||||
if($config['backward_support']) {
|
||||
if(setting('core.backward_support')) {
|
||||
global $SQL, $main_content, $subtopic;
|
||||
}
|
||||
|
||||
@ -1527,8 +1526,8 @@ function right($str, $length) {
|
||||
}
|
||||
|
||||
function getCreatureImgPath($creature){
|
||||
$creature_path = config('monsters_images_url');
|
||||
$creature_gfx_name = trim(strtolower($creature)) . config('monsters_images_extension');
|
||||
$creature_path = setting('core.monsters_images_url');
|
||||
$creature_gfx_name = trim(strtolower($creature)) . setting('core.monsters_images_extension');
|
||||
if (!file_exists($creature_path . $creature_gfx_name)) {
|
||||
$creature_gfx_name = str_replace(" ", "", $creature_gfx_name);
|
||||
if (file_exists($creature_path . $creature_gfx_name)) {
|
||||
|
@ -137,7 +137,12 @@ require_once SYSTEM . 'compat/config.php';
|
||||
|
||||
date_default_timezone_set(setting('core.date_timezone'));
|
||||
|
||||
$config['account_create_character_create'] = config('account_create_character_create') && (!setting('core.mail_enabled') || !config('account_mail_verify'));
|
||||
setting(
|
||||
[
|
||||
'core.account_create_character_create',
|
||||
setting('core.account_create_character_create') && (!setting('core.mail_enabled') || !setting('core.account_mail_verify'))
|
||||
]
|
||||
);
|
||||
|
||||
$settingsItemImagesURL = setting('core.item_images_url');
|
||||
if($settingsItemImagesURL[strlen($settingsItemImagesURL) - 1] !== '/') {
|
||||
|
@ -140,8 +140,8 @@ class CreateCharacter
|
||||
if(empty($errors))
|
||||
{
|
||||
$number_of_players_on_account = $account->getPlayersList(true)->count();
|
||||
if($number_of_players_on_account >= config('characters_per_account'))
|
||||
$errors[] = 'You have too many characters on your account <b>('.$number_of_players_on_account.'/'.config('characters_per_account').')</b>!';
|
||||
if($number_of_players_on_account >= setting('core.characters_per_account'))
|
||||
$errors[] = 'You have too many characters on your account <b>('.$number_of_players_on_account . '/' . setting('core.characters_per_account') . ')</b>!';
|
||||
}
|
||||
|
||||
if(empty($errors))
|
||||
|
@ -10,13 +10,13 @@
|
||||
*/
|
||||
defined('MYAAC') or die('Direct access not allowed!');
|
||||
|
||||
$configForumTablePrefix = setting('core.forum_table_prefix');
|
||||
if(null !== $configForumTablePrefix && !empty(trim($configForumTablePrefix))) {
|
||||
if(!in_array($configForumTablePrefix, array('myaac_', 'z_'))) {
|
||||
$settingForumTablePrefix = setting('core.forum_table_prefix');
|
||||
if(null !== $settingForumTablePrefix && !empty(trim($settingForumTablePrefix))) {
|
||||
if(!in_array($settingForumTablePrefix, array('myaac_', 'z_'))) {
|
||||
throw new RuntimeException('Invalid value for forum_table_prefix in config.php. Can be only: "myaac_" or "z_".');
|
||||
}
|
||||
|
||||
define('FORUM_TABLE_PREFIX', $configForumTablePrefix);
|
||||
define('FORUM_TABLE_PREFIX', $settingForumTablePrefix);
|
||||
}
|
||||
else {
|
||||
if($db->hasTable('z_forum')) {
|
||||
|
@ -106,8 +106,8 @@ WHERE TABLE_SCHEMA = "' . $config['database_name'] . '";');
|
||||
}
|
||||
$ret['templates'] = get_templates();
|
||||
|
||||
$ret['date_timezone'] = $config['date_timezone'];
|
||||
$ret['backward_support'] = $config['backward_support'];
|
||||
$ret['date_timezone'] = setting('core.date_timezone');
|
||||
$ret['backward_support'] = setting('core.backward_support');
|
||||
|
||||
$cache_engine = strtolower($config['cache_engine']);
|
||||
if($cache_engine == 'auto') {
|
||||
@ -117,4 +117,4 @@ WHERE TABLE_SCHEMA = "' . $config['database_name'] . '";');
|
||||
$ret['cache_engine'] = $cache_engine;
|
||||
return $ret;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -43,7 +43,7 @@ if($email_new_time < 10) {
|
||||
}
|
||||
|
||||
if(empty($errors)) {
|
||||
$email_new_time = time() + $config['account_mail_change'] * 24 * 3600;
|
||||
$email_new_time = time() + setting('account_mail_change') * 24 * 3600;
|
||||
$account_logged->setCustomField("email_new", $email_new);
|
||||
$account_logged->setCustomField("email_new_time", $email_new_time);
|
||||
$twig->display('success.html.twig', array(
|
||||
|
@ -20,7 +20,7 @@ if(!$logged) {
|
||||
return;
|
||||
}
|
||||
|
||||
if($config['account_country'])
|
||||
if(setting('core.account_country'))
|
||||
require SYSTEM . 'countries.conf.php';
|
||||
|
||||
$account = Account::find($account_logged->getId());
|
||||
@ -55,7 +55,7 @@ if(isset($_POST['changeinfosave']) && $_POST['changeinfosave'] == 1) {
|
||||
if($show_form) {
|
||||
$account_rlname = $account->rlname;
|
||||
$account_location = $account->location;
|
||||
if ($config['account_country']) {
|
||||
if (setting('core.account_country')) {
|
||||
$account_country = $account->country;
|
||||
|
||||
$countries = array();
|
||||
|
@ -11,7 +11,7 @@
|
||||
defined('MYAAC') or die('Direct access not allowed!');
|
||||
$title = 'Create Account';
|
||||
|
||||
if($config['account_country'])
|
||||
if (setting('core.account_country'))
|
||||
require SYSTEM . 'countries.conf.php';
|
||||
|
||||
if($logged)
|
||||
@ -20,7 +20,7 @@ if($logged)
|
||||
return;
|
||||
}
|
||||
|
||||
if(config('account_create_character_create')) {
|
||||
if(setting('core.account_create_character_create')) {
|
||||
require_once LIBS . 'CreateCharacter.php';
|
||||
$createCharacter = new CreateCharacter();
|
||||
}
|
||||
@ -68,7 +68,7 @@ if($save)
|
||||
|
||||
// country
|
||||
$country = '';
|
||||
if($config['account_country'])
|
||||
if (setting('core.account_country'))
|
||||
{
|
||||
$country = $_POST['country'];
|
||||
if(!isset($country))
|
||||
@ -93,7 +93,7 @@ if($save)
|
||||
$errors['password'] = 'Password may not be the same as account name.';
|
||||
}
|
||||
|
||||
if($config['account_mail_unique'])
|
||||
if(setting('core.account_mail_unique'))
|
||||
{
|
||||
$test_email_account = new OTS_Account();
|
||||
$test_email_account->findByEMail($email);
|
||||
@ -115,7 +115,7 @@ if($save)
|
||||
}
|
||||
|
||||
if($account_db->isLoaded()) {
|
||||
if (config('account_login_by_email') && !config('account_mail_unique')) {
|
||||
if (config('account_login_by_email') && !setting('core.account_mail_unique')) {
|
||||
$errors['account'] = 'Account with this email already exist.';
|
||||
}
|
||||
else if (!config('account_login_by_email')) {
|
||||
@ -150,7 +150,7 @@ if($save)
|
||||
return;
|
||||
}
|
||||
|
||||
if(config('account_create_character_create')) {
|
||||
if(setting('core.account_create_character_create')) {
|
||||
$character_name = isset($_POST['name']) ? stripslashes(ucwords(strtolower($_POST['name']))) : null;
|
||||
$character_sex = isset($_POST['sex']) ? (int)$_POST['sex'] : null;
|
||||
$character_vocation = isset($_POST['vocation']) ? (int)$_POST['vocation'] : null;
|
||||
@ -191,27 +191,28 @@ if($save)
|
||||
$new_account->setCustomField('created', time());
|
||||
$new_account->logAction('Account created.');
|
||||
|
||||
if($config['account_country']) {
|
||||
if(setting('core.account_country')) {
|
||||
$new_account->setCustomField('country', $country);
|
||||
}
|
||||
|
||||
if($config['account_premium_days'] && $config['account_premium_days'] > 0) {
|
||||
$settingAccountPremiumDays = setting('core.account_premium_days');
|
||||
if($settingAccountPremiumDays && $settingAccountPremiumDays > 0) {
|
||||
if($db->hasColumn('accounts', 'premend')) { // othire
|
||||
$new_account->setCustomField('premend', time() + $config['account_premium_days'] * 86400);
|
||||
$new_account->setCustomField('premend', time() + $settingAccountPremiumDays * 86400);
|
||||
}
|
||||
else { // rest
|
||||
if ($db->hasColumn('accounts', 'premium_ends_at')) { // TFS 1.4+
|
||||
$new_account->setCustomField('premium_ends_at', time() + $config['account_premium_days'] * (60 * 60 * 24));
|
||||
$new_account->setCustomField('premium_ends_at', time() + $settingAccountPremiumDays * (60 * 60 * 24));
|
||||
}
|
||||
else {
|
||||
$new_account->setCustomField('premdays', $config['account_premium_days']);
|
||||
$new_account->setCustomField('premdays', $settingAccountPremiumDays);
|
||||
$new_account->setCustomField('lastday', time());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if($config['account_premium_points']) {
|
||||
$new_account->setCustomField('premium_points', $config['account_premium_points']);
|
||||
if(setting('account_premium_points') && setting('account_premium_points') > 0) {
|
||||
$new_account->setCustomField('premium_points', setting('account_premium_points'));
|
||||
}
|
||||
|
||||
$tmp_account = $email;
|
||||
@ -219,7 +220,7 @@ if($save)
|
||||
$tmp_account = (USE_ACCOUNT_NAME ? $account_name : $account_id);
|
||||
}
|
||||
|
||||
if(setting('core.mail_enabled') && $config['account_mail_verify'])
|
||||
if(setting('core.mail_enabled') && setting('core.account_mail_verify'))
|
||||
{
|
||||
$hash = md5(generateRandomString(16, true, true) . $email);
|
||||
$new_account->setCustomField('email_hash', $hash);
|
||||
@ -238,7 +239,7 @@ if($save)
|
||||
'description' => 'Your account ' . $account_type . ' is <b>' . $tmp_account . '</b><br/>You will need the account ' . $account_type . ' and your password to play on ' . configLua('serverName') . '.
|
||||
Please keep your account ' . $account_type . ' and password in a safe place and
|
||||
never give your account ' . $account_type . ' or password to anybody.',
|
||||
'custom_buttons' => config('account_create_character_create') ? '' : null
|
||||
'custom_buttons' => setting('core.account_create_character_create') ? '' : null
|
||||
));
|
||||
}
|
||||
else
|
||||
@ -249,7 +250,7 @@ if($save)
|
||||
}
|
||||
else
|
||||
{
|
||||
if(config('account_create_character_create')) {
|
||||
if(setting('core.account_create_character_create')) {
|
||||
// character creation
|
||||
$character_created = $createCharacter->doCreate($character_name, $character_sex, $character_vocation, $character_town, $new_account, $errors);
|
||||
if (!$character_created) {
|
||||
@ -258,7 +259,7 @@ if($save)
|
||||
}
|
||||
}
|
||||
|
||||
if(config('account_create_auto_login')) {
|
||||
if(setting('core.account_create_auto_login')) {
|
||||
if ($hasBeenCreatedByEMail) {
|
||||
$_POST['account_login'] = $email;
|
||||
}
|
||||
@ -273,7 +274,7 @@ if($save)
|
||||
}
|
||||
|
||||
echo 'Your account';
|
||||
if(config('account_create_character_create')) {
|
||||
if(setting('core.account_create_character_create')) {
|
||||
echo ' and character have';
|
||||
}
|
||||
else {
|
||||
@ -281,7 +282,7 @@ if($save)
|
||||
}
|
||||
|
||||
echo ' been created.';
|
||||
if(!config('account_create_character_create')) {
|
||||
if(!setting('core.account_create_character_create')) {
|
||||
echo ' Now you can login and create your first character.';
|
||||
}
|
||||
|
||||
@ -291,10 +292,10 @@ if($save)
|
||||
'description' => 'Your account ' . $account_type . ' is <b>' . $tmp_account . '</b><br/>You will need the account ' . $account_type . ' and your password to play on ' . configLua('serverName') . '.
|
||||
Please keep your account ' . $account_type . ' and password in a safe place and
|
||||
never give your account ' . $account_type . ' or password to anybody.',
|
||||
'custom_buttons' => config('account_create_character_create') ? '' : null
|
||||
'custom_buttons' => setting('core.account_create_character_create') ? '' : null
|
||||
));
|
||||
|
||||
if(setting('core.mail_enabled') && $config['account_welcome_mail'])
|
||||
if(setting('core.mail_enabled') && setting('account_welcome_mail'))
|
||||
{
|
||||
$mailBody = $twig->render('account.welcome_mail.html.twig', array(
|
||||
'account' => $tmp_account
|
||||
@ -330,7 +331,7 @@ if(setting('core.account_country_recognize')) {
|
||||
if(!empty($errors))
|
||||
$twig->display('error_box.html.twig', array('errors' => $errors));
|
||||
|
||||
if($config['account_country']) {
|
||||
if (setting('core.account_country')) {
|
||||
$countries = array();
|
||||
foreach (array('pl', 'se', 'br', 'us', 'gb') as $c)
|
||||
$countries[$c] = $config['countries'][$c];
|
||||
@ -353,7 +354,7 @@ $params = array(
|
||||
'save' => $save
|
||||
);
|
||||
|
||||
if($save && config('account_create_character_create')) {
|
||||
if($save && setting('core.account_create_character_create')) {
|
||||
$params = array_merge($params, array(
|
||||
'name' => $character_name,
|
||||
'sex' => $character_sex,
|
||||
|
@ -77,10 +77,10 @@ if($player->isLoaded() && !$player->isDeleted())
|
||||
$rows = 0;
|
||||
|
||||
if($config['characters']['outfit'])
|
||||
$outfit = $config['outfit_images_url'] . '?id=' . $player->getLookType() . ($db->hasColumn('players', 'lookaddons') ? '&addons=' . $player->getLookAddons() : '') . '&head=' . $player->getLookHead() . '&body=' . $player->getLookBody() . '&legs=' . $player->getLookLegs() . '&feet=' . $player->getLookFeet();
|
||||
$outfit = setting('core.outfit_images_url') . '?id=' . $player->getLookType() . ($db->hasColumn('players', 'lookaddons') ? '&addons=' . $player->getLookAddons() : '') . '&head=' . $player->getLookHead() . '&body=' . $player->getLookBody() . '&legs=' . $player->getLookLegs() . '&feet=' . $player->getLookFeet();
|
||||
|
||||
$flag = '';
|
||||
if($config['account_country']) {
|
||||
if(setting('core.account_country')) {
|
||||
$flag = getFlagImage($account->getCountry());
|
||||
}
|
||||
|
||||
@ -423,7 +423,7 @@ WHERE killers.death_id = '".$death['id']."' ORDER BY killers.final_hit DESC, kil
|
||||
if($db->hasColumn('players', 'deletion'))
|
||||
$deleted = 'deletion';
|
||||
|
||||
$query = $db->query('SELECT `name`, `level`, `vocation`' . $promotion . ' FROM `players` WHERE `name` LIKE ' . $db->quote('%' . $name . '%') . ' AND ' . $deleted . ' != 1 LIMIT ' . (int)config('characters_search_limit') . ';');
|
||||
$query = $db->query('SELECT `name`, `level`, `vocation`' . $promotion . ' FROM `players` WHERE `name` LIKE ' . $db->quote('%' . $name . '%') . ' AND ' . $deleted . ' != 1 LIMIT ' . (int)setting('core.characters_search_limit') . ';');
|
||||
if($query->rowCount() > 0) {
|
||||
echo 'Did you mean:<ul>';
|
||||
foreach($query as $player) {
|
||||
|
@ -17,7 +17,7 @@ $title = 'Creatures';
|
||||
|
||||
if (empty($_REQUEST['name'])) {
|
||||
// display list of monsters
|
||||
$preview = config('monsters_images_preview');
|
||||
$preview = setting('core.monsters_images_preview');
|
||||
$creatures = Monster::where('hidden', '!=', 1)->when(!empty($_REQUEST['boss']), function ($query) {
|
||||
$query->where('rewardboss', 1);
|
||||
})->get()->toArray();
|
||||
@ -65,7 +65,7 @@ if (isset($creature['name'])) {
|
||||
$item['name'] = getItemNameById($item['id']);
|
||||
$item['rarity_chance'] = round($item['chance'] / 1000, 2);
|
||||
$item['rarity'] = getItemRarity($item['chance']);
|
||||
$item['tooltip'] = ucfirst($item['name']) . '<br/>Chance: ' . $item['rarity'] . (config('monsters_loot_percentage') ? ' ('. $item['rarity_chance'] .'%)' : '') . '<br/>Max count: ' . $item['count'];
|
||||
$item['tooltip'] = ucfirst($item['name']) . '<br/>Chance: ' . $item['rarity'] . (setting('core.monsters_loot_percentage') ? ' ('. $item['rarity_chance'] .'%)' : '') . '<br/>Max count: ' . $item['count'];
|
||||
}
|
||||
|
||||
$creature['loot'] = isset($loot) ? $loot : null;
|
||||
|
@ -57,7 +57,7 @@ foreach($posts as &$post) {
|
||||
}
|
||||
|
||||
if($config['characters']['outfit']) {
|
||||
$post['outfit'] = $config['outfit_images_url'] . '?id=' . $player->getLookType() . ($lookaddons ? '&addons=' . $player->getLookAddons() : '') . '&head=' . $player->getLookHead() . '&body=' . $player->getLookBody() . '&legs=' . $player->getLookLegs() . '&feet=' . $player->getLookFeet();
|
||||
$post['outfit'] = setting('core.outfit_images_url') . '?id=' . $player->getLookType() . ($lookaddons ? '&addons=' . $player->getLookAddons() : '') . '&head=' . $player->getLookHead() . '&body=' . $player->getLookBody() . '&legs=' . $player->getLookLegs() . '&feet=' . $player->getLookFeet();
|
||||
}
|
||||
|
||||
$groupName = '';
|
||||
|
@ -43,7 +43,7 @@ if(empty($errors)) {
|
||||
$saved = false;
|
||||
if($guild_leader) {
|
||||
if(isset($_REQUEST['todo']) && $_REQUEST['todo'] == 'save') {
|
||||
$description = htmlspecialchars(stripslashes(substr(trim($_REQUEST['description']),0,$config['guild_description_chars_limit'])));
|
||||
$description = htmlspecialchars(stripslashes(substr(trim($_REQUEST['description']),0, setting('core.guild_description_chars_limit'))));
|
||||
$guild->setCustomField('description', $description);
|
||||
$saved = true;
|
||||
}
|
||||
|
@ -42,7 +42,7 @@ if(empty($errors)) {
|
||||
|
||||
if($guild_leader)
|
||||
{
|
||||
$max_image_size_b = $config['guild_image_size_kb'] * 1024;
|
||||
$max_image_size_b = setting('core.guild_image_size_kb') * 1024;
|
||||
$allowed_ext = array('image/gif', 'image/jpg', 'image/pjpeg', 'image/jpeg', 'image/bmp', 'image/png', 'image/x-png');
|
||||
$ext_name = array('image/gif' => 'gif', 'image/jpg' => 'jpg', 'image/jpeg' => 'jpg', 'image/pjpeg' => 'jpg', 'image/bmp' => 'bmp', 'image/png' => 'png', 'image/x-png' => 'png');
|
||||
$save_file_name = str_replace(' ', '_', strtolower($guild->getName()));
|
||||
@ -62,7 +62,7 @@ if(empty($errors)) {
|
||||
}
|
||||
}
|
||||
else {
|
||||
$upload_errors[] = 'You didn\'t send file or file is too big. Limit: <b>'.$config['guild_image_size_kb'].' KB</b>.';
|
||||
$upload_errors[] = 'You didn\'t send file or file is too big. Limit: <b>'.setting('core.guild_image_size_kb').' KB</b>.';
|
||||
}
|
||||
|
||||
if(empty($upload_errors)) {
|
||||
|
@ -46,7 +46,7 @@ if(empty($errors)) {
|
||||
$saved = false;
|
||||
if($guild_leader) {
|
||||
if(isset($_REQUEST['todo']) && $_REQUEST['todo'] == 'save') {
|
||||
$motd = htmlspecialchars(stripslashes(substr($_REQUEST['motd'],0, $config['guild_motd_chars_limit'])));
|
||||
$motd = htmlspecialchars(stripslashes(substr($_REQUEST['motd'],0, setting('core.guild_motd_chars_limit'))));
|
||||
$guild->setCustomField('motd', $motd);
|
||||
$saved = true;
|
||||
}
|
||||
|
@ -28,8 +28,8 @@ if(empty($guild_errors))
|
||||
$player_rank = $player->getRank();
|
||||
if(!$player_rank->isLoaded())
|
||||
{
|
||||
if($player->getLevel() >= $config['guild_need_level']) {
|
||||
if(!$config['guild_need_premium'] || $account_logged->isPremium()) {
|
||||
if($player->getLevel() >= setting('core.guild_need_level')) {
|
||||
if(!setting('core.guild_need_premium') || $account_logged->isPremium()) {
|
||||
$array_of_player_nig[] = $player->getName();
|
||||
}
|
||||
}
|
||||
@ -39,7 +39,7 @@ if(empty($guild_errors))
|
||||
|
||||
if(empty($todo)) {
|
||||
if(count($array_of_player_nig) == 0) {
|
||||
$guild_errors[] = 'On your account all characters are in guilds, have too low level to create new guild' . ($config['guild_need_premium'] ? ' or you don\' have a premium account' : '') . '.';
|
||||
$guild_errors[] = 'On your account all characters are in guilds, have too low level to create new guild' . (setting('core.guild_need_premium') ? ' or you don\' have a premium account' : '') . '.';
|
||||
}
|
||||
}
|
||||
|
||||
@ -91,10 +91,10 @@ if($todo == 'save')
|
||||
}
|
||||
|
||||
if(empty($guild_errors)) {
|
||||
if($player->getLevel() < $config['guild_need_level']) {
|
||||
$guild_errors[] = 'Character <b>'.$name.'</b> has too low level. To create guild you need character with level <b>'.$config['guild_need_level'].'</b>.';
|
||||
if($player->getLevel() < setting('core.guild_need_level')) {
|
||||
$guild_errors[] = 'Character <b>'.$name.'</b> has too low level. To create guild you need character with level <b>' . setting('core.guild_need_level') . '</b>.';
|
||||
}
|
||||
if($config['guild_need_premium'] && !$account_logged->isPremium()) {
|
||||
if(setting('core.guild_need_premium') && !$account_logged->isPremium()) {
|
||||
$guild_errors[] = 'Character <b>'.$name.'</b> is on FREE account. To create guild you need PREMIUM account.';
|
||||
}
|
||||
}
|
||||
@ -112,7 +112,7 @@ if(isset($todo) && $todo == 'save')
|
||||
$new_guild->setName($guild_name);
|
||||
$new_guild->setOwner($player);
|
||||
$new_guild->save();
|
||||
$new_guild->setCustomField('description', config('guild_description_default'));
|
||||
$new_guild->setCustomField('description', setting('core.guild_description_default'));
|
||||
//$new_guild->setCustomField('creationdata', time());
|
||||
$ranks = $new_guild->getGuildRanksList();
|
||||
$ranks->orderBy('level', POT::ORDER_DESC);
|
||||
|
@ -26,7 +26,7 @@ if(count($guilds_list) > 0)
|
||||
|
||||
$description = $guild->getCustomField('description');
|
||||
$description_with_lines = str_replace(array("\r\n", "\n", "\r"), '<br />', $description, $count);
|
||||
if ($count < $config['guild_description_lines_limit'])
|
||||
if ($count < setting('core.guild_description_lines_limit'))
|
||||
$description = nl2br($description);
|
||||
|
||||
$guildName = $guild->getName();
|
||||
|
@ -85,7 +85,7 @@ if(empty($guild_logo) || !file_exists(GUILD_IMAGES_DIR . $guild_logo))
|
||||
|
||||
$description = $guild->getCustomField('description');
|
||||
$description_with_lines = str_replace(array("\r\n", "\n", "\r"), '<br />', $description, $count);
|
||||
if($count < $config['guild_description_lines_limit'])
|
||||
if($count < setting('core.guild_description_lines_limit'))
|
||||
$description = nl2br($description);
|
||||
//$description = $description_with_lines;
|
||||
|
||||
|
@ -239,7 +239,7 @@ foreach($highscores as $id => &$player)
|
||||
$player['link'] = getPlayerLink($player['name'], false);
|
||||
$player['flag'] = getFlagImage($player['country']);
|
||||
if($settingHighscoresOutfit) {
|
||||
$player['outfit'] = '<img style="position:absolute;margin-top:' . (in_array($player['looktype'], config('outfit_images_wrong_looktypes')) ? '-15px;margin-left:5px' : '-45px;margin-left:-25px') . ';" src="' . config('outfit_images_url') . '?id=' . $player['looktype'] . ($outfit_addons ? '&addons=' . $player['lookaddons'] : '') . '&head=' . $player['lookhead'] . '&body=' . $player['lookbody'] . '&legs=' . $player['looklegs'] . '&feet=' . $player['lookfeet'] . '" alt="" />';
|
||||
$player['outfit'] = '<img style="position:absolute;margin-top:' . (in_array($player['looktype'], setting('core.outfit_images_wrong_looktypes')) ? '-15px;margin-left:5px' : '-45px;margin-left:-25px') . ';" src="' . setting('core.outfit_images_url') . '?id=' . $player['looktype'] . ($outfit_addons ? '&addons=' . $player['lookaddons'] : '') . '&head=' . $player['lookhead'] . '&body=' . $player['lookbody'] . '&legs=' . $player['looklegs'] . '&feet=' . $player['lookfeet'] . '" alt="" />';
|
||||
}
|
||||
$player['rank'] = $offset + $i;
|
||||
}
|
||||
|
@ -21,7 +21,7 @@ if($cache->enabled() && $cache->fetch('last_kills', $tmp)) {
|
||||
else {
|
||||
if($db->hasTable('player_killers')) // tfs 0.3
|
||||
{
|
||||
$players_deaths = $db->query('SELECT `player_deaths`.`id`, `player_deaths`.`date`, `player_deaths`.`level`, `players`.`name`' . ($db->hasColumn('players', 'world_id') ? ', `players`.`world_id`' : '') . ' FROM `player_deaths` LEFT JOIN `players` ON `player_deaths`.`player_id` = `players`.`id` ORDER BY `date` DESC LIMIT 0, ' . $config['last_kills_limit']);
|
||||
$players_deaths = $db->query('SELECT `player_deaths`.`id`, `player_deaths`.`date`, `player_deaths`.`level`, `players`.`name`' . ($db->hasColumn('players', 'world_id') ? ', `players`.`world_id`' : '') . ' FROM `player_deaths` LEFT JOIN `players` ON `player_deaths`.`player_id` = `players`.`id` ORDER BY `date` DESC LIMIT 0, ' . setting('core.last_kills_limit'));
|
||||
|
||||
if(!empty($players_deaths)) {
|
||||
foreach($players_deaths as $death) {
|
||||
@ -82,9 +82,9 @@ else {
|
||||
}
|
||||
}
|
||||
} else {
|
||||
//$players_deaths = $db->query("SELECT `p`.`name` AS `victim`, `player_deaths`.`killed_by` as `killed_by`, `player_deaths`.`time` as `time`, `player_deaths`.`is_player` as `is_player`, `player_deaths`.`level` as `level` FROM `player_deaths`, `players` as `d` INNER JOIN `players` as `p` ON player_deaths.player_id = p.id WHERE player_deaths.`is_player`='1' ORDER BY `time` DESC LIMIT " . $config['last_kills_limit'] . ";");
|
||||
//$players_deaths = $db->query("SELECT `p`.`name` AS `victim`, `player_deaths`.`killed_by` as `killed_by`, `player_deaths`.`time` as `time`, `player_deaths`.`is_player` as `is_player`, `player_deaths`.`level` as `level` FROM `player_deaths`, `players` as `d` INNER JOIN `players` as `p` ON player_deaths.player_id = p.id WHERE player_deaths.`is_player`='1' ORDER BY `time` DESC LIMIT " . setting('core.last_kills_limit') . ";");
|
||||
|
||||
$players_deaths = $db->query("SELECT `p`.`name` AS `victim`, `d`.`killed_by` as `killed_by`, `d`.`time` as `time`, `d`.`level`, `d`.`is_player` FROM `player_deaths` as `d` INNER JOIN `players` as `p` ON d.player_id = p.id ORDER BY `time` DESC LIMIT " . $config['last_kills_limit'] . ";");
|
||||
$players_deaths = $db->query("SELECT `p`.`name` AS `victim`, `d`.`killed_by` as `killed_by`, `d`.`time` as `time`, `d`.`level`, `d`.`is_player` FROM `player_deaths` as `d` INNER JOIN `players` as `p` ON d.player_id = p.id ORDER BY `time` DESC LIMIT " . setting('core.last_kills_limit') . ";");
|
||||
if(!empty($players_deaths)) {
|
||||
foreach($players_deaths as $death) {
|
||||
$players_deaths_count++;
|
||||
@ -114,4 +114,4 @@ else {
|
||||
|
||||
$twig->display('lastkills.html.twig', array(
|
||||
'lastkills' => $last_kills
|
||||
));
|
||||
));
|
||||
|
@ -62,7 +62,7 @@ if(isset($_GET['archive']))
|
||||
'content' => $content_,
|
||||
'date' => $news['date'],
|
||||
'icon' => $categories[$news['category']]['icon_id'],
|
||||
'author' => $config['news_author'] ? $author : '',
|
||||
'author' => setting('core.news_author') ? $author : '',
|
||||
'comments' => $news['comments'] != 0 ? getForumThreadLink($news['comments']) : null,
|
||||
));
|
||||
}
|
||||
@ -116,7 +116,7 @@ if(!$news_cached)
|
||||
);
|
||||
}
|
||||
|
||||
$tickers_db = $db->query('SELECT * FROM `' . TABLE_PREFIX . 'news` WHERE `type` = ' . TICKER .($canEdit ? '' : ' AND `hidden` != 1') .' ORDER BY `date` DESC LIMIT ' . $config['news_ticker_limit']);
|
||||
$tickers_db = $db->query('SELECT * FROM `' . TABLE_PREFIX . 'news` WHERE `type` = ' . TICKER .($canEdit ? '' : ' AND `hidden` != 1') .' ORDER BY `date` DESC LIMIT ' . setting('core.news_ticker_limit'));
|
||||
$tickers_content = '';
|
||||
if($tickers_db->rowCount() > 0)
|
||||
{
|
||||
@ -167,7 +167,7 @@ else {
|
||||
if(!$news_cached)
|
||||
{
|
||||
ob_start();
|
||||
$newses = $db->query('SELECT * FROM ' . $db->tableName(TABLE_PREFIX . 'news') . ' WHERE type = ' . NEWS . ($canEdit ? '' : ' AND hidden != 1') . ' ORDER BY date' . ' DESC LIMIT ' . $config['news_limit']);
|
||||
$newses = $db->query('SELECT * FROM ' . $db->tableName(TABLE_PREFIX . 'news') . ' WHERE type = ' . NEWS . ($canEdit ? '' : ' AND hidden != 1') . ' ORDER BY date' . ' DESC LIMIT ' . setting('core.news_limit'));
|
||||
if($newses->rowCount() > 0)
|
||||
{
|
||||
foreach($newses as $news)
|
||||
@ -211,7 +211,7 @@ if(!$news_cached)
|
||||
'content' => $content_ . $admin_options,
|
||||
'date' => $news['date'],
|
||||
'icon' => $categories[$news['category']]['icon_id'],
|
||||
'author' => $config['news_author'] ? $author : '',
|
||||
'author' => setting('core.news_author') ? $author : '',
|
||||
'comments' => $news['comments'] != 0 ? getForumThreadLink($news['comments']) : null,
|
||||
'hidden'=> $news['hidden']
|
||||
));
|
||||
|
@ -15,7 +15,7 @@ use MyAAC\Models\ServerRecord;
|
||||
defined('MYAAC') or die('Direct access not allowed!');
|
||||
$title = 'Who is online?';
|
||||
|
||||
if($config['account_country'])
|
||||
if (setting('core.account_country'))
|
||||
require SYSTEM . 'countries.conf.php';
|
||||
|
||||
$promotion = '';
|
||||
@ -42,7 +42,7 @@ if($db->hasColumn('players', 'skull_time')) {
|
||||
|
||||
$outfit_addons = false;
|
||||
$outfit = '';
|
||||
if($config['online_outfit']) {
|
||||
if (setting('core.online_outfit')) {
|
||||
$outfit = ', lookbody, lookfeet, lookhead, looklegs, looktype';
|
||||
if($db->hasColumn('players', 'lookaddons')) {
|
||||
$outfit .= ', lookaddons';
|
||||
@ -50,7 +50,7 @@ if($config['online_outfit']) {
|
||||
}
|
||||
}
|
||||
|
||||
if($config['online_vocations']) {
|
||||
if (setting('core.online_vocations')) {
|
||||
$vocs = array();
|
||||
foreach($config['vocations'] as $id => $name) {
|
||||
$vocs[$id] = 0;
|
||||
@ -67,7 +67,7 @@ $players = 0;
|
||||
$data = '';
|
||||
foreach($playersOnline as $player) {
|
||||
$skull = '';
|
||||
if($config['online_skulls'])
|
||||
if (setting('core.online_skulls'))
|
||||
{
|
||||
if($player['skulltime'] > 0)
|
||||
{
|
||||
@ -90,18 +90,18 @@ foreach($playersOnline as $player) {
|
||||
'player' => $player,
|
||||
'level' => $player['level'],
|
||||
'vocation' => $config['vocations'][$player['vocation']],
|
||||
'country_image' => $config['account_country'] ? getFlagImage($player['country']) : null,
|
||||
'outfit' => $config['online_outfit'] ? $config['outfit_images_url'] . '?id=' . $player['looktype'] . ($outfit_addons ? '&addons=' . $player['lookaddons'] : '') . '&head=' . $player['lookhead'] . '&body=' . $player['lookbody'] . '&legs=' . $player['looklegs'] . '&feet=' . $player['lookfeet'] : null
|
||||
'country_image' => setting('core.account_country') ? getFlagImage($player['country']) : null,
|
||||
'outfit' => setting('core.online_outfit') ? setting('core.outfit_images_url') . '?id=' . $player['looktype'] . ($outfit_addons ? '&addons=' . $player['lookaddons'] : '') . '&head=' . $player['lookhead'] . '&body=' . $player['lookbody'] . '&legs=' . $player['looklegs'] . '&feet=' . $player['lookfeet'] : null
|
||||
);
|
||||
|
||||
if($config['online_vocations']) {
|
||||
if (setting('core.online_vocations')) {
|
||||
$vocs[($player['vocation'] > $config['vocations_amount'] ? $player['vocation'] - $config['vocations_amount'] : $player['vocation'])]++;
|
||||
}
|
||||
}
|
||||
|
||||
$record = '';
|
||||
if($players > 0) {
|
||||
if($config['online_record']) {
|
||||
if( setting('core.online_record')) {
|
||||
$result = null;
|
||||
$timestamp = false;
|
||||
if($db->hasTable('server_record')) {
|
||||
|
@ -71,7 +71,7 @@ $twig->display('spells.html.twig', array(
|
||||
'post_vocation_id' => $vocation_id,
|
||||
'post_vocation' => $vocation,
|
||||
'spells' => $spells,
|
||||
'item_path' => $config['item_images_url'],
|
||||
'item_path' => setting('core.item_images_url'),
|
||||
));
|
||||
?>
|
||||
|
||||
|
@ -11,7 +11,7 @@
|
||||
defined('MYAAC') or die('Direct access not allowed!');
|
||||
$title = 'Support in game';
|
||||
|
||||
if($config['account_country'])
|
||||
if(setting('core.account_country'))
|
||||
require SYSTEM . 'countries.conf.php';
|
||||
|
||||
$groups = new OTS_Groups_List();
|
||||
|
@ -170,7 +170,7 @@ if(!empty($page) && preg_match('/^[A-z0-9\-]+$/', $page)) {
|
||||
$_REQUEST['subtopic'] = $_REQUEST['p'];
|
||||
}
|
||||
|
||||
if (config('backward_support')) {
|
||||
if (setting('core.backward_support')) {
|
||||
require SYSTEM . 'compat/pages.php';
|
||||
}
|
||||
|
||||
@ -271,7 +271,7 @@ if($hooks->trigger(HOOK_BEFORE_PAGE)) {
|
||||
|
||||
unset($file);
|
||||
|
||||
if(config('backward_support') && isset($main_content[0]))
|
||||
if(setting('core.backward_support') && isset($main_content[0]))
|
||||
$content .= $main_content;
|
||||
|
||||
$content .= ob_get_contents();
|
||||
@ -282,7 +282,7 @@ if(!isset($title)) {
|
||||
$title = ucfirst($page);
|
||||
}
|
||||
|
||||
if(config('backward_support')) {
|
||||
if(setting('core.backward_support')) {
|
||||
$main_content = $content;
|
||||
$topic = $title;
|
||||
}
|
||||
|
@ -1047,12 +1047,12 @@ Sent by MyAAC,<br/>
|
||||
'desc' => 'Show player outfit?',
|
||||
'default' => true,
|
||||
],
|
||||
'highscores_country_box' => [ // not implemented yet
|
||||
/*'highscores_country_box' => [ // not implemented yet
|
||||
'name' => 'Display Country Box',
|
||||
'type' => 'hidden',
|
||||
'desc' => 'Show player outfit?',
|
||||
'default' => false,
|
||||
],
|
||||
],*/
|
||||
'highscores_groups_hidden' => [
|
||||
'name' => 'Hidden Groups',
|
||||
'type' => 'number',
|
||||
@ -1225,9 +1225,9 @@ Sent by MyAAC,<br/>
|
||||
'team_style' => [
|
||||
'name' => 'Style',
|
||||
'type' => 'options',
|
||||
'desc' => '',
|
||||
'options' => ['normal table', 'in boxes, grouped by group id'],
|
||||
'default' => 1,
|
||||
'desc' => 'How to show groups',
|
||||
'options' => [1 => 'normal table', 2 => 'in boxes, grouped by group id'],
|
||||
'default' => 2,
|
||||
],
|
||||
'team_status' => [
|
||||
'name' => 'Display Online Status',
|
||||
|
@ -125,7 +125,7 @@ function updateStatus() {
|
||||
$status['playersMax'] = $serverStatus->getMaxPlayers();
|
||||
|
||||
// for status afk thing
|
||||
if($config['online_afk'])
|
||||
if (setting('core.online_afk'))
|
||||
{
|
||||
$status['playersTotal'] = 0;
|
||||
// get amount of players that are currently logged in-game, including disconnected clients (exited)
|
||||
|
@ -54,7 +54,7 @@ if(file_exists(BASE . $template_path . '/index.php')) {
|
||||
elseif(file_exists(BASE . $template_path . '/template.php')) {
|
||||
$template_index = 'template.php';
|
||||
}
|
||||
elseif($config['backward_support'] && file_exists(BASE . $template_path . '/layout.php')) {
|
||||
elseif(setting('core.backward_support') && file_exists(BASE . $template_path . '/layout.php')) {
|
||||
$template_index = 'layout.php';
|
||||
}
|
||||
else {
|
||||
@ -77,7 +77,7 @@ if ($cache->enabled() && $cache->fetch('template_ini_' . $template_name, $tmp))
|
||||
else {
|
||||
$file = BASE . $template_path . '/config.ini';
|
||||
$exists = file_exists($file);
|
||||
if ($exists || ($config['backward_support'] && file_exists(BASE . $template_path . '/layout_config.ini'))) {
|
||||
if ($exists || (setting('core.backward_support') && file_exists(BASE . $template_path . '/layout_config.ini'))) {
|
||||
if (!$exists) {
|
||||
$file = BASE . $template_path . '/layout_config.ini';
|
||||
}
|
||||
|
@ -31,7 +31,7 @@ Here you can tell other players about yourself. This information will be display
|
||||
<input name="info_location" value="{{ account_location }}" size="30" maxlength="50" >
|
||||
</td>
|
||||
</tr>
|
||||
{% if config.account_country %}
|
||||
{% if setting('core.account_country') %}
|
||||
<tr>
|
||||
<td class="LabelV" >Country:</td>
|
||||
<td>
|
||||
@ -97,4 +97,4 @@ Here you can tell other players about yourself. This information will be display
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</table>
|
||||
|
@ -1,4 +1,4 @@
|
||||
Please enter your password and the new email address. Make sure that you enter a valid email address which you have access to. <br/><b>For security reasons, the actual change will be finalised after a waiting period of {{ config.account_mail_change }} days.</b><br/><br/>
|
||||
Please enter your password and the new email address. Make sure that you enter a valid email address which you have access to. <br/><b>For security reasons, the actual change will be finalised after a waiting period of {{ setting('core.account_mail_change') }} days.</b><br/><br/>
|
||||
<form action="{{ getLink('account/email') }}" method="post">
|
||||
<div class="TableContainer">
|
||||
<table class="Table1" cellpadding="0" cellspacing="0">
|
||||
@ -67,4 +67,4 @@ Please enter your password and the new email address. Make sure that you enter a
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</table>
|
||||
|
@ -59,13 +59,13 @@
|
||||
<td></td><td><span id="email_error" class="FormFieldError">{% if errors.email is defined %}{{ errors.email }}{% endif %}</span></td>
|
||||
</tr>
|
||||
|
||||
{% if setting('core.mail_enabled') and config.account_mail_verify %}
|
||||
{% if setting('core.mail_enabled') and setting('account_mail_verify') %}
|
||||
<tr><td></td><td><span><strong>Please use real address!<br/>We will send a link to validate your Email.</strong></span></td></tr>
|
||||
{% endif %}
|
||||
|
||||
{{ hook('HOOK_ACCOUNT_CREATE_AFTER_EMAIL') }}
|
||||
|
||||
{% if config.account_country %}
|
||||
{% if setting('core.account_country') %}
|
||||
<tr>
|
||||
<td class="LabelV" style="width: 150px">
|
||||
<span{% if errors.country[0] is defined %} class="red"{% endif %}>Country:</span>
|
||||
@ -122,7 +122,7 @@
|
||||
|
||||
{{ hook('HOOK_ACCOUNT_CREATE_BETWEEN_BOXES_1') }}
|
||||
|
||||
{% if (not setting('core.mail_enabled') or not config.account_mail_verify) and config.account_create_character_create %}
|
||||
{% if (not setting('core.mail_enabled') or not setting('core.account_mail_verify')) and setting('account_create_character_create') %}
|
||||
<tr>
|
||||
<td>
|
||||
<div class="TableShadowContainerRightTop">
|
||||
|
@ -2,7 +2,7 @@ Please choose a name{% if config.character_samples|length > 1 %}, vocation{% end
|
||||
{% if config.character_towns|length > 1 %}, town{% endif %}
|
||||
and sex for your character. <br/>
|
||||
In any case the name must not violate the naming conventions stated in the <a href="?subtopic=rules" target="_blank" >{{ config.lua.serverName }} Rules</a>, or your character might get deleted or name locked.
|
||||
{% if account_logged.getPlayersList(true)|length >= config.characters_per_account %}
|
||||
{% if account_logged.getPlayersList(true)|length >= setting('core.characters_per_account') %}
|
||||
<b><span style="color: red"> You have maximum number of characters per account on your account. Delete one before you make new.</span></b>
|
||||
{% endif %}
|
||||
<br/><br/>
|
||||
|
@ -21,7 +21,7 @@
|
||||
<tr>
|
||||
<td>{{ news.id|raw }}</td>
|
||||
<td><i><a href="?p=news&action=edit&id={{ news.id }}">{{ news.title }}</a></i></td>
|
||||
<td>{{ news.date|date(config.news_date_format) }}</td>
|
||||
<td>{{ news.date|date(setting('core.news_date_format')) }}</td>
|
||||
<td><a target="_blank" rel="noopener noreferrer" href="{{ news.player_link }}">{{ news.player_name }}</a></td>
|
||||
<td>
|
||||
<div class="btn-group">
|
||||
@ -66,7 +66,7 @@
|
||||
<tr>
|
||||
<td>{{ ticker.id|raw }}</td>
|
||||
<td><i><a href="?p=news&action=edit&id={{ ticker.id }}">{{ ticker.title }}</a></i></td>
|
||||
<td>{{ ticker.date|date(config.news_date_format) }}</td>
|
||||
<td>{{ ticker.date|date(setting('core.news_date_format')) }}</td>
|
||||
<td><a target="_blank" rel="noopener noreferrer" href="{{ ticker.player_link }}">{{ ticker.player_name }}</a></td>
|
||||
<td>
|
||||
<div class="btn-group">
|
||||
@ -110,7 +110,7 @@
|
||||
<tr>
|
||||
<td>{{ article.id|raw }}</td>
|
||||
<td><i><a href="?p=news&action=edit&id={{ article.id }}">{{ article.title }}</a></i></td>
|
||||
<td>{{ article.date|date(config.news_date_format) }}</td>
|
||||
<td>{{ article.date|date(setting('core.news_date_format')) }}</td>
|
||||
<td><a target="_blank" rel="noopener noreferrer" href="{{ article.player_link }}">{{ article.player_name }}</a></td>
|
||||
<td>
|
||||
<div class="btn-group">
|
||||
|
@ -17,7 +17,7 @@
|
||||
{% endif %}
|
||||
<table border="0" cellspacing="1" cellpadding="4" width="100%">
|
||||
{% if config.characters.outfit %}
|
||||
<div style="width:64px;height:64px;border:2px solid #F1E0C6; border-radius:50px; padding:13px; margin-top:38px;margin-left:376px;position:absolute;"><img style="margin-left:{% if player.getLookType() in config.outfit_images_wrong_looktypes %}-0px;margin-top:-0px;width:64px;height:64px;{% else %}-60px;margin-top:-60px;width:128px;height:128px;{% endif %}" src="{{ outfit }}" alt="player outfit"/></div>
|
||||
<div style="width:64px;height:64px;border:2px solid #F1E0C6; border-radius:50px; padding:13px; margin-top:38px;margin-left:376px;position:absolute;"><img style="margin-left:{% if player.getLookType() in setting('core.outfit_images_wrong_looktypes') %}-0px;margin-top:-0px;width:64px;height:64px;{% else %}-60px;margin-top:-60px;width:128px;height:128px;{% endif %}" src="{{ outfit }}" alt="player outfit"/></div>
|
||||
{% endif %}
|
||||
|
||||
<tr bgcolor="{{ config.vdarkborder }}">
|
||||
|
@ -155,7 +155,7 @@
|
||||
{% if (item.count > 1) %}
|
||||
<span class="loot_amount">{{ item.count }}</span>
|
||||
{% endif %}
|
||||
<a href="{{ config.monsters_items_url }}{{ item.name|title }}"><img title="{{ item.tooltip }}" src="{{ config.item_images_url }}{{ item.id }}{{ config.item_images_extension }}" class="loot_image"/></a>
|
||||
<a href="{{ setting('core.monsters_items_url') }}{{ item.name|title }}"><img title="{{ item.tooltip }}" src="{{ setting('core.item_images_url') }}{{ item.id }}{{ setting('core.item_images_extension') }}" class="loot_image"/></a>
|
||||
</span>
|
||||
{% endfor %}
|
||||
</td>
|
||||
|
@ -24,7 +24,7 @@ Page: {{ links_to_pages|raw }}<br/>
|
||||
{% set i = i + 1 %}
|
||||
<td valign="top">{{ post.player_link|raw }}<br/>
|
||||
{% if post.outfit is defined %}
|
||||
<img style="margin-left:{% if post.player.getLookType() in config.outfit_images_wrong_looktypes %}-0px;margin-top:-0px;width:64px;height:64px;{% else %}-60px;margin-top:-60px;width:128px;height:128px;{% endif %}" src="{{ post.outfit }}" alt="player outfit"/>
|
||||
<img style="margin-left:{% if post.player.getLookType() in setting('core.outfit_images_wrong_looktypes') %}-0px;margin-top:-0px;width:64px;height:64px;{% else %}-60px;margin-top:-60px;width:128px;height:128px;{% endif %}" src="{{ post.outfit }}" alt="player outfit"/>
|
||||
<br />
|
||||
{% endif %}
|
||||
<span style="font-size: 10px">
|
||||
|
@ -2,8 +2,8 @@
|
||||
Here you can change description of your guild.<br/>
|
||||
<form enctype="multipart/form-data" action="?subtopic=guilds&guild={{ guild.getName() }}&action=change_description" method="post">
|
||||
<input type="hidden" name="todo" value="save"/>
|
||||
<textarea name="description" cols="60" rows="{{ config.guild_description_lines_limit - 1 }}">{{ guild.getCustomField('description')|raw }}</textarea><br>
|
||||
(max. {{ config.guild_description_lines_limit }} lines, max. {{ config.guild_description_chars_limit }} chars) <input type="submit" value="Save description"/></form><br/>
|
||||
<textarea name="description" cols="60" rows="{{ setting('core.guild_description_lines_limit') - 1 }}">{{ guild.getCustomField('description')|raw }}</textarea><br>
|
||||
(max. {{ setting('core.guild_description_lines_limit') }} lines, max. {{ setting('core.guild_description_chars_limit') }} chars) <input type="submit" value="Save description"/></form><br/>
|
||||
<br/>
|
||||
<div style="text-align:center">
|
||||
<form action="?subtopic=guilds&guild={{ guild.getName() }}&action=manager" method="post">
|
||||
|
@ -6,7 +6,7 @@ Here you can change logo of your guild.<br/>Actuall logo: <img src="{{ constant(
|
||||
Select new logo: <input name="newlogo" id="newlogo" type="file" />
|
||||
<input type="submit" value="Send new logo" />
|
||||
</form>
|
||||
Only <b>jpg, gif, png, bmp</b> pictures. Max. size: <b>{{ config.guild_image_size_kb }} KB</b><br>
|
||||
Only <b>jpg, gif, png, bmp</b> pictures. Max. size: <b>{{ setting('core.guild_image_size_kb') }} KB</b><br>
|
||||
<br/>
|
||||
<div style="text-align:center">
|
||||
<form action="?subtopic=guilds&guild={{ guild.getName() }}&action=manager" method="post">
|
||||
@ -16,7 +16,7 @@ Only <b>jpg, gif, png, bmp</b> pictures. Max. size: <b>{{ config.guild_image_siz
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
$('#upload_form').submit(function (event) {
|
||||
var max_img_size = {{ config.guild_image_size_kb * 1024 }};
|
||||
var max_img_size = {{ setting('core.guild_image_size_kb') * 1024 }};
|
||||
var input = document.getElementById("newlogo");
|
||||
// check for browser support (may need to be modified)
|
||||
if (input.files && input.files.length == 1) {
|
||||
|
@ -3,7 +3,7 @@ Here you can change MOTD (Message of the Day, showed in game!) of your guild.<br
|
||||
<form enctype="multipart/form-data" action="?subtopic=guilds&guild={{ guild.getName() }}&action=change_motd" method="post">
|
||||
<input type="hidden" name="todo" value="save"/>
|
||||
<textarea name="motd" cols="60" rows="3">{{ guild.getCustomField('motd')|raw }}</textarea><br/>
|
||||
(max. {{ config.guild_motd_chars_limit }} chars) <input type="submit" value="Save MOTD" /></form><br/>
|
||||
(max. {{ setting('core.guild_motd_chars_limit') }} chars) <input type="submit" value="Save MOTD" /></form><br/>
|
||||
<br/>
|
||||
<div style="text-align:center">
|
||||
<form action="?subtopic=guilds&guild={{ guild.getName() }}&action=manager" method="post">
|
||||
|
@ -29,13 +29,13 @@
|
||||
</table>
|
||||
<table border="0" cellpadding="4" cellspacing="1" width="100%">
|
||||
<tr bgcolor="{{ config.vdarkborder }}">
|
||||
{% if config.account_country %}
|
||||
{% if setting('core.account_country') %}
|
||||
<td style="width: 11px" class="white">#</td>
|
||||
{% endif %}
|
||||
|
||||
<td style="width: 10%" class="white"><b>Rank</b></td>
|
||||
|
||||
{% if config.highscores_outfit %}
|
||||
{% if setting('core.highscores_outfit') %}
|
||||
<td class="white"><b>Outfit</b></td>
|
||||
{% endif %}
|
||||
|
||||
@ -56,13 +56,13 @@
|
||||
<tr bgcolor="{{ getStyle(row) }}">
|
||||
{% set row = row + 1 %}
|
||||
|
||||
{% if config.account_country %}
|
||||
{% if setting('core.account_country') %}
|
||||
<td>{{ player.flag|raw }}</td>
|
||||
{% endif %}
|
||||
|
||||
<td>{{ player.rank }}.</td>
|
||||
|
||||
{% if config.highscores_outfit %}
|
||||
{% if setting('core.highscores_outfit') %}
|
||||
<td>{{ player.outfit|raw }}</td>
|
||||
{% endif %}
|
||||
|
||||
@ -70,7 +70,7 @@
|
||||
<a href="{{ player.link }}">
|
||||
<span style="color: {% if player.online > 0 %}green{% else %}red{% endif %}">{{ player.name }}</span>
|
||||
</a>
|
||||
{% if config.highscores_vocation %}
|
||||
{% if setting('core.highscores_vocation') %}
|
||||
<br/><small>{{ player.vocation }}</small>
|
||||
{% endif %}
|
||||
</td>
|
||||
|
@ -1,9 +1,9 @@
|
||||
<div class="NewsHeadline">
|
||||
<div class="NewsHeadlineBackground" style="background-image:url({{ template_path }}/images/news/newsheadline_background.gif)">
|
||||
<img src="{{ constant('BASE_URL') }}images/news/icon_{{ icon }}.gif" class="NewsHeadlineIcon" />
|
||||
<div class="NewsHeadlineDate">{{ date|date(config.news_date_format) }} - </div>
|
||||
<div class="NewsHeadlineDate">{{ date|date(setting('core.news_date_format')) }} - </div>
|
||||
<div class="NewsHeadlineText">{{ title }}</div>
|
||||
{% if config.news_author and author is not empty %}
|
||||
{% if setting('core.news_author') and author is not empty %}
|
||||
<div class="NewsHeadlineAuthor"><b>Author: </b><i>{{ author }}</i></div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
@ -10,7 +10,7 @@
|
||||
{% if not status.online %}
|
||||
Server is offline.<br/>
|
||||
{% else %}
|
||||
{% if config.online_afk %}
|
||||
{% if setting('core.online_afk') %}
|
||||
{% set players_count = players|length %}
|
||||
{% set afk = players_count - status.players %}
|
||||
{% if afk < 0 %}
|
||||
@ -28,9 +28,9 @@
|
||||
</table>
|
||||
<br/>
|
||||
{# vocation statistics #}
|
||||
{% if config.online_vocations %}
|
||||
{% if setting('core.online_vocations') %}
|
||||
<br/>
|
||||
{% if config.online_vocations_images %}
|
||||
{% if setting('core.online_vocations_images') %}
|
||||
<table width="200" cellspacing="1" cellpadding="0" border="0" align="center">
|
||||
<tr bgcolor="{{ config.darkborder }}">
|
||||
<td><img src="images/sorcerer.png" /></td>
|
||||
@ -70,7 +70,7 @@
|
||||
{% endif %}
|
||||
|
||||
{# show skulls #}
|
||||
{% if config.online_skulls %}
|
||||
{% if setting('core.online_skulls') %}
|
||||
<table width="100%" cellspacing="1">
|
||||
<tr>
|
||||
<td style="background: {{ config.darkborder }};" align="center">
|
||||
@ -84,10 +84,10 @@
|
||||
|
||||
<table border="0" cellspacing="1" cellpadding="4" width="100%">
|
||||
<tr bgcolor="{{ config.vdarkborder }}">
|
||||
{% if config.account_country %}
|
||||
{% if setting('core.account_country') %}
|
||||
<td width="11px"><a href="{{ getLink('online?order=country') }}" class="white">#</A></td>
|
||||
{% endif %}
|
||||
{% if config.online_outfit %}
|
||||
{% if setting('core.online_outfit') %}
|
||||
<td class="white"><b>Outfit</b></td>
|
||||
{% endif %}
|
||||
<td width="60%"><a href="{{ getLink('online?order=name') }}" class="white">Name</A></td>
|
||||
@ -98,11 +98,11 @@
|
||||
{% for player in players %}
|
||||
{% set i = i + 1 %}
|
||||
<tr bgcolor="{{ getStyle(i) }}">
|
||||
{% if config.account_country %}
|
||||
{% if setting('core.account_country') %}
|
||||
<td>{{ player.country_image|raw }}</td>
|
||||
{% endif %}
|
||||
{% if config.online_outfit %}
|
||||
<td width="5%"><img style="position:absolute;margin-top:{% if player.player.looktype in config.outfit_images_wrong_looktypes %}-20px;margin-left:-0px;{% else %}-45px;margin-left:-25px;{% endif %}" src="{{ player.outfit }}" alt="player outfit"/></td>
|
||||
{% if setting('core.online_outfit') %}
|
||||
<td width="5%"><img style="position:absolute;margin-top:{% if player.player.looktype in setting('core.outfit_images_wrong_looktypes') %}-20px;margin-left:-0px;{% else %}-45px;margin-left:-25px;{% endif %}" src="{{ player.outfit }}" alt="player outfit"/></td>
|
||||
{% endif %}
|
||||
<td>{{ player.name|raw }}{{ player.skull }}</td>
|
||||
<td>{{ player.level }}</td>
|
||||
|
@ -47,7 +47,7 @@
|
||||
{% if houseLevel %}
|
||||
<li>Houses: <b>{{ houseLevel }} level</b></li>
|
||||
{% endif %}
|
||||
<li>Guilds: <b>{{ config.guild_need_level }} level</b> (Create via website)</li>
|
||||
<li>Guilds: <b>{{ setting('core.guild_need_level') }} level</b> (Create via website)</li>
|
||||
<br>
|
||||
|
||||
<h2>Frags & Skull system</h2>
|
||||
@ -99,4 +99,4 @@
|
||||
<h2>Other</h2>
|
||||
<li>Respect our <a href="{{ getLink('rules') }}">rules</a>.</li>
|
||||
<li>Please report rule violations (Botters, players breaking rules etc) with <b>CTRL + R</b>.</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
@ -17,7 +17,7 @@
|
||||
<td>
|
||||
<div class="InnerTableContainer">
|
||||
{% set i = 0 %}
|
||||
{% if config.team_style == 1 %}
|
||||
{% if setting('core.team_style') == 1 %}
|
||||
|
||||
<table border="0" cellpadding="4" cellspacing="1" width="100%">
|
||||
<tr bgcolor="{{ config.vdarkborder }}">
|
||||
@ -63,12 +63,12 @@
|
||||
|
||||
{% if setting('core.team_outfit') %}
|
||||
<td>
|
||||
<img style="position: absolute; margin-top: {% if member.player.looktype in config.outfit_images_wrong_looktypes %}-16px;margin-left:-0px;{% else %} -45px; margin-left: -30px;{% endif %}" src="{{ member.outfit }}" alt="player outfit"/>
|
||||
<img style="position: absolute; margin-top: {% if member.player.looktype in setting('core.outfit_images_wrong_looktypes') %}-16px;margin-left:-0px;{% else %} -45px; margin-left: -30px;{% endif %}" src="{{ member.outfit }}" alt="player outfit"/>
|
||||
</td>
|
||||
{% endif %}
|
||||
|
||||
<td>
|
||||
{% if config.account_country %}
|
||||
{% if setting('core.account_country') %}
|
||||
{{ member.flag_image|raw }}
|
||||
{% endif %}
|
||||
{{ member.link|raw }}
|
||||
@ -100,7 +100,7 @@
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</table>
|
||||
{% elseif config.team_style == 2 %}
|
||||
{% elseif setting('core.team_style') == 2 %}
|
||||
{% for group in groupmember|reverse %}
|
||||
{% if group.members is not empty %}
|
||||
<div style="text-align:center"><h2>{{ group.group_name|capitalize }}</h2></div>
|
||||
@ -141,12 +141,12 @@
|
||||
<tr bgcolor="{{ getStyle(i) }}" style="height: 32px;">
|
||||
{% if setting('core.team_outfit') %}
|
||||
<td>
|
||||
<img style="position: absolute; margin-top: {% if member.player.looktype in config.outfit_images_wrong_looktypes %}-16px;margin-left:-0px;{% else %} -45px; margin-left: -30px;{% endif %}" src="{{ member.outfit }}" alt="player outfit"/>
|
||||
<img style="position: absolute; margin-top: {% if member.player.looktype in setting('core.outfit_images_wrong_looktypes') %}-16px;margin-left:-0px;{% else %} -45px; margin-left: -30px;{% endif %}" src="{{ member.outfit }}" alt="player outfit"/>
|
||||
</td>
|
||||
{% endif %}
|
||||
|
||||
<td>
|
||||
{% if config.account_country %}
|
||||
{% if setting('core.account_country') %}
|
||||
{{ member.flag_image|raw }}
|
||||
{% endif %}
|
||||
{{ member.link|raw }}
|
||||
|
@ -5,8 +5,8 @@
|
||||
<base href="{{ constant('BASE_URL') }}" />
|
||||
<title>{{ title }}</title>
|
||||
{% endif %}
|
||||
<meta name="description" content="{{ config.meta_description }}" />
|
||||
<meta name="keywords" content="{{ config.meta_keywords }}, myaac, wodzaac" />
|
||||
<meta name="description" content="{{ setting('core.meta_description') }}" />
|
||||
<meta name="keywords" content="{{ setting('core.meta_keywords') }}, myaac, wodzaac" />
|
||||
<meta name="generator" content="MyAAC" />
|
||||
<link rel="stylesheet" type="text/css" href="{{ constant('BASE_URL') }}tools/css/messages.css" />
|
||||
<script type="text/javascript" src="{{ constant('BASE_URL') }}tools/js/jquery.min.js"></script>
|
||||
|
@ -1,7 +1,7 @@
|
||||
var list = new Array();
|
||||
{% set i = 0 %}
|
||||
{% for cat in categories %}
|
||||
{% if cat.id != 'shops' or config.gifts_system %}
|
||||
{% if cat.id != 'shops' or setting('core.gifts_system') %}
|
||||
list[{{ i }}] = '{{ cat.id }}';
|
||||
{% endif %}
|
||||
{% set i = i + 1 %}
|
||||
|
@ -3,8 +3,8 @@
|
||||
$topPlayers = getTopPlayers(5);
|
||||
foreach($topPlayers as &$player) {
|
||||
$outfit_url = '';
|
||||
if($config['online_outfit']) {
|
||||
$outfit_url = $config['outfit_images_url'] . '?id=' . $player['looktype'] . (!empty
|
||||
if (setting('core.online_outfit')) {
|
||||
$outfit_url = setting('core.outfit_images_url') . '?id=' . $player['looktype'] . (!empty
|
||||
($player['lookaddons']) ? '&addons=' . $player['lookaddons'] : '') . '&head=' . $player['lookhead'] . '&body=' . $player['lookbody'] . '&legs=' . $player['looklegs'] . '&feet=' . $player['lookfeet'];
|
||||
|
||||
$player['outfit'] = $outfit_url;
|
||||
|
@ -45,8 +45,8 @@
|
||||
<div class="top_level" style="background:url({{ template_path }}/images/themeboxes/bg_top.png)" align=" ">
|
||||
{% for player in topPlayers %}
|
||||
<div style="text-align:left"><a href="{{ getPlayerLink(player['name'], false) }} " class="topfont {% if player['online'] %}online{% else %}offline{% endif %}">
|
||||
{% if config.online_outfit %}
|
||||
<img style="position:absolute;margin-top:{% if player.looktype in config.outfit_images_wrong_looktypes %}-20px;margin-left:-0px;{% else %}-45px;margin-left:-25px;{% endif %}" src="{{ player.outfit }}" alt="player outfit"/>
|
||||
{% if setting('core.online_outfit') %}
|
||||
<img style="position:absolute;margin-top:{% if player.looktype in setting('core.outfit_images_wrong_looktypes') %}-20px;margin-left:-0px;{% else %}-45px;margin-left:-25px;{% endif %}" src="{{ player.outfit }}" alt="player outfit"/>
|
||||
{% endif %}
|
||||
<span style="color: #CCC; margin-left: 40px">{{ player['rank'] }} - </span>
|
||||
{{ player['name'] }}
|
||||
|
@ -124,7 +124,7 @@ if(isset($config['boxes']))
|
||||
document.getElementById("ActiveSubmenuItemIcon_"+activeSubmenuItem).style.visibility = "visible";
|
||||
menus = localStorage.getItem('menus');
|
||||
if(menus.lastIndexOf("&") === -1) {
|
||||
menus = "news=1&account=0&community=0&library=0&forum=0<?php if($config['gifts_system']) echo '&shops=0'; ?>&";
|
||||
menus = "news=1&account=0&community=0&library=0&forum=0<?php if (setting('core.gifts_system')) echo '&shops=0'; ?>&";
|
||||
}
|
||||
FillMenuArray();
|
||||
InitializeMenu();
|
||||
@ -329,7 +329,7 @@ if(isset($config['boxes']))
|
||||
$menus = get_template_menus();
|
||||
|
||||
foreach($config['menu_categories'] as $id => $cat) {
|
||||
if(!isset($menus[$id]) || ($id == MENU_CATEGORY_SHOP && !$config['gifts_system'])) {
|
||||
if(!isset($menus[$id]) || ($id == MENU_CATEGORY_SHOP && !setting('core.gifts_system'))) {
|
||||
continue;
|
||||
}
|
||||
?>
|
||||
@ -368,7 +368,7 @@ foreach($config['menu_categories'] as $id => $cat) {
|
||||
?>
|
||||
</div>
|
||||
<?php
|
||||
if($id == MENU_CATEGORY_SHOP || (!$config['gifts_system'] && $id == MENU_CATEGORY_SHOP - 1)) {
|
||||
if($id == MENU_CATEGORY_SHOP || (!setting('core.gifts_system') && $id == MENU_CATEGORY_SHOP - 1)) {
|
||||
?>
|
||||
<div id='MenuBottom' style='background-image:url(<?php echo $template_path; ?>/images/general/box-bottom.gif);'></div>
|
||||
<?php
|
||||
|
@ -85,9 +85,9 @@ if(isset($_GET['title'], $_GET['body'], $_GET['player_id'], $_GET['category'], $
|
||||
'content' => $_GET['body'],
|
||||
'date' => time(),
|
||||
'icon' => $categories[$_GET['category']]['icon_id'],
|
||||
'author' => $config['news_author'] ? $author : '',
|
||||
'author' => setting('core.news_author') ? $author : '',
|
||||
'comments' => null,
|
||||
'news_date_format' => $config['news_date_format'],
|
||||
'news_date_format' => setting('core.news_date_format'),
|
||||
'hidden'=> 0
|
||||
)));
|
||||
}
|
||||
|
@ -46,7 +46,7 @@ else if(isset($_GET['email']))
|
||||
if(!Validator::email($email))
|
||||
error_(Validator::getLastError());
|
||||
|
||||
if($config['account_mail_unique'])
|
||||
if(setting('core.account_mail_unique'))
|
||||
{
|
||||
if(Account::where('email', '=', $email)->exists())
|
||||
error_('Account with this e-mail already exist.');
|
||||
|
Loading…
x
Reference in New Issue
Block a user