View Full Version : Thread display mode question
legija
06-12-2008, 01:32 PM
Hi,
I need option to set this to "newest first" in specific subforum. I have threads where updates are posted, and it would be handy if first post shown is the one which is posted as latest.
I couldn't find how to make it, any help would be apreciated.
Thanks.
Opserty
06-12-2008, 01:39 PM
Have you tried the AdminCP? :D
AdminCP > Forums & Moderators > Forum Permissions > Edit Forum > Default Sort Field/Order
legija
06-12-2008, 01:48 PM
Thanks, but really i could not see "default sort order" field.
3.7.1.
I can see only "Can . . ." this and that, but nothing about sort order. :(
--------------- Added 1213282353 at 1213282353 ---------------
I can get sorted threads to be shown oldest/newest and vice versa.
Thing what i need is, to have POSTS sorted to newest first in this specific subforum.
Boofo
06-12-2008, 01:53 PM
It is there right under Default Sort Field when you edit a forum.
legija
06-12-2008, 01:56 PM
Ofcourse there is, but that settings affects only threads view, not posts inside thread.
That has no use in my specific problem.
Boofo
06-12-2008, 02:12 PM
Can't help you then, sorry.
Opserty
06-12-2008, 02:34 PM
Try this:
AdminCP > Plugins & Products > Add New Plugin > Set:
Product: vBulletin
Hook Location: showthread_getinfo
Title: "..." - Whatever you want
PHP Code:
if(($threadinfo['forumid'] == X) AND ($_GET['postorder'] != 'DESC'))
{
$postorder = 'ASC';
}
Is active? Yes
Replace X with the forumid number of the subforum (You can find it in the Forum Manger).
Haven't tested it but it should work. Also then if users want to override it they can add "&postorder=DESC" to the URL.
legija
06-12-2008, 02:54 PM
Not quite sure if i done it all correctly, but no results with this too :(
Opserty
06-12-2008, 02:58 PM
Oh whoops changes ASC to DESC in the PHP Code.
legija
06-12-2008, 03:08 PM
No luck with this either.
This "mod" should override user selection in "user CP - >options -> thread display mode" from oldest first to newest first.
But only in subforum where i need it.
Lynne
06-12-2008, 03:09 PM
For showthread display: To set for new registrations - vboptions > User Registration Options > Default Registration Options > Thread Display Mode > Linear - Oldset First
If already registered, you can change this in your User CP Options.
legija
06-12-2008, 03:13 PM
Ok, this code worked :
if(($threadinfo['forumid'] == X) AND ($_GET['postorder'] != 'ASC'))
{
$postorder = 'DESC';
}
Where "X" forum ID where i needed mod.
Seems i didnt catched meaning of "X", lol.
Thanks for help 5 stars for You !
--------------- Added 1213287433 at 1213287433 ---------------
For showthread display: To set for new registrations - vboptions > User Registration Options > Default Registration Options > Thread Display Mode > Linear - Oldset First
If already registered, you can change this in your User CP Options.
I dont want to be spread on whole forum, just in one single subforum, where updates are anounced.
For example, You have 3 products to update, and each new update You anounce in that product thread.
Rest of the forum is quite ok with linear -> oldest first.
Lynne
06-12-2008, 03:18 PM
I dont want to be spread on whole forum, just in one single subforum, where updates are anounced.
For example, You have 3 products to update, and each new update You anounce in that product thread.
Rest of the forum is quite ok with linear -> oldest first.
Whoops, sorry, I guess that's what happens when you try to reply after just one cup of coffee. :o
legija
06-12-2008, 03:23 PM
Heeh, np, go for more ! :D
Opserty
06-12-2008, 03:24 PM
So everything is working?
(Yeah, X is the forumid number which you needed to change in the PHP Code to something like 1/2/3/... depending on forum)
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.