1
pavant
newbb - Setting default view to Flat
  • 2004/10/29 21:23

  • pavant

  • Just popping in

  • Posts: 20

  • Since: 2004/10/20


How can I set the default view of the discussion forum to Flat instead of Threaded? It defaults to Flat in the Guest mode but registered users have to specifically click on Flat to enable it.

Thanks.

2
tedsmith
Re: newbb - Setting default view to Flat
  • 2004/10/29 23:02

  • tedsmith

  • Home away from home

  • Posts: 1151

  • Since: 2004/6/2 1


Go to System Admin\Preferences\General Settings.

About 2/3 of the way down it says 'Default Comment Display Mode'. Set that to Flat then all your registered users should all get the same flat view, unless they specifically ask for threaded view in the Profile.

Have Fun

Ted

BTW - I know the forums can be hard to find answers in sometimes, but this question has been asked a few times in these forums. If you do a search for 'Flat' or 'Flat Nested' I'm sure you would find it. I know this because I've asked the same question myself before and got told the same thing! Its all good fun!

3
pavant
Re: newbb - Setting default view to Flat
  • 2004/10/29 23:17

  • pavant

  • Just popping in

  • Posts: 20

  • Since: 2004/10/20


Got it! Thanks very much, tedsmith!

4
rajaito
Re: newbb - Setting default view to Flat
  • 2005/1/3 23:58

  • rajaito

  • Not too shy to talk

  • Posts: 109

  • Since: 2005/1/3 1


Well... I hate that threaded vs flat option all together so I did something a little differently. Hopefully this helps some of you.

My site is new so it was easier for me then it will be for all you webmasters that have a ton of users already. First I went into each users account and chose flat as their prefered option. Then I went into the admin options and followed the directions above:

Go to System Admin\Preferences\General Settings.

About 2/3 of the way down it says 'Default Comment Display Mode'. Set that to Flat then all your registered users should all get the same flat view


Then so that none of my users have the default option to choose from, I opened edituser.php and removed the following:

$umode_select = new XoopsFormSelect(_US_CDISPLAYMODE, 'umode', $xoopsUser->getVar('umode'));
$umode_select->addOptionArray(array('nest'=>_NESTED, 'flat'=>_FLAT, 'thread'=>_THREADED));
$uorder_select = new XoopsFormSelect(_US_CSORTORDER, 'uorder', $xoopsUser->getVar('uorder'));
$uorder_select->addOptionArray(array(XOOPS_COMMENT_OLD1ST => _OLDESTFIRST, XOOPS_COMMENT_NEW1ST => _NEWESTFIRST));


save edituser.php upload to zoops root folder.

BUT BE VERY CAREFUL DOING THIS HACK!! If you do not make sure all your users have flat chosen (double/triple check!!) then you will NEVER be able to fix it, without putting the code back in. I personally am going to save it just in case I am wrong. But all seems to be working so far. The only other thing I want to point out is that I am choosing to leave the flat/threaded link option listed at the bottom of each thread. Just in case my users like it better that way for some odd reason. But I bet if you want to get rid of that, it wouldn't be to hard to figure out.

GOOD LUCK!!!

5
rajaito
Re: newbb - Setting default view to Flat
  • 2005/1/4 0:00

  • rajaito

  • Not too shy to talk

  • Posts: 109

  • Since: 2005/1/3 1


Oh, by the way the code above that I suggested that you remove, also included the user option to choose newest or oldest comment first. Personally I want everyone to see the same thing on my site, so I removed it.

Just take out what you want.

6
rajaito
Re: newbb - Setting default view to Flat
  • 2005/1/4 0:02

  • rajaito

  • Not too shy to talk

  • Posts: 109

  • Since: 2005/1/3 1


COOL IT IS STILL WORKING FOR ME!


Login

Who's Online

158 user(s) are online (86 user(s) are browsing Support Forums)


Members: 0


Guests: 158


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