View Single Post
  #160  
Old 09-14-2004, 07:22 PM
TTG's Avatar
TTG TTG is offline
 
Join Date: May 2004
Location: Sth London
Posts: 1,042
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Code:
$navbar
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>
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01291 seconds
  • Memory Usage 1,810KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (20)bbcode_code
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • showpost_complete