Quote:
Originally Posted by El Queso
Is there a way to change the default order in which posts are displayed when displaying a thread to users who are not logged in?
The default order is earliest posts first. I have a large forum with threads that reach hundreds (some actually thousands) and go 'way back in time. When unauthenticated users are browsing the forum, I want them to see the latest posts in a thread first so they see the latest information.
I can't find any admin options that allow me to set this default for any but logged in users. I'm assuming I will have to either use a plugin/hook or do a hack, but I can't figure out what template, code file, hook and/or variable I need to look at to make this happen.
|
You need add this PHP code to hook location ... showthread_start ...
Admin CP > Plugin Manager > Add new plugin >
Product : vBulletin
Hook location : showthread_start
Title : Change Display Posts Order For Guests - Newest First
Execution Order : 5
Plugin is Active : Yes
Plugin PHP Code :
PHP Code:
if ($vbulletin->userinfo['userid'] == 0) { $vbulletin->userinfo['postorder'] = 1; }