View Full Version : reverse thread order without breaking chief first post?
mooreaa
10-12-2008, 11:44 AM
Hello,
I am looking for a way to reverse the display order of the posts from newest to oldest. I am trying to use this on my articles section so the newer comments are are at the top. Is there a way for me to do this without breaking chief first post?
I'm not quite sure where/how to implement this so it only happens on SOME of my forums...
For clarification, I am not trying to reverse sort the threads... i'm trying to reverse sort the posts within a thread.
Lynne
10-12-2008, 05:04 PM
Have you tried posting this in the Cheif First Post thread? They may have some suggestions on how to go about it since they know the code used for the modification. I would guess that they'll at least be able to help you with the code to still have the earliest be the first post displayed, but doing it for only certain forums is going to be a bit more difficult (or maybe not? I don't know... I do see a new plugin in your future though).
Basic idea to implement this feature;
1) Add one query to showthread.php to fetch the first posts data.
This would be a simple plug-in with a simple SQL statement. It will pull all needed information about the first post from the database based on postid. This information would then be used in a new template, and the showthread template would be modified to include it about the postbits.
2) Reversing post order;
Would be as simple as using the default option provided by vBulletin already.
3) Functionality needed in only certain forums;
As simple as adding a new option for each forum and a simple switch/if statement. Doing this is trivial.
So yes you're looking at a few new plug-ins, probably best supplied as a product file. :)
mooreaa
10-13-2008, 01:51 AM
Thanks for your replies,
Brad can you expand on #2? How can I hook into the VB way of changing the post order?
--------------- Added 1223882033 at 1223882033 ---------------
ok I added:
$postorder = "DESC";
to showthread_query and this seems to be working with a few changes to cheifpost...
a few problems though... the quick reply system is still causing the ajax insertion to go to the bottom... is there a way to cause the page to refresh or force the ajax to insert the new post at the top of the page?
vBulletin® v3.8.12 by vBS, Copyright ©2000-2024, vBulletin Solutions Inc.