Ignore:
Timestamp:
Mar 1, 2015, 1:27:40 PM (9 years ago)
Author:
chronos
Message:
  • Added: Show user level and experience also on user profile page.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Modules/User/UserList.php

    r816 r825  
    5050      array('Name' => 'XP', 'Title' => T('Level')),
    5151      array('Name' => 'XP', 'Title' => T('Experience')),
    52       //array('Name' => 'GM', 'Title' => T('GM')),
    5352      array('Name' => 'LastLogin', 'Title' => T('Last logged in')),
    5453      array('Name' => 'RegistrationTime', 'Title' => T('Registration time')),
     
    5857
    5958    $Query = 'SELECT `User`.`ID`, `User`.`Name`, `LastLogin`, `GM`, `XP`, `TranslatedCount`, `RegistrationTime` '.
    60         'FROM `User` '.
    61         'LEFT JOIN `UserTrace` ON `UserTrace`.`User` = `User`.`Id` '.
    62         'WHERE 1'.$SearchQuery.$TeamFilter.$Order['SQL'].$PageList['SQLLimit'];
     59      'FROM `User` '.
     60      'LEFT JOIN `UserTrace` ON `UserTrace`.`User` = `User`.`Id` '.
     61      'WHERE 1'.$SearchQuery.$TeamFilter.$Order['SQL'].$PageList['SQLLimit'];
    6362
    6463    $DbResult = $this->Database->query($Query);
     
    6766      $XP = GetLevelMinMax($Line['XP']);
    6867      $Output .= '<tr><td><a href="user.php?user='.$Line['ID'].'">'.$Line['Name'].'</a></td>'.
    69           '<td style="text-align: center;"><a href="TranslationList.php?user='.$Line['ID'].'&amp;group=0&amp;state=2" title="Zobrazit Všechny jeho přeložené texty">'.$Line['TranslatedCount'].'</a></td>'.
    70           '<td>'.$XP['Level'].'</td>'.
    71           '<td>'.ProgressBar(150, round($XP['XP'] / $XP['MaxXP'] * 100, 2), $XP['XP'].' / '.$XP['MaxXP']).'</td>'.
    72           //<td>'.$Moderators[$Line['GM']].'</td>
    73       '<td>'.HumanDate($Line['LastLogin']).'</td>'.
    74       '<td>'.HumanDate($Line['RegistrationTime']).'</td></tr>';
     68        '<td style="text-align: center;"><a href="TranslationList.php?user='.$Line['ID'].'&amp;group=0&amp;state=2" title="Zobrazit Všechny jeho přeložené texty">'.$Line['TranslatedCount'].'</a></td>'.
     69        '<td>'.$XP['Level'].'</td>'.
     70        '<td>'.ProgressBar(150, round($XP['XP'] / $XP['MaxXP'] * 100, 2), $XP['XP'].' / '.$XP['MaxXP']).'</td>'.
     71        '<td>'.HumanDate($Line['LastLogin']).'</td>'.
     72        '<td>'.HumanDate($Line['RegistrationTime']).'</td></tr>';
    7573    }
    7674    $Output .= '</table>'.
Note: See TracChangeset for help on using the changeset viewer.