MyBB Community Forums

Full Version: Ideas for Forum Structure (multiple forums?)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello All,

First of all I am new and shopping around for a Forum. Most of the stuff I have read online points me to MyBB over some other options, mainly due to support, customisation and the great community. I have tried a search for this but come up empty - maybe i dunno what to call it or search by..

I have created many websites from scratch, and also by using Drupal, but I have never created a forum. I am after some advice/suggestions on how you guys would set up the following, or if it is even possible:

Basically I want to create a forum for online gaming... I was thinking about having a completely separate forum for each game, each with their own chat box, moderators etc. There would be a landing page website where the user could select which forum they want to enter.

However, I would want all the users to be central i.e. you shouldn't have to register for the COD and Battlefield forum, you should be able to register for one and access all. Admin would also need rights to moderate some chat boxes and threads in certain topics etc, but not others.

I'm guessing this would be achieved by some sort of central user table???
Would MyPHP have features for me to determine what admin are allowed to administer etc (admin from COD would only be able to administer COD shoutbox and forums)...

Thanks in advance for your help, even if you have links to direct me to for info that would be great Smile
Hi,

Here is a quote from another thread you could try - Let us know if that works / if you have any problems with it.

(2012-08-01, 07:47 AM)bowkilled Wrote: [ -> ]
(2012-07-26, 09:45 PM)mobert Wrote: [ -> ]Is there any way to have

1. a user who logs into forum1 automatically logged into forum2? (and vice versa)

2. if they register for forum1 they are registered with forum2? (and vice versa)

3. If they update the password/email , it updates on both

Hi mobert,

Download the MyBBIntegrator constructor here: http://phpdave.com/MyBBIntegrator/, this is a great script because it has basically everything you'd need to integrate your mybb with your front site ready and done.

So, I'm generous today, and I'll share my codes that I've spent time building, so I hope you'll be glad for it.

Login:
<?php
define('IN_MYBB', NULL);
global $mybb, $lang, $query, $db, $cache, $plugins, $displaygroupfields;
require_once '/path/to/mybb_forum/global.php';
require_once '/path/to/MyBBIntegrator.php';
$MyBBI = new MyBBIntegrator($mybb, $db, $cache, $plugins, $lang, $config);

$login_status = $MyBBI->login($_POST['username'], $_POST['password']);
if ($login_status == true) echo 'Logged in successfully';
else echo 'The login routine failed';
?>

Registration:
<?php
define('IN_MYBB', NULL);
global $mybb, $lang, $query, $db, $cache, $plugins, $displaygroupfields;
require_once '/path/to/mybb_forum/global.php';
require_once '/path/to/MyBBIntegrator.php';
$MyBBI = new MyBBIntegrator($mybb, $db, $cache, $plugins, $lang, $config);

$info = array(
    'username' => $_POST['username'],
    'password' => $_POST['password'],
    'password2' => $_POST['password_confirm'],
    'email' => $_POST['email'],
    'email2' => $_POST['email'],
    'hideemail' => 1,
    'allownotices' => 1,
    'emailpmnotify' => 1,
    'invisible' => 0,
    'receivepms' => 1
);

$register_status = $MyBBI->register($info);

// Array means: registering failed
if (is_array($register_status))
{
    echo implode('<br />', $register_status);
}
else
{
    echo $register_status;
}
?>

Update password: (You must adjust the $_POST['newpassword'] after your html form input, you should use the same field name "<input name=" FIELD NAME " />" as you do in your POST variable.

<?php
define('IN_MYBB', NULL);
global $mybb, $lang, $query, $db, $cache, $plugins, $displaygroupfields;
require_once '/path/to/mybb_forum/global.php';
require_once '/path/to/MyBBIntegrator.php';
$MyBBI = new MyBBIntegrator($mybb, $db, $cache, $plugins, $lang, $config);

$myupdatepass = $MyBBI->updatePasswordOfUser($MyBBI->mybb->user['uid'], $_POST['newpassword']);
if ($myupdatepass === true)
{
    echo 'Password updated';
}
else
{
    echo $myupdatepass;
}
?>

Update email:
<?php
define('IN_MYBB', NULL);
global $mybb, $lang, $query, $db, $cache, $plugins, $displaygroupfields;
require_once '/path/to/mybb_forum/global.php';
require_once '/path/to/MyBBIntegrator.php';
$MyBBI = new MyBBIntegrator($mybb, $db, $cache, $plugins, $lang, $config);

/* You must change the $yourusernamevariable to whatever your system uses, most common are $user, $username or $uname. */

$username = $yourusernamevariable;
$email = $_POST['email'];

$db->update_query("users", $email, "uid='".$yourusername."'", 1);
$plugins->run_hooks('password_changed');
?>

If you find them helpful, please give me reputation for it, I'd be more than happy Wink