Sorting list, isolating host in e-mail
Posted: Thu Jan 11, 2007 7:31 pm
feyd | Please use
Hopefully that'll give you an idea of the method of sorting that's being used. Pretty much everything else that needs to be added is display related and I can fix that. Thanks in advance for any help you guys can give me.
feyd | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
Ok, setup...
I'm using PHPBB2 and have added the Advanced User Search ([url=http://www.phpbb.com/phpBB/viewtopic.php?t=241289]Click for topic on script[/url]). Well I'm trying to add new sort options for the output that aren't normally availible, such as sorting by enabled/disabled accounts. This is simple, even if I wasn't framilar with PHP I could follow the examples of the others (such as sort by username or e-mail).
One thing that I'd -really- like to have is sorting by e-mail host, for example, bring all the @gmail.com to the top, then all the @yahoo.com and on down the alphabetical list. I'm having trouble figuring out how to isolate the host though. I was hoping someone had a suggestion. Here's bits of the normal sorting for e-mail.Code: Select all
switch(strtolower($HTTP_GET_VARS['sort']))
{
case 'user_email':
$sort = 'user_email';
$select_sql .= "u.user_email";
break;
}Code: Select all
'U_EMAIL' => ( ( $sort == 'user_email' ) ? append_sid("$base_url&sort=$sort&order=$o_order") : append_sid("$base_url&sort=user_email&order=$order") ),feyd | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]