PDA

View Full Version : Change Post Order for a Single Thread


Vitaris
01-13-2014, 03:27 PM
Hi guys, I hope I have the right place for this. I'm sort of at the end of my rope, and the sad thing is, I've already done this before. For the life of me, I can't recall how I did it.

I'd like to reverse the post order (descending from newest post to oldest) of a single thread. It's been requested by my members for a very long, popular and important thread on my boards.

I've searched the web and seen the usual "change default for all forums", "change order for a particular forum" "change order just for you", etc. options, but not for a single thread (without affecting all other threads in the forum/s). The only queries that are exactly like mine are all the way from 2001-2006.

I'm sure there's a simple way to do this, but I'm just not seeing it. Any help?

Thank you in advance!

Vitaris
01-15-2014, 02:42 AM
I found it! Sharing with people in case they're interested in how I got this to work. I can't find the original source (I know it came from somewhere), so if anybody knows, let me know.

Login to your Admin and go to Plugins and Products > Add New Plugin

Set the following fields:

Product: Vbulletin
Hook Location: showthread_getinfo
Title: Whatever you'd like to call this plugin (eg. Welcome Thread Inverted)
Execution Order: 5 (This is the default setting I have, I guess there's no need to change it)

Plugin PHP Code:

if($thread['threadid'] == XXX) $postorder = 'DESC';

Plugin is Active: Yes

Where XXX is the thread ID, and DESC is used to show threads from newest to oldest. Svae this plugin and reload your thread. It should now be inverted.