Meny users have requested how to make shoutbox without the extra permission MOD, if installing this mod without extra permission MOD you can NOT control permissions per usergroup - ONLY by user type.
and you can't change this from ACP.
the bennefit, is that this code is faster, and will produce less load on your webserver - witch enable you to make the autorefresh faster....
first of all, you should NOT do the changes described in the how-to regarding these files:
includes/page_header.php
open the 3 included php files
shoutbox.php
shoutbox_max.php
shoutbox_view.php
FIND
- Code: Select all
//
// Start auth check
//
$is_auth = array();
$is_auth = auth(AUTH_ALL, PAGE_SHOUTBOX_MAX, $userdata);
if( !$is_auth['auth_read'] )
{
$message = ( !$is_auth['auth_view'] ) ? $lang['Not_Authorised'] : sprintf ($lang['Sorry_no_auth'],$is_auth['auth_read_type']);
message_die(GENERAL_MESSAGE, $message);
}
//
// End auth check
//
REPLACE WITH
- Code: Select all
//
// Start auth check
//
switch ($userdata['user_level'])
{
case ADMIN :
case MOD : $is_auth['auth_mod'] = 1;
default:
$is_auth['auth_read'] = 1;
$is_auth['auth_view'] = 1;
if ($userdata['user_id']==ANONYMOUS)
{
$is_auth['auth_delete'] = 0;
$is_auth['auth_post'] = 1;
} else
{
$is_auth['auth_delete'] = 1;
$is_auth['auth_post'] = 1;
}
}
if( !$is_auth['auth_read'] )
{
message_die(GENERAL_MESSAGE, $lang['Not_Authorised']);
}
//
// End auth check
//
hard code, witch type of users have access to what, inside this code 1 means enable, while 0 means disabled.
in the file templates/subSilver/index_body.tpl
you should NOT include the code
- Code: Select all
<!-- BEGIN switch_shoutbox_on -->
<!-- END switch_shoutbox_on -->
ONLY include the code found in between !!
thats it - no need for extra permission MOD anywhere.


