I've seen so many posts here stating that this shoutbox does not work and one of the main problems is during the install, file edits are not manually completed correctly. I've installed it on 3.0.1 and 3.0.3 with no problems and it works well.
Because the install procedure runs through all the necassary template, phrases and table changes so well automatically .. the only errors
are
created by NOT manually changing the necassary phpfile additions.
Files needed to be changed :-
admincp/adminpermissions.php
admincp/index.php
admincp/usergroup.php
includes/functions_online.php
includes/init.php
includes/functions_bbcodeparse.php
includes/adminfunctions_template.php
---------------------------------------------------------------
admincp/adminpermissions.php
Find
Code:
'canadmincron' => $vbphrase['can_administer_cron']
Add Below
Code:
'canadminshouts' => $vbphrase['can_administer_shouts'],
admincp/index.php
Find
Code:
// ***
if (can_administer('canadminusers'))
{
$printhr = true;
construct_nav_option($vbphrase['subscription_manager'], 'subscriptions.php?do=modify', '|');
construct_nav_option($vbphrase['add_new_subscription'], 'subscriptions.php?do=add');
construct_nav_group($vbphrase['subscriptions'], '<hr />');
}
Add Below
Code:
// ***
if (can_administer('canadminshouts'))
{
$printhr = true;
construct_nav_option($vbphrase['shout_manager'], 'shout.php?do=modify');
construct_nav_option($vbpharse['find_shouts'], 'shout.php?do=find');
construct_nav_group($vbphrase['shoutbox'], '<hr />');
}
admincp/usergroup.php
Find
Code:
print_table_header($vbphrase['administrator_permissions']);
print_yes_no_row($vbphrase['is_super_moderator'], 'usergroup[ismoderator]', $ug_bitfield['ismoderator']);
print_yes_no_row($vbphrase['can_access_control_panel'], 'usergroup[cancontrolpanel]', $ug_bitfield['cancontrolpanel']);
print_table_break();
Add Below
Code:
print_table_header($vbphrase['shoutbox_permissions']);
print_yes_no_row($vbphrase['can_shout'], 'usergroup[canaddshout]', $ug_bitfield['canaddshout']);
print_yes_no_row($vbphrase['can_delete_shouts'], 'usergroup[candropshout]', $ug_bitfield['candropshout']);
print_yes_no_row($vbphrase['can_delete_others_shouts'], 'usergroup[candropothershout]', $ug_bitfield['candropothershout']);
print_yes_no_row($vbphrase['can_edit_shouts'], 'usergroup[caneditshout]', $ug_bitfield['caneditshout']);
print_yes_no_row($vbphrase['can_edit_others_shouts'], 'usergroup[caneditothershout]', $ug_bitfield['caneditothershout']);
print_yes_no_row($vbphrase['can_read_shouts'], 'usergroup[canreadshouts]', $ug_bitfield['canreadshouts']);
print_table_break();
includes/functions_online.php
Find
Code:
case 'subscriptions':
$userinfo['action'] = $vbphrase['viewing_paid_subscriptions'];
break;
Add Below
Code:
case 'shoutarchive':
$userinfo['action'] = $vbphrase['viewing_shoutbox'];
break;
case 'editshout':
$userinfo['action'] = $vbphrase['editing_shout'];
break;
Find
Code:
case 'subscriptions.php':
$userinfo['activity'] = 'subscriptions';
break;
Add Below
Code:
case 'shoutbox.php':
if (empty($values['do']) OR $values['do'] == 'archive')
{
$userinfo['activity'] = 'shoutarchive';
}
elseif ($values['do'] == 'edit')
{
$userinfo['activity'] = 'editshout';
}
else
{
$userinfo['activity'] = 'index';
}
break;
includes/init.php
Find
Code:
'canadminupgrade' => 32768
Replace with
Code:
'canadminupgrade' => 32768,
'canadminshouts' => 65536
Find
Code:
// field names for usergroup display options
$_BITFIELD['usergroup']['genericoptions'] = array(
'showgroup' => 1,
'showbirthday' => 2,
'showmemberlist' => 4,
'showeditedby' => 8,
'allowmembergroups' => 16,
'isbannedgroup' => 32
);
Add Below
Code:
// field names for shoutbox permissions
$_BITFIELD['usergroup']['shoutboxpermissions'] = array(
'canaddshout' => 1,
'candropshout' => 2,
'candropothershout' => 4,
'caneditshout' => 8,
'caneditothershout' => 16,
'canreadshouts' => 32
);
includes/functions_bbcodeparse.php
Find
Code:
case 'announcement':
global $post;
$dohtml = $post['allowhtml'];
if ($dohtml)
{
$donl2br = 0;
}
$dobbcode = $post['allowbbcode'];
$dobbimagecode = $post['allowbbcode'];
$dosmilies = $allowsmilie;
break;
Add Below
Code:
case 'shoutbox':
$dohtml = $vboptions['allowshouthtml'];
$dobbcode = $vboptions['allowshoutbbcode'];
$dobbimagecode = $vboptions['allowshoutimgcode'];
$dosmilies = $vboptions['allowshoutsmilies'];
break;
includes/adminfunctions_template.php
Find
Code:
'subscription' => $vbphrase['group_paid_subscriptions'],
Add Below
Code:
'shoutbox' => $vbphrase['shoutbox'],
-----------------------------------------------------------------------
Template Edits
FORUMHOME
Find
Add Below
Code:
<if condition="($permissions['shoutboxpermissions'] & CANREADSHOUTS)"><!-- shoutbox -->
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="$stylevar[tablewidth]" align="center">
<thead>
<tr>
<td class="tcat" colspan="2">
<a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('forumhome_shoutbox')"><img id="collapseimg_forumhome_shoutbox" src="$stylevar[imgdir_button]/collapse_tcat$vbcollapse[collapseimg_forumhome_shoutbox].gif" alt="" border="0" /></a>
<a href="shoutbox.php?$session[sessionurl]">Shoutbox</a>
</td>
</tr>
</thead>
<tbody id="collapseobj_forumhome_shoutbox" style="$vbcollapse[collapseobj_forumhome_shoutbox]">
<tr>
<td class="alt1" width="100%">
<iframe src="shoutbox.php?$session[sessionurl]do=iframe" width="100%" height="120" scrolling="yes" frameborder="0" name="shoutbox" id="shoutbox"></iframe>
</td>
</tr>
</tbody>
</table>
<!-- end shoutbox -->
<br /></if>