Compare commits

..

8 Commits

Author SHA1 Message Date
slawkens
a708abce03 add mostdamage killer 2022-11-05 07:15:32 +01:00
slawkens
f46f7d61e7 Update .gitignore 2021-12-28 07:22:58 +01:00
slawkens
1578d186c2 Ignore arrays in config.lua (fixes experienceStages loading)
Also change version to 0.7.13-dev
2021-12-16 20:24:34 +01:00
slawkens
af1ec6722b Update README.md 2021-10-23 13:44:30 +02:00
slawkens
5202298b60 Add notice about 0.7 being discontinued 2021-10-23 13:43:32 +02:00
slawkens
ed2f325ce1 Add some notice 2020-02-25 20:52:35 +01:00
slawkens
a467b55054 Fix class name in highscores
(cherry picked from commit b8130d3fd3)
2020-02-25 20:49:56 +01:00
slawkens
f9458da291 Move TODO to wiki 2020-02-24 22:22:54 +01:00
9 changed files with 44 additions and 50 deletions

3
.gitignore vendored
View File

@@ -1,6 +1,9 @@
Thumbs.db
.DS_Store
.idea
node_modules
vendor
composer.lock
releases
config.local.php

View File

@@ -1,5 +1,10 @@
# Changelog
## [0.7.13 - not-release-yet]
### Fixed
* Ignore arrays in config.lua (fixes experienceStages loading)
## [0.7.12 - 18.02.2020]
### Fixed
* change guild nick function causing crash on TFS 1.x because of invalid characters being accepted

View File

@@ -1,4 +1,10 @@
# PLEASE DO NOT USE THIS BRANCH/VERSION
## It is discontinued and won't receive any updates
## Switch to master branch instead
## It's keept only for archival purposes
# myaac
MyAAC is a free and open-source Automatic Account Creator (AAC) and Content Management System (CMS) written in PHP. It is a fork of the [Gesior](https://github.com/gesior/Gesior2012) project. It supports only MySQL databases.
Official website: https://my-aac.org

37
TODO
View File

@@ -1,37 +0,0 @@
// MyAAC TODO
0.*
* support duplicated vocation names with different ids
* plugins: option to define custom requirements check in json file, to check if system meets the requirement
* add support for defining max myaac version in plugin.json file
* cache Menus in templates
* don't show error indicators on first time load - createaccount page
* update Twig to the latest version from 1.x branch
* semantic versioning support for plugins (github.com/composer/semver)
* add some notice to the user that installing step "Import Schema" will take some time
* check user IP on installing to prevent install by random user
1.0:
* i18n support (issue #1 on github)
* New Admin Panel layout and interface
* add changelog management interface
* remove tibiacom template, and include it as a plugin
2.0
* remove compat functions
* folder restructure:
* var/ (for logs, cache and data), config/, bin, public/ (for index and images and other public content), system/ (for php files and classess)
* rename templates to layouts as templates is meant to be used for twig templates
* change gifts_system to shop_system configurable
* move most used options in system/templates dir to separate directories (more transparent)
At any time between (version not specified):
* better news archive with search function (like on tibia.com)
* guild wars management (issue #13 on github)
* update account.management page to be more realistic (like on tibia.com)
* update guilds page to be more realistic (like on tibia.com)
* possibility to add extra cache engines with plugins
* preferably configurable (enable/disable) forum TinyMCE editor
* new cache engine - plain php, is good with pure php 7.0+ and opcache
* OTAdmin support in Admin Panel
* database towns table support for TFS 1.3

View File

@@ -26,7 +26,7 @@
session_start();
define('MYAAC', true);
define('MYAAC_VERSION', '0.7.12');
define('MYAAC_VERSION', '0.7.13-dev');
define('DATABASE_VERSION', 22);
define('TABLE_PREFIX', 'myaac_');
define('START_TIME', microtime(true));

View File

@@ -895,6 +895,13 @@ function load_config_lua($filename)
if(count($lines) > 0)
foreach($lines as $ln => $line)
{
$line = trim($line);
if(@$line[0] === '{' || @$line[0] === '}') {
// arrays are not supported yet
// just ignore the error
continue;
}
$tmp_exp = explode('=', $line, 2);
if(strpos($line, 'dofile') !== false)
{
@@ -921,9 +928,11 @@ function load_config_lua($filename)
$result[$key] = (string) substr(substr($value, 1), 0, -1);
elseif(in_array($value, array('true', 'false')))
$result[$key] = ($value == 'true') ? true : false;
elseif(substr($value, 0 , 1) == '{' && substr($value, -1 , 1) == '}') {
//elseif(substr($value, 0 , 1) == '{' && substr($value, -1 , 1) == '}') {
elseif(@$value[0] === '{') {
// arrays are not supported yet
// just ignore the error
continue;
}
else
{

View File

@@ -17,7 +17,7 @@ echo $twig->render('admin.plugins.form.html.twig');
if(isset($_REQUEST['uninstall'])){
$uninstall = $_REQUEST['uninstall'];
if(Plugins::uninstall($uninstall)) {
success('Successfully uninstalled plugin ' . $uninstall);
}
@@ -43,7 +43,7 @@ else if(isset($_FILES["plugin"]["name"]))
break;
case UPLOAD_ERR_INI_SIZE:
case UPLOAD_ERR_FORM_SIZE:
$error .= ' - file too large (limit of '.ini_get('upload_max_filesize').' bytes).';
$error .= ' - file too large (limit of '.ini_get('upload_max_filesize').' bytes). You can enlarge the limits by changing "upload_max_filesize" in php.ini';
break;
case UPLOAD_ERR_PARTIAL:
$error .= ' - file upload was not completed.';
@@ -78,7 +78,7 @@ else if(isset($_FILES["plugin"]["name"]))
}
else
error(Plugins::getError());
unlink($targetzip); // delete the Zipped file
}
else

View File

@@ -268,7 +268,7 @@ if($config['highscores_country_box'])
echo
'<TABLE BORDER=0 width="100%" CELLPADDING=4 CELLSPACING=1>
<TR BGCOLOR="' . $config['vdarkborder'] . '">
<TD CLASS=whites><B>Choose a country</B></TD>
<TD CLASS=white><B>Choose a country</B></TD>
</TR>
<TR BGCOLOR="'.$config['lightborder'].'">
<TD>
@@ -284,7 +284,7 @@ if($config['highscores_country_box'])
echo '
<TABLE BORDER=0 width="100%" CELLPADDING=4 CELLSPACING=1>
<TR BGCOLOR="'.$config['vdarkborder'].'">
<TD CLASS=whites><B>Choose a skill</B></TD>
<TD CLASS=white><B>Choose a skill</B></TD>
</TR>
<TR BGCOLOR="'.$config['lightborder'].'">
<TD>';
@@ -315,7 +315,7 @@ if($config['highscores_vocation_box'])
echo
'<table border="0" width="100%" cellpadding="4" cellspacing="1">
<tr bgcolor="' . $config['vdarkborder'] . '">
<td class=whites><b>Choose a vocation</b></td>
<td class="white"><b>Choose a vocation</b></td>
</tr>
<tr bgcolor="'.$config['lightborder'].'">
<td>

View File

@@ -45,7 +45,7 @@ if(tableExist('player_killers')) // tfs 0.3
$players_rows .= 'eliminated';
elseif($count > 19)
$players_rows .= 'annihilated';
$players_rows .= 'at level <b>' . $death['level'] . '</b> by ';
}
else if($i == $count)
@@ -76,15 +76,15 @@ if(tableExist('player_killers')) // tfs 0.3
$players_rows .= '.</TD>';
if($config['multiworld'])
$player_rows .= '<TD>'.$config['worlds'][(int)$death['world_id']].'</TD>';
$players_rows .= '</TR>';
}
}
}
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`, `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`, `d`.`mostdamage_by` as `mostdamage_by`, `d`.`mostdamage_is_player` as `mostdamage_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'] . ";");
if(!empty($players_deaths))
{
@@ -95,7 +95,15 @@ $players_deaths = $db->query("SELECT `p`.`name` AS `victim`, `d`.`killed_by` as
$players_rows .= getPlayerLink($death['killed_by']);
else
$players_rows .= $death['killed_by'];
if (!empty($death['mostdamage_by'])) {
$player_rows .= ' and ';
if($death['mostdamage_is_player'] == '1')
$players_rows .= getPlayerLink($death['mostdamage_by']);
else
$players_rows .= $death['mostdamage_by'];
}
$players_rows .= '.</TR>';
}
}