The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Adding a thread sort option
I want to be able to sort threads within a forum by prefix (if the forum has prefixes)?not just choose to only show threads with a particular prefix.
So, I modified the showthread template like this: PHP Code:
So, is "prefixid" just the wrong variable, or do I need to add some code (with a plugin?) to process it? |
#2
|
|||
|
|||
You need a simple plugin to make that work. Use hook location forumdisplay_sort and code like this:
Code:
if ($sortfield == 'prefixid') $sqlsortfield = 'thread.prefixid'; |
Благодарность от: | ||
blind-eddie |
#3
|
|||
|
|||
That works just right!
When I created the prefixes, I did so in alphabetical order, so sort by id works fine. Thank you!! |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|