Topic: Private forum
Hi.
I need to set up a private forum, not only forums (what I know how to do), but also search, userlist, etc.
Resuming, I want only login links are visible for guests.
It´s posible?
Thanks
You are not logged in. Please login or register.
PunBB Forums → PunBB 1.3 discussion → Private forum
Hi.
I need to set up a private forum, not only forums (what I know how to do), but also search, userlist, etc.
Resuming, I want only login links are visible for guests.
It´s posible?
Thanks
This is possible.
You would need to edit include/functions.php remove line 421 - 455 and replace with
// Index should always be displayed
$links['index'] = '<li id="navindex"'.((FORUM_PAGE == 'index') ? ' class="isactive"' : '').'><a href="'.forum_link($forum_url['index']).'">'.$lang_common['Index'].'</a></li>';
if ($forum_user['is_guest'])
{
$links['register'] = '<li id="navregister"'.((FORUM_PAGE == 'register') ? ' class="isactive"' : '').'><a href="'.forum_link($forum_url['register']).'">'.$lang_common['Register'].'</a></li>';
$links['login'] = '<li id="navlogin"'.((FORUM_PAGE == 'login') ? ' class="isactive"' : '').'><a href="'.forum_link($forum_url['login']).'">'.$lang_common['Login'].'</a></li>';
}
else
{
if (!$forum_user['is_admmod'])
{
if ($forum_user['g_read_board'] == '1' && $forum_user['g_view_users'] == '1')
$links['userlist'] = '<li id="navuserlist"'.((FORUM_PAGE == 'userlist') ? ' class="isactive"' : '').'><a href="'.forum_link($forum_url['users']).'">'.$lang_common['User list'].'</a></li>';
if ($forum_config['o_rules'] == '1' && (!$forum_user['is_guest'] || $forum_user['g_read_board'] == '1' || $forum_config['o_regs_allow'] == '1'))
$links['rules'] = '<li id="navrules"'.((FORUM_PAGE == 'rules') ? ' class="isactive"' : '').'><a href="'.forum_link($forum_url['rules']).'">'.$lang_common['Rules'].'</a></li>';
if ($forum_user['g_read_board'] == '1' && $forum_user['g_search'] == '1')
$links['search'] = '<li id="navsearch"'.((FORUM_PAGE == 'search') ? ' class="isactive"' : '').'><a href="'.forum_link($forum_url['search']).'">'.$lang_common['Search'].'</a></li>';
$links['profile'] = '<li id="navprofile"'.((substr(FORUM_PAGE, 0, 7) == 'profile') ? ' class="isactive"' : '').'><a href="'.forum_link($forum_url['user'], $forum_user['id']).'">'.$lang_common['Profile'].'</a></li>';
$links['logout'] = '<li id="navlogout"><a href="'.forum_link($forum_url['logout'], array($forum_user['id'], generate_form_token('logout'.$forum_user['id']))).'">'.$lang_common['Logout'].'</a></li>';
}
else
{
if ($forum_user['g_read_board'] == '1' && $forum_user['g_view_users'] == '1')
$links['userlist'] = '<li id="navuserlist"'.((FORUM_PAGE == 'userlist') ? ' class="isactive"' : '').'><a href="'.forum_link($forum_url['users']).'">'.$lang_common['User list'].'</a></li>';
if ($forum_config['o_rules'] == '1' && (!$forum_user['is_guest'] || $forum_user['g_read_board'] == '1' || $forum_config['o_regs_allow'] == '1'))
$links['rules'] = '<li id="navrules"'.((FORUM_PAGE == 'rules') ? ' class="isactive"' : '').'><a href="'.forum_link($forum_url['rules']).'">'.$lang_common['Rules'].'</a></li>';
$links['search'] = '<li id="navsearch"'.((FORUM_PAGE == 'search') ? ' class="isactive"' : '').'><a href="'.forum_link($forum_url['search']).'">'.$lang_common['Search'].'</a></li>';
$links['profile'] = '<li id="navprofile"'.((substr(FORUM_PAGE, 0, 7) == 'profile') ? ' class="isactive"' : '').'><a href="'.forum_link($forum_url['user'], $forum_user['id']).'">'.$lang_common['Profile'].'</a></li>';
$links['logout'] = '<li id="navlogout"><a href="'.forum_link($forum_url['logout'], array($forum_user['id'], generate_form_token('logout'.$forum_user['id']))).'">'.$lang_common['Logout'].'</a></li>';
$links['admin'] = '<li id="navadmin"'.((substr(FORUM_PAGE, 0, 5) == 'admin') ? ' class="isactive"' : '').'><a href="'.forum_link($forum_url['admin_index']).'">'.$lang_common['Admin'].'</a></li>';
}
}
Thanks. Not exactly what I´m looking, but helps (still appearing total number of users, last registered user -and his profile- , etc).
If it´s possible to see _only_ header, login link, and copyright info, I´ll appreciate the how-to.
Regards
maybe http user protection? (depends how many users do you have)
maybe http user protection? (depends how many users do you have)
Could be ... but if not planned, I want to ask a config option for some future version, to define a forum as private (only admins can add users, and only users can see forum links and content).
You can turn off registration, and install extension for manually adding users from repository.
Then go to Administration » Users » Groups and turn off everything for Guests
done
PunBB Forums → PunBB 1.3 discussion → Private forum
Powered by PunBB, supported by Informer Technologies, Inc.