PDA

View Full Version : Different forum order for different styles?


Mark Hewitt
07-10-2007, 11:41 AM
I have two basic styles on my site, one which focuses on Racing (Car racing) and one on Rallying.

In the Rallying style I'd like to have the rallying forums appear at the top, is there a simple way to do this?

Mark Hewitt
09-17-2007, 10:02 AM
*bump* I'm still trying to figure this out with no luck. It was so easy in vb2 :(

WhaLberg
09-17-2007, 10:55 AM
This is not something that many vBulletin owners may need so you should better post this at paid services forum.

Mark Hewitt
09-19-2007, 07:31 AM
If I could just get some understanding of how the code gets the forum ordering from the database and then uses it to display the main page, I'd be half way there.

In vb2 it was the "displayorder" field in the forum table, which is still there. But the only reference I can find to that in the code seemingly isn't used any more :confused:

Well I've finally figured it out..

I did it by going into the construct_forum_bit function and putting this in

foreach ($vbulletin->iforumcache["$parentid"] AS $forumid)
{

if($userStyle == 13) // If we are on rallyforum then swap the sections over
{
if($forumid == 118) {
$forumid = 120;
} else {

if($forumid == 120) {
$forumid = 118;
}
}
} // end if rallyforum
etc...