MyBB Community Forums

Full Version: Hello, a question from a new user.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello, I've had my BB up and running now for two whole days, and am very impressed so far.
Q. On my BB, I only want one forum, and I would like users to logon to and see the screen that displays when you click on a forum, i.e. go straight to a list of threads in the forum. Is this possible?

Cheers
Martyn
Hi,

In order to do this, you'll need to change some code.

First of all, please download Notepad ++, this is best for editing php code, it can be found here: http://downloads.sourceforge.net/notepad...g_mirror=0

Once that is installed, open your ftp progam and download the file "member.php" (exists in the forums root directory).

1. Open the file with Notepad++ and find the following code:

	if($mybb->input['url'] != "" && strpos(basename($mybb->input['url']), 'member.php') === false)
	{
		// Redirect to the URL if it is not member.php
		redirect(htmlentities($mybb->input['url']), $lang->redirect_loggedin);
	}
	else
	{
		redirect("index.php", $lang->redirect_loggedin);
	}

2. now were it says:

redirect("index.php", $lang->redirect_loggedin);

3. Replace index.php with forumdisplay.php?fid=2, so it should become:

redirect("forumdisplay.php?fid=2", $lang->redirect_loggedin);

4. Now, make sure you replace 2 with whatever your forum fid is.

5. Save the file, and re upload it, overwriting the old member.php on the server, your users should now be redirected to the forum after logging in.
Thanks for that, it took me dowbn one level, but I still need to click on the name of the forum to view the threads list. Can I redirect straight to a list of all the threads in the forum?
Sorry, looking again, the code change has had no effect.
Our you sure you overwrote the file with the updated one?, because I just tried my instructions again and it seemed it work.
Chris Wrote:Our you sure you overwrote the file with the updated one?, because I just tried my instructions again and it seemed it work.

I'm sure. When a user logs on they still see the My Category screen, with a link to the Forum.

I want them to see the list of threads on that Forum.
Can anyone help with this?
would a solution be to make the index.php always redirect to forumdisplay.php?fid=2
Possibly make a copy of forum display.php and rename it index. Then use an isset statement to specify the default fid as 2 if it has not been set. Though i would try what Chris said above and make sure you have replaced index.php with forumdisplay.php?fid=2.
Let me just confirm what I think you mean:

When a user logins into your forum, instead of going back to the index.php after the redirect message, they are sent to the forumdisplay list?

Am I picking it up correctly? Toungue

Thanks.
Chris Wrote:Let me just confirm what I think you mean:

When a user logins into your forum, instead of going back to the index.php after the redirect message, they are sent to the forumdisplay list?

Am I picking it up correctly? Toungue

Thanks.

Yes, as there will only ever be one forum, they should never see the forum list (index.php) but always go to the forumdisplay list, from wherever they are.