Author |
Topic |
|
thelodger
Junior Member
United Kingdom
296 Posts |
Posted - 25 March 2008 : 12:09:38
|
order?
Hi is it possible to mod the mod to display the online list in alphabetical order, its currently doesn't appear to be in any order at all, so I was wondering if its possible to do this? |
|
Shaggy
Support Moderator
Ireland
6780 Posts |
Posted - 25 March 2008 : 12:14:11
|
It currently displays users sorted by the time of their last action on the forums.
I don't have a clean copy of the mod to hand but, if you can post a link to a *.txt copy of your active users file, I'll show you what changes you need to make.
|
Search is your friend “I was having a mildly paranoid day, mostly due to the fact that the mad priest lady from over the river had taken to nailing weasels to my front door again.” |
|
|
thelodger
Junior Member
United Kingdom
296 Posts |
|
Shaggy
Support Moderator
Ireland
6780 Posts |
Posted - 25 March 2008 : 12:25:31
|
Well, what do you know, the clean files actually don't sort the active users in any particular order; it's one of the first things I add when using this mod.
Anyway, to sort them by name, find the following on line 125 and add the code in green:strSql = "SELECT ME.MEMBER_ID, ME.M_NAME, ME.M_AUHIDE, AU.AU_IP, AU.AU_LOGINTIME, AU.AU_LASTACTIVETIME, AU.AU_LASTPAGE, ME.M_ICQ, ME.M_YAHOO, ME.M_AIM, ME.M_MSN, ME.M_LEVEL, AU.AU_QUERYSTRING, AU.AU_USER_AGENT " & _
"FROM " & strTablePrefix & "ACTIVE_USERS AU, " & strMemberTablePrefix & "MEMBERS ME " & _
"WHERE AU.MEMBER_ID = ME.MEMBER_ID" & _
" ORDER BY ME.M_NAME ASC" |
Search is your friend “I was having a mildly paranoid day, mostly due to the fact that the mad priest lady from over the river had taken to nailing weasels to my front door again.” |
Edited by - Shaggy on 25 March 2008 12:38:11 |
|
|
thelodger
Junior Member
United Kingdom
296 Posts |
Posted - 25 March 2008 : 12:34:23
|
thanks, that doesnt seem to make any diference only when I click on active users I get this error
quote: Microsoft OLE DB Provider for ODBC Drivers error '80040e14' [MySQL][ODBC 3.51 Driver][mysqld-5.0.22-log]You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'BY ME.M_NAME ASC' at line 1
/active_users.asp, line 129
On the main forum it just shows as it did before.
|
|
|
thelodger
Junior Member
United Kingdom
296 Posts |
Posted - 25 March 2008 : 12:36:27
|
line 129 is
set rsAM = my_conn.execute (strSql) |
|
|
Shaggy
Support Moderator
Ireland
6780 Posts |
Posted - 25 March 2008 : 12:38:51
|
Forgot to add a space before "ORDER"; reply updated above. Sorry.
|
Search is your friend “I was having a mildly paranoid day, mostly due to the fact that the mad priest lady from over the river had taken to nailing weasels to my front door again.” |
|
|
thelodger
Junior Member
United Kingdom
296 Posts |
Posted - 25 March 2008 : 12:43:54
|
Thanks, thats got rid of the error, and its now showing in active user.asp everything in alphabet order but it still doesn't show it in order on the main forum, is it possible to change that also? |
|
|
Shaggy
Support Moderator
Ireland
6780 Posts |
Posted - 25 March 2008 : 12:52:18
|
Yup, throw up a link to a *.txt copy of inc_activeusers.asp and I'll show you how.
|
Search is your friend “I was having a mildly paranoid day, mostly due to the fact that the mad priest lady from over the river had taken to nailing weasels to my front door again.” |
|
|
thelodger
Junior Member
United Kingdom
296 Posts |
|
Shaggy
Support Moderator
Ireland
6780 Posts |
Posted - 25 March 2008 : 12:56:58
|
Actually, you just need to add the exact same line of code to the strSql string you'll find beginning on line 52 of that file.
|
Search is your friend “I was having a mildly paranoid day, mostly due to the fact that the mad priest lady from over the river had taken to nailing weasels to my front door again.” |
|
|
thelodger
Junior Member
United Kingdom
296 Posts |
Posted - 25 March 2008 : 12:58:08
|
yep guessed that, thanks ever so much. |
|
|
Shaggy
Support Moderator
Ireland
6780 Posts |
Posted - 25 March 2008 : 13:00:49
|
You're welcome
|
Search is your friend “I was having a mildly paranoid day, mostly due to the fact that the mad priest lady from over the river had taken to nailing weasels to my front door again.” |
|
|
|
Topic |
|