|
Revision 5, 1.0 KB
(checked in by daris, 3 years ago)
|
|
portal: language files review
|
| Line | |
|---|
| 1 | <?php |
|---|
| 2 | /*********************************************************************** |
|---|
| 3 | |
|---|
| 4 | PunBB extension |
|---|
| 5 | Portal |
|---|
| 6 | Daris <daris91@gmail.com> |
|---|
| 7 | |
|---|
| 8 | ************************************************************************/ |
|---|
| 9 | |
|---|
| 10 | |
|---|
| 11 | $count = 5; // count users |
|---|
| 12 | $guest = true; // display guest |
|---|
| 13 | |
|---|
| 14 | |
|---|
| 15 | // Make sure no one attempts to run this script "directly" |
|---|
| 16 | if (!defined('FORUM')) |
|---|
| 17 | exit; |
|---|
| 18 | |
|---|
| 19 | $query = array( |
|---|
| 20 | 'SELECT' => 'u.id, u.username, u.num_posts', |
|---|
| 21 | 'FROM' => 'users AS u', |
|---|
| 22 | 'ORDER BY' => 'u.num_posts DESC', |
|---|
| 23 | 'LIMIT' => '0, '.$count |
|---|
| 24 | ); |
|---|
| 25 | |
|---|
| 26 | if (!$guest) |
|---|
| 27 | $query['WHERE'] = 'u.id<>1'; |
|---|
| 28 | |
|---|
| 29 | ($hook = get_hook('pr_qr_get_top_posters')) ? eval($hook) : null; |
|---|
| 30 | $result = $forum_db->query_build($query) or error(__FILE__, __LINE__); |
|---|
| 31 | |
|---|
| 32 | ?> |
|---|
| 33 | <ul class="top-posters"> |
|---|
| 34 | <?php |
|---|
| 35 | |
|---|
| 36 | while ($cur_user = $forum_db->fetch_assoc($result)) |
|---|
| 37 | { |
|---|
| 38 | |
|---|
| 39 | ?> |
|---|
| 40 | <li><a href="<?php echo forum_link($forum_url['user'], array($cur_user['id'])) ?>"><?php echo forum_htmlencode($cur_user['username']) ?></a> (<?php echo $lang_common['Posts'] ?>: <?php echo $cur_user['num_posts'] ?>)</li> |
|---|
| 41 | <?php |
|---|
| 42 | |
|---|
| 43 | } |
|---|
| 44 | |
|---|
| 45 | ?> |
|---|
| 46 | </ul> |
|---|
| 47 | |
|---|