2012-08-31, 12:00 AM
Hello,
I've used phpBB for years now, but am interested in running a MyBB forum.
I use a custom bit of code for phpBB which allows me to make the private forums even more private.
The code stops the posts and topics in specified forums being counted in the index statistics, giving the illusion that there are no private forums - the way I like it!
Here is the code:
Where you see "FORUM_ID, FORUM_ID2" is where you place each of the forum ID's of the forums you want ignored, separated by the comma.
My question:
Is this possible to achieve on MyBB. If so, could somebody point me in the right direction, please? I'm looking at getting the board started tomorrow, so it would be great to know this code, or a new code will do the trick.
Thanks
Anybody have any ideas?
I've used phpBB for years now, but am interested in running a MyBB forum.
I use a custom bit of code for phpBB which allows me to make the private forums even more private.
The code stops the posts and topics in specified forums being counted in the index statistics, giving the illusion that there are no private forums - the way I like it!
Here is the code:
$sql = 'SELECT forum_id, forum_posts, forum_topics
FROM ' . FORUMS_TABLE . '
WHERE ' . $db->sql_in_set('forum_id', array(FORUM_ID, FORUM_ID2));
$result = $db->sql_query($sql);
$hidden_posts = 0;
$hidden_topics = 0;
while ($row = $db->sql_fetchrow($result))
{
$hidden_posts += $row['forum_posts'];
$hidden_topics += $row['forum_topics'];
}
$db->sql_freeresult($result);
$total_posts = $config['num_posts'] - $hidden_posts;
$total_topics = $config['num_topics'] - $hidden_topics;
Where you see "FORUM_ID, FORUM_ID2" is where you place each of the forum ID's of the forums you want ignored, separated by the comma.
My question:
Is this possible to achieve on MyBB. If so, could somebody point me in the right direction, please? I'm looking at getting the board started tomorrow, so it would be great to know this code, or a new code will do the trick.
Thanks
Anybody have any ideas?