by tumba25 » 30 Jan 2009, 15:53
In phpBB up to 3.0.4 (don't know about following versions yet) the sorting in memberlist.php is case sensitive. Thus giving A-Z followed by a-z if you sort by location or website.
Here is my fix to get the sorting case insensitive.
Open memberlist.php
Find
- Code: Select all
$order_by .= $sort_key_sql[$sort_key] . ' ' . (($sort_dir == 'a') ? 'ASC' : 'DESC');
replace with
- Code: Select all
$order_by .= (($sort_key != 'd' && $sort_key != 'm') ? 'LOWER(' : '') . $sort_key_sql[$sort_key] . (($sort_key != 'd') ? ') ' : ' ') . (($sort_dir == 'a' && $sort_key != 'm') ? 'ASC' : 'DESC');
Last edited by
tumba25 on 04 Mar 2009, 12:29, edited 1 time in total.
Reason: Bugfix
What is a Regular Expression?
- Regular Expressions are a means by which IT People confuse non IT people
- Regular Expressions are horribly cryptic
- Regular Expressions give the wrong answer