1
THCowboy
how to change newbb posts default from threaded to flat
  • 2005/7/1 23:20

  • THCowboy

  • Just popping in

  • Posts: 84

  • Since: 2005/6/28


I have looked and can't find how to make the default viewing of posts in newbb "flat". I know how to
change it for my viewing, but I want to change it so everybody sees flat posts by default.

Here is the code I think needs to be changed..not sure what to change though?

Okay found it here

//use users preferences
if (is_object($xoopsUser)) {
$viewmode = $xoopsUser->getVar('umode');
$order = ($xoopsUser->getVar('uorder') == 1) ? 'DESC' : 'ASC';
} else {
$viewmode = 'flat';
$order = 'ASC';
}

// newbb does not have nested mode
if ($viewmode == 'nest') {
$viewmode = 'thread';
}

// override mode/order if any requested
if (isset($HTTP_GET_VARS['viewmode']) && ($HTTP_GET_VARS['viewmode'] == 'flat' || $HTTP_GET_VARS['viewmode'] == 'thread')) {
$viewmode = $HTTP_GET_VARS['viewmode'];
}
if (isset($HTTP_GET_VARS['order']) && ($HTTP_GET_VARS['order'] == 'ASC' || $HTTP_GET_VARS['order'] == 'DESC')) {
$order = $HTTP_GET_VARS['order'];
}

if ($viewmode != 'flat') {
$xoopsOption['template_main'] = 'newbb_viewtopic_thread.html';
} else {
$xoopsOption['template_main'] = 'newbb_viewtopic_flat.html';
}

2
jdseymour
Re: how to change newbb posts default from threaded to flat

newbb 1 System Admin - Preferences - General Settings.

Newbb 2/CBB the module preferences for the newbb module.

HTH.

3
THCowboy
Re: how to change newbb posts default from threaded to flat
  • 2005/7/2 1:15

  • THCowboy

  • Just popping in

  • Posts: 84

  • Since: 2005/6/28


"newbb 1 System Admin - Preferences - General Settings.

Newbb 2/CBB the module preferences for the newbb module."

okay I have version 1 ...but no sign of a choice under Sytem admin.

and the Forum preferences just says
Enable Notification
&
Enable Specific Events


so I am not sure what you are talking about.
Thanks,Warren

4
THCowboy
Re: how to change newbb posts default from threaded to flat
  • 2005/7/2 1:16

  • THCowboy

  • Just popping in

  • Posts: 84

  • Since: 2005/6/28


Unless you are talking about default comments?

5
jdseymour
Re: how to change newbb posts default from threaded to flat

newbb 1 follows the same as the default comment settings. Comments set to flat, forum is set to flat.

6
mrtrumpets
Re: how to change newbb posts default from threaded to flat
  • 2005/7/6 3:40

  • mrtrumpets

  • Just popping in

  • Posts: 6

  • Since: 2005/6/21


Hi.. Since I was trying the same thing, I tried this... no effect. I changed the primary settings from Nested to Flat.

Anything other than upgrading the forum?

7
phppp
Re: how to change newbb posts default from threaded to flat
  • 2005/7/6 13:02

  • phppp

  • XOOPS Contributor

  • Posts: 2857

  • Since: 2004/1/25


The newbb2/cbb logic:
1 $_GET
2 $_COOKIE
3 user preference for comment/forum posts
3 module preference

Login

Who's Online

139 user(s) are online (96 user(s) are browsing Support Forums)


Members: 0


Guests: 139


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: May 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits