When I log in I look for new customers but the default sort is by Name
which I then have to sort by ID to find new registrants.
Where can I adjust things so that the default order is by ID ?
click “ID”
I knew that johnbol1. Just asking to find a way to make ID 'highest first' the default sort order
when the list is first displayed.
So far only 150 members but later it will be time consuming to resort every time I want to see
the latest members.
[quote name='termalert' timestamp='1385990760' post='172728']
I knew that johnbol1. Just asking to find a way to make ID 'highest first' the default sort order
when the list is first displayed.
So far only 150 members but later it will be time consuming to resort every time I want to see
the latest members.
[/quote]
What version are you using?
John
Change default sort order of customers to ID to display by the more recently registered customer.
Open:-
/app/functions/fn.users.php
Find:-
$sorting = db_sort($params, $sortings, 'name', 'asc');
Replace with:-
$sorting = db_sort($params, $sortings, 'user_id', 'desc');
Remember to create a backup of any files, folders or database entries you may edit at all times.
[size=5][font=arial,helvetica,sans-serif]Using 3.0.6[/font][/size]
[size=5][font=arial,helvetica,sans-serif]can't find [/font][/size][font=arial, helvetica, sans-serif][size=5] [/size][/font][color=#008800][font=arial, helvetica, sans-serif][size=5]/app/[/size][/font][/color][color=#000000][font=arial, helvetica, sans-serif][size=5]functions[/size][/font][/color][color=#666600][font=arial, helvetica, sans-serif][size=5]/[/size][/font][/color][color=#000000][font=arial, helvetica, sans-serif][size=5]fn[/size][/font][/color][color=#666600][font=arial, helvetica, sans-serif][size=5].[/size][/font][/color][color=#000000][font=arial, helvetica, sans-serif][size=5]users[/size][/font][/color][color=#666600][font=arial, helvetica, sans-serif][size=5].[/size][/font][/color][color=#000000][font=arial, helvetica, sans-serif][size=5]php[/size][/font][/color]
[color=#000000][font=arial, helvetica, sans-serif][size=5]Having to click on ID isn't such a huge chore I guess.[/size][/font][/color]
[size=5][font=arial,helvetica,sans-serif][color=#000000]Thanks anyway good people.[/color][/font][/size]
[quote name='termalert' timestamp='1386051118' post='172781']
[size=5][font=arial,helvetica,sans-serif]Using 3.0.6[/font][/size]
[size=5][font=arial,helvetica,sans-serif]can't find [/font][/size][color=#008800][font=arial, helvetica, sans-serif][size=5]/app/[/size][/font][/color][color=#000000][font=arial, helvetica, sans-serif][size=5]functions[/size][/font][/color][color=#666600][font=arial, helvetica, sans-serif][size=5]/[/size][/font][/color][color=#000000][font=arial, helvetica, sans-serif][size=5]fn[/size][/font][/color][color=#666600][font=arial, helvetica, sans-serif][size=5].[/size][/font][/color][color=#000000][font=arial, helvetica, sans-serif][size=5]users[/size][/font][/color][color=#666600][font=arial, helvetica, sans-serif][size=5].[/size][/font][/color][color=#000000][font=arial, helvetica, sans-serif][size=5]php[/size][/font][/color]
[color=#000000][font=arial, helvetica, sans-serif][size=5]Having to click on ID isn't such a huge chore I guess.[/size][/font][/color]
[size=5][font=arial,helvetica,sans-serif][color=#000000]Thanks anyway good people.[/color][/font][/size]
[/quote]
For V3 you need to make the change in core/fn.users.php
look at line 877
Change
if (empty($params['sort_by']) || empty($sortings[$params['sort_by']])) {
$params['sort_by'] = 'name';
}
to
if (empty($params['sort_by']) || empty($sortings[$params['sort_by']])) {
$params['sort_by'] = 'id';
}
then line 883
change
// Reverse sorting (for usage in view)
$params['sort_order'] = $params['sort_order'] == 'asc' ? 'desc' : 'asc';
to
// Reverse sorting (for usage in view)
$params['sort_order'] = $params['sort_order'] == 'asc' ? 'desc' : 'desc';
john
Thanks John.
I took it out for a spin but then had to restore the original file.
The default order was ID ascending which I had to click anyway
to sort descending. Then it wouldn't budge when I tried to sort
and got stuck in descending order.