Skip to content

Commit

Permalink
Merge pull request #51 from lautaroangelico/WebEngine-1.2.4
Browse files Browse the repository at this point in the history
WebEngine 1.2.4
  • Loading branch information
lautaroangelico authored Jan 9, 2022
2 parents d7ee44a + 975a85e commit 0188f71
Show file tree
Hide file tree
Showing 32 changed files with 436 additions and 152 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# WebEngine CMS 1.2.3
# WebEngine CMS 1.2.4

Open source Content Management System (CMS) for Mu Online servers. WebEngine's goal is to provide a fast, secure and high quality framework for server owners to create and implement their own features to their websites.
WebEngine is an Open source Content Management System (CMS) for Mu Online servers. Our main goal is to provide a fast, secure and high quality framework for server owners to create and implement their own features to their websites.

## Getting Started

Expand Down
11 changes: 9 additions & 2 deletions admincp/modules/mconfig/rankings.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
* WebEngine CMS
* https://webenginecms.org/
*
* @version 1.2.2
* @version 1.2.4
* @author Lautaro Angelico <http://lautaroangelico.com/>
* @copyright (c) 2013-2020 Lautaro Angelico, All Rights Reserved
* @copyright (c) 2013-2022 Lautaro Angelico, All Rights Reserved
*
* Licensed under the MIT license
* http://opensource.org/licenses/MIT
Expand Down Expand Up @@ -41,6 +41,7 @@ function saveChanges() {
$xml->guild_score_formula = $_POST['setting_21'];
$xml->guild_score_multiplier = $_POST['setting_22'];
$xml->rankings_excluded_guilds = $_POST['setting_23'];
$xml->rankings_class_filter = $_POST['setting_24'];

$save = $xml->asXML($xmlPath);
if($save) {
Expand Down Expand Up @@ -167,6 +168,12 @@ function saveChanges() {
<?php enabledisableCheckboxes('setting_20',$moduleConfig->show_online_status,'Enabled','Disabled'); ?>
</td>
</tr>
<tr>
<th>Character Class Filter<br /><span>If enabled, the character's class filter menu will be displayed in the rankings.</span></th>
<td>
<?php enabledisableCheckboxes('setting_24',$moduleConfig->rankings_class_filter,'Enabled','Disabled'); ?>
</td>
</tr>
</table>

<h3>Guild Ranking Settings</h3>
Expand Down
47 changes: 45 additions & 2 deletions includes/classes/class.rankings.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
* WebEngine CMS
* https://webenginecms.org/
*
* @version 1.2.2
* @version 1.2.4
* @author Lautaro Angelico <http://lautaroangelico.com/>
* @copyright (c) 2013-2020 Lautaro Angelico, All Rights Reserved
* @copyright (c) 2013-2022 Lautaro Angelico, All Rights Reserved
*
* Licensed under the MIT license
* http://opensource.org/licenses/MIT
Expand Down Expand Up @@ -429,5 +429,48 @@ private function _getOnlineRankingDataMembStatHours() {
if(!is_array($result)) return;
return $result;
}

private function _getRankingsFilterData() {
$classesData = custom('character_class');
$rankingsFilter = custom('rankings_classgroup_filter');

if(is_array($rankingsFilter)) {
foreach($rankingsFilter as $class => $phrase) {
if(!array_key_exists($class, $classesData)) continue;

$filterName = lang($phrase) == 'ERROR' ? $phrase : lang($phrase);
$classGroupList = array();
foreach($classesData as $key => $row) {
if($row['class_group'] == $class) {
$classGroupList[] = $key;
}
}
$filterList[] = array(
$class,
implode(',', $classGroupList),
$filterName,
);
}
}

if(!is_array($filterList)) return;
return $filterList;
}

public function rankingsFilterMenu() {
$filterData = $this->_getRankingsFilterData();
if(!is_array($filterData)) return;

echo '<div class="text-center">';
echo '<ul class="rankings-class-filter">';

echo '<li><a onclick="rankingsFilterRemove()" class="rankings-class-filter-selection">'.getPlayerClassAvatar(-1, true, false, 'rankings-class-filter-image').'<br />'.lang('rankings_filter_1').'</a></li>';

foreach($filterData as $row) {
echo '<li><a onclick="rankingsFilterByClass('.$row[1].')" class="rankings-class-filter-selection rankings-class-filter-grayscale">'.getPlayerClassAvatar($row[0], true, false, 'rankings-class-filter-image').'<br />'.$row[2].'</a></li>';
}
echo '</ul>';
echo '</div>';
}

}
97 changes: 64 additions & 33 deletions includes/config/custom.tables.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
* WebEngine CMS
* https://webenginecms.org/
*
* @version 1.2.3
* @version 1.2.4
* @author Lautaro Angelico <http://lautaroangelico.com/>
* @copyright (c) 2013-2020 Lautaro Angelico, All Rights Reserved
* @copyright (c) 2013-2022 Lautaro Angelico, All Rights Reserved
*
* Licensed under the MIT license
* http://opensource.org/licenses/MIT
Expand Down Expand Up @@ -167,6 +167,33 @@
161 => array('Gun Breaker', 'GB', 'gc.jpg', 'base_stats' => array('str' => 28, 'agi' => 30, 'vit' => 15, 'ene' => 10, 'cmd' => 0), 'class_group' => 160),
163 => array('Master Gun Breaker', 'MGB', 'gc.jpg', 'base_stats' => array('str' => 28, 'agi' => 30, 'vit' => 15, 'ene' => 10, 'cmd' => 0), 'class_group' => 160),
167 => array('Heist Gun Crusher', 'HGC', 'gc.jpg', 'base_stats' => array('str' => 28, 'agi' => 30, 'vit' => 15, 'ene' => 10, 'cmd' => 0), 'class_group' => 160),
176 => array('Light Wizard', 'LIW', 'liw.jpg', 'base_stats' => array('str' => 19, 'agi' => 19, 'vit' => 15, 'ene' => 30, 'cmd' => 0), 'class_group' => 176),
177 => array('Light Master', 'LIM', 'liw.jpg', 'base_stats' => array('str' => 19, 'agi' => 19, 'vit' => 15, 'ene' => 30, 'cmd' => 0), 'class_group' => 176),
179 => array('Shining Wizard', 'SHW', 'liw.jpg', 'base_stats' => array('str' => 19, 'agi' => 19, 'vit' => 15, 'ene' => 30, 'cmd' => 0), 'class_group' => 176),
183 => array('Luminous Wizard', 'LUW', 'liw.jpg', 'base_stats' => array('str' => 19, 'agi' => 19, 'vit' => 15, 'ene' => 30, 'cmd' => 0), 'class_group' => 176),
192 => array('Lemuria Mage', 'LEM', 'lem.jpg', 'base_stats' => array('str' => 18, 'agi' => 18, 'vit' => 19, 'ene' => 30, 'cmd' => 0), 'class_group' => 192),
193 => array('Warmage', 'WAM', 'lem.jpg', 'base_stats' => array('str' => 18, 'agi' => 18, 'vit' => 19, 'ene' => 30, 'cmd' => 0), 'class_group' => 192),
195 => array('Archmage', 'ARM', 'lem.jpg', 'base_stats' => array('str' => 18, 'agi' => 18, 'vit' => 19, 'ene' => 30, 'cmd' => 0), 'class_group' => 192),
199 => array('Mystic Mage', 'MYM', 'lem.jpg', 'base_stats' => array('str' => 18, 'agi' => 18, 'vit' => 19, 'ene' => 30, 'cmd' => 0), 'class_group' => 192),
);

/*
* custom: rankings_classgroup_filter
*/
$custom['rankings_classgroup_filter'] = array(
0 => 'rankings_filter_2',
16 => 'rankings_filter_3',
32 => 'rankings_filter_4',
48 => 'rankings_filter_5',
64 => 'rankings_filter_6',
80 => 'rankings_filter_7',
96 => 'rankings_filter_8',
112 => 'rankings_filter_9',
128 => 'rankings_filter_10',
144 => 'rankings_filter_11',
160 => 'rankings_filter_12',
176 => 'rankings_filter_13',
192 => 'rankings_filter_14',
);

/*
Expand Down Expand Up @@ -209,26 +236,25 @@
1 => 'Dungeon',
2 => 'Devias',
3 => 'Noria',
4 => 'LostTower',
5 => 'Exile',
4 => 'Lost Tower',
6 => 'Arena',
7 => 'Atlans',
8 => 'Tarkan',
9 => 'Devil Square',
10 => 'Icarus',
11 => 'Blood Castle 1',
12 => 'Blood Castle 2',
13 => 'Blood Castle 3',
14 => 'Blood Castle 4',
15 => 'Blood Castle 5',
16 => 'Blood Castle 6',
17 => 'Blood Castle 7',
18 => 'Chaos Castle 1',
19 => 'Chaos Castle 2',
20 => 'Chaos Castle 3',
21 => 'Chaos Castle 4',
22 => 'Chaos Castle 5',
23 => 'Chaos Castle 6',
11 => 'Blood Castle',
12 => 'Blood Castle',
13 => 'Blood Castle',
14 => 'Blood Castle',
15 => 'Blood Castle',
16 => 'Blood Castle',
17 => 'Blood Castle',
18 => 'Chaos Castle',
19 => 'Chaos Castle',
20 => 'Chaos Castle',
21 => 'Chaos Castle',
22 => 'Chaos Castle',
23 => 'Chaos Castle',
24 => 'Kalima 1',
25 => 'Kalima 2',
26 => 'Kalima 3',
Expand All @@ -242,24 +268,24 @@
34 => 'Crywolf Fortress',
36 => 'Kalima 7',
37 => 'Kanturu',
38 => 'Kanturu 2',
39 => 'Kanturu 3',
38 => 'Kanturu',
39 => 'Kanturu',
40 => 'Silent Map',
41 => 'Barracks of Balgass',
41 => 'Balgass Barracks',
42 => 'Balgass Refuge',
45 => 'Illusion Temple 1',
46 => 'Illusion Temple 2',
47 => 'Illusion Temple 3',
48 => 'Illusion Temple 4',
49 => 'Illusion Temple 5',
50 => 'Illusion Temple 6',
45 => 'Illusion Temple',
46 => 'Illusion Temple',
47 => 'Illusion Temple',
48 => 'Illusion Temple',
49 => 'Illusion Temple',
50 => 'Illusion Temple',
51 => 'Elbeland',
52 => 'Blood Castle 8',
53 => 'Chaos Castle 7',
52 => 'Blood Castle',
53 => 'Chaos Castle',
56 => 'Swamp of Calmness',
57 => 'Raklion',
58 => 'Raklion Boss',
62 => 'Village\'s Santa',
62 => 'Santa\'s Village',
63 => 'Vulcanus',
64 => 'Duel Arena',
65 => 'Doppelganger',
Expand All @@ -278,11 +304,11 @@
92 => 'Acheron',
95 => 'Debenter',
96 => 'Debenter',
97 => 'Chaos Castle Final',
97 => 'Chaos Castle',
98 => 'Ilusion Temple',
99 => 'Ilusion Temple',
100 => 'Urk Mountain',
101 => 'Urk Mountain',
100 => 'Uruk Mountain',
101 => 'Uruk Mountain',
102 => 'Tormented Square',
103 => 'Tormented Square',
104 => 'Tormented Square',
Expand All @@ -298,7 +324,7 @@
118 => 'Deep Dungeon',
119 => 'Deep Dungeon',
120 => 'Deep Dungeon',
121 => '4th Quest',
121 => 'Quest Zone',
122 => 'Swamp of Darkness',
123 => 'Kubera Mine',
124 => 'Kubera Mine',
Expand All @@ -309,6 +335,11 @@
129 => 'Atlans Abyss 2',
130 => 'Atlans Abyss 3',
131 => 'Scorched Canyon',
132 => 'Crimson Flame Icarus',
133 => 'Temple of Arnil',
134 => 'Aida Gray',
135 => 'Old Kethotum',
136 => 'Burning Kethotum',
);

/*
Expand Down
Loading

0 comments on commit 0188f71

Please sign in to comment.