The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
![]()
I have moderators set-up on my forum (www.tbaec.ca) but on the main forum page, the /forum/index.php page where it lits - Forums - Last Post - Threads - Posts - Moderator - it has the moderators listed under Moderator in a different order depending on the category. Is there a way I can make them listed alphabetically instead of just at random?
I have tried adding them in ACP starting with the last username in alphabetical order as well as adding them starting with the first username in alphabetical order but they still sometimes appear in whatever order they feel regardless of the oder in which they are added?! Is there a way to make them show up listed first to last, A-Z, not just mis-matched? In my opinion it just makes the forum look un-organized and is just something that has been bugging me so any help is appreciated! Thank you for your time, -Marc --------------- Added [DATE]1224136606[/DATE] at [TIME]1224136606[/TIME] --------------- NOTE: how MarcGSR appears at the bottom of the list instead of in between Frogg & Neeman77 like it should be if it was alphabetical order... ![]() I've tried fooling around with it and it STILL list the mods in random order! This is really bugging me :| ![]() |
#2
|
||||
|
||||
![]()
Hi again. I decided to do a quick try of what I was suggesting over on vb.com. Go to includes/functions_forumlist.php and find the query around line 21. At the end of the query you need to add "ORDER BY user.username ASC". This is what my line 26 and 27 look like when I add this:
PHP Code:
|
#3
|
||||
|
||||
![]()
Oh perfect, I will try that out later tonight when I get home from work. Thank you very much!
So now I presume it won't matter which order I add the mods, they will just get sorted into alphabetical order? P.S. Strange that vB doesn't do this naturally... I figured that more people would have been bothered by this issue and having their mods showing up in random order. |
#4
|
|||
|
|||
![]()
Great! Thanks to Lynne!
|
#5
|
||||
|
||||
![]()
I got my Mods to display in order in the forum list, but it messed up the PMs.
Database error - wrong syntax. Any ideas? Thanks |
#6
|
||||
|
||||
![]()
Post the code original code and then the modified code (just five lines above and below the code so we can tell where it is) and the file name so we can see what you did. Please use the php tags.
|
#7
|
||||
|
||||
![]()
This is the message I received:
Code:
SELECT moderator.*, user.username, IF(user.displaygroupid = 0, user.usergroupid, user.displaygroupid) AS displaygroupid, infractiongroupid FROM moderator AS moderator INNER JOIN user AS user USING(userid) WHERE moderator.userid = 444ORDER BY moderator.userid; MySQL Error : 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 moderator.userid' at line 5 This was the original code: Code:
IF(user.displaygroupid = 0, user.usergroupid, user.displaygroupid) AS displaygroupid, infractiongroupid FROM " . TABLE_PREFIX . "moderator AS moderator INNER JOIN " . TABLE_PREFIX . "user AS user USING(userid) " . ($userid != null ? "WHERE moderator.userid = " . intval($userid) : "") . " "); while ($moderator = $vbulletin->db->fetch_array($forummoderators)) { fetch_musername($moderator); $imodcache["$moderator[forumid]"]["$moderator[userid]"] = $moderator; $mod["$moderator[userid]"] = 1; } I cut and pasted your code: Code:
IF(user.displaygroupid = 0, user.usergroupid, user.displaygroupid) AS displaygroupid, infractiongroupid FROM " . TABLE_PREFIX . "moderator AS moderator INNER JOIN " . TABLE_PREFIX . "user AS user USING(userid) " . ($userid != null ? "WHERE moderator.userid = " . intval($userid) : "") . "ORDER BY user.username ASC "); while ($moderator = $vbulletin->db->fetch_array($forummoderators)) { fetch_musername($moderator); $imodcache["$moderator[forumid]"]["$moderator[userid]"] = $moderator; $mod["$moderator[userid]"] = 1; } Thanks |
#8
|
||||
|
||||
![]()
Add a space before the ORDER.
|
#9
|
||||
|
||||
![]()
Lynne,
Thank you! That worked. James |
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|