SMF doesn't use constants for every table name, but there is a mod to do so.
http://www.simplemachines.org/community/index.php?topic=19045.0It's meant to share the tables between two forums, but that's essentially what you're planning to do. However, the way I would do it is essentially this: (requires admin ui work...)
ALTER TABLE smf_boards
ADD ID_FORUM tinyint(4) unsigned NOT NULL default 0;
And then add in the Settings.php for each forum:
$ID_FORUM = 1;
(change the 1 to 2, 3, 4, etc. for each forum..)
Next, edit Load.php... find this:
// Just build this here, it makes it easier to change/use.
if ($user_info['is_guest'])
$user_info['query_see_board'] = 'FIND_IN_SET(-1, b.memberGroups)';
// Administrators can see all boards.
elseif ($user_info['is_admin'])
$user_info['query_see_board'] = '1';
// Registered user.... just the groups in $user_info['groups'].
else
$user_info['query_see_board'] = '(FIND_IN_SET(' . implode(', b.memberGroups) OR FIND_IN_SET(', $user_info['groups']) . ', b.memberGroups))';
Add after it:
$user_info['query_see_board'] .= ' AND b.ID_FORUM IN (0, ' . $GLOBALS['ID_FORUM'] . ')';
Bam. Done. All you do now is set the ID_FORUM's for the boards in question - but, without modifications to ManageBoards.php you'd have to do this with phpMyAdmin... where 0 would be "all" and "1" would be forum #1 only.
The next complication is posts. So:
ALTER TABLE smf_members
ADD posts1 smallint(5) unsigned NOT NULL default 0,
ADD posts2 smallint(5) unsigned NOT NULL default 0;
And so on for each forum. Now, in Post.php:
updateMemberData($ID_MEMBER, array('posts' => 'posts + 1'));
Replace:
updateMemberData($ID_MEMBER, array('posts' => 'posts + 1', 'posts' . $GLOBALS['ID_FORUM'] => 'posts' . $GLOBALS['ID_FORUM'] . ' + 1'));
Now, you have to be able to access said post count... so, in Load.php, find this:
IFNULL(lo.logTime, 0) AS isOnline, IFNULL(a.ID_ATTACH, 0) AS ID_ATTACH, a.filename, mem.signature,
Replace it (twice) with:
IFNULL(lo.logTime, 0) AS isOnline, IFNULL(a.ID_ATTACH, 0) AS ID_ATTACH, a.filename, mem.signature, mem.posts1, mem.posts2,
Again, add more if you want more forums. Now, find this:
'location' => &$profile['location'],
Add after:
'posts1' => &$profile['posts1'],
Rinse and repeat, once again.... then you have to edit Display.template.php, using $message['member']['posts1'], etc.
-[Unknown]