Re: [PLUGIN] Fufi Widgets 0.2
Posted: 28 May 2013, 09:33
Thank you very much.
Hehe, I have looked there, and tried to fix it, but there is no possiblities for me to fix it, as I see itKegulf wrote:I have tried to find out where to edit it, but the only place I find the part "TopRanks" is in fufi_widgets_aseco.xml and fufi_widgets_xaseco.xml, and sadly, there are no possibility for me to quickfix it.
kremsy wrote:They are called scoreboard lists in the fufi widgets xaseco
Code: Select all
<list>
<title>Top Ranks</title>
<content>TopRanks</content>
<x>45</x>
<y>29</y>
<width>18</width>
<entrycount>5</entrycount>
</list>
Code: Select all
function getTopRanksList($limit=50){
$query = 'SELECT p.Login, p.NickName, r.avg FROM players p LEFT JOIN rs_rank r ON (p.Id=r.PlayerId) WHERE r.avg != 0 order by r.avg DESC LIMIT '.$limit;
$res = mysql_query($query);
$rankings = array();
while ($row = mysql_fetch_object($res)) {
$player = new CTUPlayer($row->NickName, $row->Login);
$ranking['player'] = $player;
$ranking['score'] = round($row->avg/1000) / 10;
if ($ranking['score'] == round($ranking['score'])) $ranking['score'] = $ranking['score'].'.0';
$rankings[] = $ranking;
}
return $rankings;
kremsy wrote:I fixed that already some weeks ago for the next release, sorry now I got what you mean, simply write
$query = 'SELECT p.Login, p.NickName, r.avg FROM players p LEFT JOIN rs_rank r ON (p.Id=r.PlayerId) WHERE r.avg != 0 order by r.avg ASC LIMIT '.$limit;
instead of
$query = 'SELECT p.Login, p.NickName, r.avg FROM players p LEFT JOIN rs_rank r ON (p.Id=r.PlayerId) WHERE r.avg != 0 order by r.avg DESC LIMIT '.$limit;
DESC->ASC
kremsy wrote:I have to say sorry that this fix hasn't been changed in the release yet.
I made some more changes, but nothing you can feel about it, I will send it today to maniac-twister and hope that he releases it soon.