The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
change thread sort order?
We have one specific thread that I would like to change the sort order on from descending to ascending. I can change the Default Sort Order of that specific forum, however it does not affect the thread within it.
Is this something that can be done? |
#2
|
|||
|
|||
Would be nice if you say what version you use vb3.x and vb4 are very different.
|
#3
|
||||
|
||||
actually no, there is no difference whatsoever in the plugin to create for any version of vBulletin...
hook: showthread_getinfo PHP Code:
the logic behind the "no postorder" is that you usually start reading a thread when it started, and when you click the icon "go to last unread post", you are redirected where you were last time... if you force the order, the button will work, but it will require you to scroll back... |
#4
|
|||
|
|||
Excuse my lack of knowledge in this respects. I would like to make it into a plugin like this, but I do not know how to implement the php code section..
<?xml version="1.0" encoding="ISO-8859-1"?> <plugins> <plugin active="1"> <title>Reverse Thread Sorting</title> <hookname>showthread_getinfo</hookname> <phpcode><![CDATA[$this->validfields['forumhomeicon'] = array(TYPE_STR, REQ_NO);]]></phpcode> </plugin> </plugins> if($threadid == '35') $postorder = 'ASC'; And then do I have call the hook in another file or will it work as an option automatically? Thank you |
#5
|
||||
|
||||
Why are you doing it in xml? Just go to Plugins & Products and select Add New Plugin and add it there. If you later want to export it, you export it from the Download /Upload Plugins page.
|
#6
|
|||
|
|||
ohh ok. Thank you Lynne.
Now that I have it as a plugin, how do I use it on that thread? or should thread 35 automatically reverse the sort order? I dont see any new menu options or the order being reversed. |
#7
|
||||
|
||||
You don't get any 'options' because you didn't add any. You may have to use $thread['threadid'] or $threadinfo['threadid'] instead of $threadid.
|
#8
|
|||
|
|||
I have tried the following and none worked.
if($threadid == '35') $postorder = 'ASC'; if($thread['35']) $postorder = 'ASC'; if($threadinfo['35']) $postorder = 'ASC'; |
#9
|
||||
|
||||
That's not what I said to do. I said put in $thread['threadid'] or $threadinfo['threadid'] instead of $threadid. Exactly. I didn't say change 'threadid' to the actual threadid.
|
#10
|
|||
|
|||
Well thank you for pointing that out. I do not want all threads to be changed, just the specific one.
|
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|