[問題]安裝Advanced Hide Post 不能發文

phpBB 2 MOD Support
無論是官方或非官方認證之外掛,安裝與使用問題討論。
(發表文章請按照公告格式發表,違者砍文)

版主: 版主管理群

主題已鎖定
shan1387
星球普通子民
星球普通子民
文章: 1
註冊時間: 2004-09-11 15:19

[問題]安裝Advanced Hide Post 不能發文

文章 shan1387 »

問題外掛:安裝Advanced Hide Post 1.0.1 beta不能發文
使用版本:phpBB 2.1.0
網站位置:http://98.to/sixhost
狀況描述:

發文的時後會出現這個狀況:
XML 文件只允許一個最上層元件。處理資源 'http://six-host.homeftp.net/phpbb2/post ... topic&f=13' 發生錯誤。第 2 行, 位置 2

<b>Warning</b>: Unterminated comment starting line 1826 in <b>c:\appserv\www\phpbb2\posting.php</b> on line <b>1826</b><br />
-^

下列是我找到出現問題的程式碼

代碼: 選擇全部

#
#-----[ FIND ]------------------------------------------
#
//
// Topic type selection

#
#-----[ BEFORE, ADD ]------------------------------------------
#
// Advanced Hide Post MOD
$count_hiding_type = 0;
$show_value_box = false;
$cash_checked = false;
$cash_name = array();
$cash_field_name = array();
$cash_id = array();
$cash_prefix = array();
$count_cash_type = 0;
$cash_img = false;
$cash_imgurl = '';
$value_range = array();
$cash_sell_range = array();
$cash_fortune_range = array();
$count_non_cash_hiding = 0;
$value_range[] = '""';
for ($i=1; $i <= MAX_HIDE_TYPE; $i++)
{
	if ( $allow_hide[$i] && $auth_hide[$i])
	{
		if (!$count_hiding_type)
			$template->assign_block_vars('switch_hide_post', array(
				'MIN_VALUE_BOX_TYPE' => MIN_HIDE_WITH_VALUE,
				'MIN_CASH_TYPE' => MIN_HIDE_WITH_CASH,
				'L_HIDE_NORMAL' => $lang['Posting_desc']['Normal'])
			);

		$count_hiding_type++;
		$value_range[] = get_value_range_string($min_value[$i], $max_value[$i]);

		//if we're checking a kind of hiding using cash, try to get all useable cash
		if ($i >= MIN_HIDE_WITH_CASH)
		{
			$not_cash=false;
			$count_non_cash_hiding = $count_hiding_type;
			if (!$cash_checked) {
				$cash_checked = true;
				switch ($board_config['cash_system_type'])
				{
					case CASH_TYPE_POINTS:
						$cash_name[] = $board_config['points_name'];
						$cash_field_name[] = 'user_points';	
						$cash_id[] = 0;
						$cash_prefix[] = true;
						$count_cash_type = 1;
						$cash_sell_range[] = get_value_range_string($min_value[PAY_TO_READ], $max_value[PAY_TO_READ]);
						$cash_fortune_range[] = get_value_range_string($min_value[FORTUNE_TO_READ], $max_value[FORTUNE_TO_READ]);
						break;
						
					case CASH_TYPE_CASHMOD2:
						if (!$board_config['cash_disabled'])
						{
							$sql = 'SELECT cash_id, cash_dbfield, cash_name, cash_before, cash_image, cash_imageurl, cash_max_sellingprice, cash_min_sellingprice, cash_max_fortunerequired, cash_min_fortunerequired
								 FROM ' . CASH_TABLE . ' WHERE cash_enabled ORDER BY cash_order ASC';
							if ( $result = $db->sql_query($sql) )
							{
								while ( $row = $db->sql_fetchrow($result) )
								{
									$cash_name[] = $row['cash_name'];
									$cash_field_name[] = $row['cash_dbfield'];
									$cash_id[] = $row['cash_id'];
									$cash_prefix[] = $row['cash_before'] <> 0;
									$cash_img = $row['cash_image'];
									$cash_imgurl = $row['cash_imageurl'];
									$cash_min_sell[] = intval($row['cash_min_sellingprice']);
									$cash_max_sell[] = intval($row['cash_max_sellingprice']);
									$cash_min_fortune[] = intval($row['cash_min_fortunerequired']);
									$cash_max_fortune[] = intval($row['cash_max_fortunerequired']);
								}
							}
						}
						$count_cash_type = count($cash_name);
						for ($j=0; $j < $count_cash_type; $j++)
						{
							$cash_sell_range[] = get_value_range_string($cash_min_sell[$j] ? $cash_min_sell[$j] : $min_value[$i], $cash_max_sell[$j] ? $cash_max_sell[$j] : $max_value[$i]);
							$cash_fortune_range[] = get_value_range_string($cash_min_fortune[$j] ? $cash_min_fortune[$j] : $min_value[$i], $cash_max_fortune[$j] ? $cash_max_fortune[$j] : $max_value[$i]);
						}
						break;
			
					default:
						$cash_name[] = $board_config['cash_type_name'];
						$cash_field_name[] = $board_config['cash_field_name'];
						$cash_id[] = 0;
						$count_cash_type = 1;
						$cash_prefix[] = false;
						$cash_sell_range[] = get_value_range_string($min_value[PAY_TO_READ], $max_value[PAY_TO_READ]);
						$cash_fortune_range[] = get_value_range_string($min_value[FORTUNE_TO_READ], $max_value[FORTUNE_TO_READ]);
				}
			}
		}
		else
			$not_cash = true;
		
		//($not_cash == false) means current hiding type will not apply with cash
		//($not_cash && ($count_cash_type == 0)) means current type is assiociated with cash but no valid cash can be found 
		if ( $not_cash || $count_cash_type )
		{
			$show_value_box = ($i >= MIN_HIDE_WITH_VALUE);
			$template->assign_block_vars('switch_hide_post.hiding_option', array(
				'HIDING_TYPE' => $i,
				'HIDING_TYPE_DESC' => $lang['Posting_desc'][$hiding_name[$i]],
				'S_HIDING_SELECTED' => ($hiding_type == $i) ? 'selected' : '')
			);
		}
	}
	else
		$value_range[] = '""';
}

if ($show_value_box)
{
	$template->assign_block_vars('switch_hide_post.switch_hiding_value', array(
		'CASH_NAME_PREFIX' => (($count_cash_type == 1) && $cash_prefix[0]) ? '<span id="cash_type">' . ($cash_img ? "<img src=\"$cash_imgurl\">" : $cash_name[0]) . '</span>' : '',
		'CASH_NAME_POSTFIX' => (($count_cash_type == 1) && (!$cash_prefix[0])) ? '<span id="cash_type">' . ($cash_img ? "<img src=\"$cash_imgurl\">" : $cash_name[0]) . '</span>' : '',
		'CASH_ID' => ($count_cash_type == 1) ? "<input type='hidden' name='hiding_cash_id' value='$cash_id[0]' />" : '',
		'HIDING_COND_VALUE' => $hiding_value)
	);

\n	if ($count_cash_type > 1)
	{
		$template->assign_block_vars('switch_hide_post.cash_type_box', array());
		for ($i=0; $i < $count_cash_type; $i++)
		{
			$template->assign_block_vars('switch_hide_post.cash_type_box.cash_type_option', array(
				'CASH_ID' => $cash_id[$i],
				'CASH_NAME' => $cash_name[$i],
				'S_CASH_TYPE_SELECTED' => ($cash_id[$i] == $hiding_cash_id) ? 'selected' : '')
			);
		}
	}
	
	for ($i=0; $i < MIN_HIDE_WITH_CASH; $i++)
		$value_range[$i] = '[' . substr(str_repeat($value_range[$i] . ',', ($count_cash_type > 1) ? $count_cash_type : 1), 0, -1) . ']';
	
	if ($count_cash_type)
	{
		$value_range[PAY_TO_READ] = '[' . implode(',', $cash_sell_range) . ']';
		$value_range[FORTUNE_TO_READ] = '[' . implode(',', $cash_fortune_range) . ']';
	}

	$template->assign_block_vars('switch_hide_post.hiding_script', array(
		'NON_SINGLE_CASH' => ($count_cash_type > 1) ? 1 : 0,
		'CASH_RANGE_LIST' => implode(',', $value_range))
	);
	if ($count_cash_type) $template->assign_block_vars('switch_hide_post.hiding_script.have_cash', array());
}

拜託各位大大幫我解決,謝謝!
主題已鎖定

回到「外掛問題討論」