1.0.9.8 WebEngine Rankings (+add GResets to IGCN)

ozon

New Member
Jan 6, 2018
7
2
3
34
Hello, I was shocked when I saw WebEngine rankings so what I done
- I disabled Level, Grand Reset and Master Level Ranking and I customized Resets ranking to show all that rankings in one tab.

How to customize Resets ranking to show Level, MasterLVL, Reset
1. You have to edit class.rankings.php which is in root/includes/classes/
2. Find
Code:
case "IGCN": $result =
which is bellow
Code:
private function _resetsRanking() {
3. Change line $result = ... on
Code:
$result = $this->mu->query_fetch("SELECT TOP ".$this->_results." "._CLMN_CHR_NAME_.","._CLMN_CHR_CLASS_.","._CLMN_CHR_GRSTS_.", "._CLMN_CHR_RSTS_.", "._CLMN_CHR_MLVL_.", "._CLMN_CHR_LVL_." FROM "._TBL_CHR_." WHERE "._CLMN_CHR_NAME_." NOT IN(".$this->_rankingsExcludeChars().") ORDER BY  "._CLMN_CHR_RSTS_." DESC, "._CLMN_CHR_MLVL_." DESC, "._CLMN_CHR_LVL_." DESC");
If you would like to add Grand Resets than in step 3 paste
Code:
$result = $this->mu->query_fetch("SELECT TOP ".$this->_results." "._CLMN_CHR_NAME_.","._CLMN_CHR_CLASS_.","._CLMN_CHR_GRSTS_.", "._CLMN_CHR_RSTS_.", "._CLMN_CHR_MLVL_.", "._CLMN_CHR_LVL_." FROM "._TBL_CHR_." WHERE "._CLMN_CHR_NAME_." NOT IN(".$this->_rankingsExcludeChars().") ORDER BY "._CLMN_CHR_GRSTS_." DESC, "._CLMN_CHR_RSTS_." DESC, "._CLMN_CHR_MLVL_." DESC, "._CLMN_CHR_LVL_." DESC");
4. You have to edit resets.php in root/modules/rankings/
5. Find first line with
Code:
echo '<td style="width:80px;font-weight:bold;">'.lang('rankings_txt_11',true).'</td>';
and few lines bellow
Code:
echo '</tr>';
6. Change that lines on
Code:
    echo '<td style="width:80px;font-weight:bold;">'.lang('rankings_txt_11',true).'</td>';
    echo '<td style="width:220px;font-weight:bold;">'.lang('rankings_txt_10',true).'</td>';
    echo '<td style="font-weight:bold;">'.lang('rankings_txt_13',true).'</td>';
    echo '<td style="font-weight:bold;">'.lang('rankings_txt_22',true).'</td>';   
    echo '<td style="font-weight:bold;">'.lang('rankings_txt_12',true).'</td>';
    echo '</tr>';
And that should be all if i didn't forgot about something...

If you would like to add Grand Resets than in step 6 paste
Code:
    echo '<td style="width:80px;font-weight:bold;">'.lang('rankings_txt_11',true).'</td>';
    echo '<td style="width:220px;font-weight:bold;">'.lang('rankings_txt_10',true).'</td>';
    echo '<td style="font-weight:bold;">'.lang('rankings_txt_21',true).'</td>';
    echo '<td style="font-weight:bold;">'.lang('rankings_txt_13',true).'</td>';
    echo '<td style="font-weight:bold;">'.lang('rankings_txt_22',true).'</td>';   
    echo '<td style="font-weight:bold;">'.lang('rankings_txt_12',true).'</td>';
    echo '</tr>';
7. You have to edit language.php in root/includes/languages/en
8. Find
Code:
define('_CLMN_CHR_RSTS_', 'RESETS');
and ADD BELLOW
Code:
define('_CLMN_CHR_GRSTS_', 'GRESETS');
Do not delete or do not replace that like before
Code:
define('_CLMN_CHR_RSTS_', 'RESETS');

9. Go to your SQL and do a) or b)
a)
9.1 Find MuOnline>Tables>Press Right Mouse Button on dbo.Character>Design
9.2 In last blank row in first columnt (Column name) write
Code:
GRESETS
9.3 In second column (Data Type) write
Code:
int
9.4 Close table, save all and it should all work good after CRON if i didn't forgot about something again :)
b)
9.1 You have to make New Query
Code:
ALTER TABLE dbo.Character
ADD GRESETS int;
9.2 Now you have to wait on next cron and check your ranking
 

ozon

New Member
Jan 6, 2018
7
2
3
34
Unfortunately not, because I made more customizations and without them you will have many errors on your page.
Is it something hard to understand in that tutorial? You've got path and filenames and code to find and just replace.
 

Edgar

New Member
Aug 24, 2017
4
0
1
29
Unfortunately not, because I made more customizations and without them you will have many errors on your page.
Is it something hard to understand in that tutorial? You've got path and filenames and code to find and just replace.
Thnx i will try :)
 

Mon

Administrator
Developer
Nov 8, 2018
185
45
28
Thanks for the post!

Would be nice if you could provide the customization applied to the original source of the rankings class:
https://github.com/lautaroangelico/WebEngine/blob/master/includes/classes/class.rankings.php

I believe it would make it much easier for others to try your customization!

And a secondary note, I think it would have been easier to simply add an extra ranking and name it, say "Top Ranking" instead of having to disable all the other ones.
In any case, thanks for sharing your modifications, I will test it out later!

P.S. a screenshot of how this custom ranking looks would be nice :p
 

eynnad

Member
Premium Member
Aug 21, 2014
113
8
18
Lacking details of what to put in .$rdata details of level.php when adding Master Level