Topic: User list sorting issue

When sorting the user list by status (e.g. member/moderator/admin), the links at the bottom used to go to the next page of users do not retain the status filter. 

Here is a fix:

File: userlist.php
Line: 164
New Code: (addition in red)

<td><?php echo $lang_common['Pages'].': '.paginate($num_pages, $p, 'userlist.php?show_group='.$show_group.'& order_by='.$order_by.'&direction='.strtolower($direction)) ?></td>

Re: User list sorting issue

Thanks, I'll fix it in 1.2.

"Programming is like sex: one mistake and you have to support it for the rest of your life."

Re: User list sorting issue

Fixed.

"Programming is like sex: one mistake and you have to support it for the rest of your life."

4 (edited by Vanslyde 2006-11-15 01:39)

Re: User list sorting issue

Now is there a way to remove / deactivate the User group dropdown when finding and sorting users?

I'd like the users not to be able to filter their research in any way and deal only with the results provided by the ALL filter

edit: sry I realize this aint a bug ^^.. i didn't check in which category this thread was in : (

Re: User list sorting issue

in userlist.php
FIND

$show_group = (!isset($_GET['show_group']) || intval($_GET['show_group']) < -1 && intval($_GET['show_group']) > 2) ? -1 : intval($_GET['show_group']);

REPLACE WITH

$show_group = -1;

FIND AND DELETE

<label class="conl"><?php echo $lang_ul['User group']."\n" ?>
<br /><select name="show_group">
                        <option value="-1"<?php if ($show_group == -1) echo ' selected="selected"' ?>><?php echo $lang_ul['All users'] ?></option>
<?php

$result = $db->query('SELECT g_id, g_title FROM '.$db->prefix.'groups WHERE g_id!='.PUN_GUEST.' ORDER BY g_id') or error('Unable to fetch user group list', __FILE__, __LINE__, $db->error());

while ($cur_group = $db->fetch_assoc($result))
{
    if ($cur_group['g_id'] == $show_group)
        echo "\t\t\t\t\t\t".'<option value="'.$cur_group['g_id'].'" selected="selected">'.pun_htmlspecialchars($cur_group['g_title']).'</option>'."\n";
    else
        echo "\t\t\t\t\t\t".'<option value="'.$cur_group['g_id'].'">'.pun_htmlspecialchars($cur_group['g_title']).'</option>'."\n";
}

?>
                    </select>

You'll also have to edit $lang_ul['User search info'] to remove the reference to user group

6 (edited by Vanslyde 2006-11-15 02:02)

Re: User list sorting issue

Thanks smile
I also had to remove a <br /> tag right after </select> ^^ so the remaining fields would stay horizontally aligned