The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
![]()
In forumdisplay.php I have the following code placed to alphabetize the thread titles in one forum.
switch ($sortfield) { case 'title': case 'lastpost': case 'replycount': case 'views': case 'postusername': case 'voteavg': break; default: if($foruminfo[forumid]==163) $sortfield='title'; else $sortfield='lastpost'; } This is placing the threads in reversed alphabetical order Z - A. How can I change it to place them A-Z? Thanks! |
#2
|
||||
|
||||
![]()
add $sqlsortoder='ASC'; to your if cond
![]() |
#3
|
|||
|
|||
![]()
Like this?
default: if($foruminfo[forumid]==163) $sortfield='title'; $sqlsortorder='ASC'; else $sortfield='lastpost'; Edited to add: It worked!! :classic: Thanks!! |
#4
|
|||
|
|||
![]()
I spoke too soon.
I placed the same code as another "if" to include another forum, like this: default: if($foruminfo[forumid]==163) $sortfield='title' AND $sqlsortorder='ASC'; if($foruminfo[forumid]==164) $sortfield='title' AND $sqlsortorder='ASC'; else $sortfield='lastpost'; } Problem is it only works for page 1. Page 2 puts them in reverse order. |
#5
|
||||
|
||||
![]()
If you click here, you will see that it reverses the order when you go back to page one by clicking on the page1 link...
It has something to do with the "pagenumber" ![]() Satan |
#6
|
|||
|
|||
![]()
Oh wonderful! :dead:
:classic: |
#7
|
|||
|
|||
![]()
I tried this:
default: if($foruminfo[forumid]==163) $sortfield='title' AND $sqlsortorder='ASC'; if($foruminfo[forumid]==163 AND pagenumber=2) $sortfield='title' AND $sqlsortorder='ASC'; if($foruminfo[forumid]==164) $sortfield='title' AND $sqlsortorder='ASC'; else $sortfield='lastpost'; } And got this: Parse error: parse error, unexpected '=' in /usr/www/users/mother1/discussions/forumdisplay.php on line 376 |
#8
|
|||
|
|||
![]()
And tried this:
default: if($foruminfo[forumid]==163) $sortfield='title' AND $sqlsortorder='ASC'; if($foruminfo[forumid]==163 AND $foruminfo[pagenumber]==2) $sortfield='title' AND $sqlsortorder='ASC'; Didn't get a parse error but no desired result either. ![]() |
#9
|
||||
|
||||
![]()
your synatx is incorrect, you have to do it like this:
PHP Code:
|
#10
|
|||
|
|||
![]()
Isn't this feature already available?
You click on "Thread" at the top of the forum (Click here to arrange all of General Hacking Discussion's threads alphabetically). It then arranges the threads alphabetically. Dave. |
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|