[問題] advanced hide post 編輯文章出錯

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

版主: 版主管理群

主題已鎖定
sunsun
星球普通子民
星球普通子民
文章: 2
註冊時間: 2004-04-08 13:14

[問題] advanced hide post 編輯文章出錯

文章 sunsun »

問題外掛:Advanced_Hide_Post_1.0.1b_en + CashMod221
參考連結:http://roc.ashst.com/viewtopic.php?p=6
使用版本: phpBB 2.0.8
作業系統: BSD
網站位置:http://cwikc.com:81/forumtest/index.php

狀況描述:

代碼: 選擇全部

Error in posting

DEBUG MODE

SQL Error : 1064 You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near ' hiding_condition_value = , hiding_cash_id = , post_edit_time =

UPDATE phpbb_posts SET post_username = '', enable_bbcode = 1, enable_html = 0, enable_smilies = 1, enable_sig = 0, hiding_type = , hiding_condition_value = , hiding_cash_id = , post_edit_time = 1081401197, post_edit_count = post_edit_count + 1 WHERE post_id = 60

Line : 274
File : /home/wwwserver/forumtest/includes/functions_post.php
大概是 post_username = '' 無法處理

hiding_type = , hiding_condition_value = , hiding_cash_id =

新一名@@謝謝解答!
sunsun
星球普通子民
星球普通子民
文章: 2
註冊時間: 2004-04-08 13:14

文章 sunsun »

代碼: 選擇全部

	
$edited_sql = ($mode == 'editpost' && !$post_data['last_post'] && $post_data['poster_post']) ? ", post_edit_time = $current_time, post_edit_count = post_edit_count + 1 " : "";
	
$sql = ($mode != "editpost") ? "INSERT INTO " . POSTS_TABLE . " (topic_id, forum_id, poster_id, post_username, post_time, poster_ip, enable_bbcode, enable_html, enable_smilies, enable_sig, hiding_type, hiding_condition_value, hiding_cash_id) VALUES ($topic_id, $forum_id, " . $userdata['user_id'] . ", '$post_username', $current_time, '$user_ip', $bbcode_on, $html_on, $smilies_on, $attach_sig, $hiding_type, $hiding_value, $hiding_cash_id)" : "UPDATE " . POSTS_TABLE . " SET post_username = '$post_username', enable_bbcode = $bbcode_on, enable_html = $html_on, enable_smilies = $smilies_on, enable_sig = $attach_sig, hiding_type = $hiding_type, hiding_condition_value = $hiding_value, hiding_cash_id = $hiding_cash_id" . $edited_sql . " WHERE post_id = $post_id";
	
if (!$db->sql_query($sql, BEGIN_TRANSACTION))
	{
		message_die(GENERAL_ERROR, 'Error in posting', '', __LINE__, __FILE__, $sql);
	}
.::藍色的天空::.
竹貓忠實會員
竹貓忠實會員
文章: 587
註冊時間: 2003-09-14 17:29
來自: 我不知道
聯繫:

文章 .::藍色的天空::. »

代碼: 選擇全部

##############################################################
## MOD Title: Advanced Hide Post
## MOD Author: shi < shi@roc.as-hosting-pro.com > (Peng Shi) http://roc.myz.info
## 	       Ray < blue_sky_ray@hotmail.com > (Fung Tsz Yin) http://optional.iradio.com.tw/phpbbx
## MOD Description: 本插件提供多種隱藏帖子的方式
## MOD Version: 1.0.2 Beta
## 
## Installation Level: Intermediate
## Installation Time: ~30 minutes.
## Files To Edit: 22
##              posting.php
##              viewtopic.php
##              modcp.php
##              search.php
##              includes/auth.php
##              includes/constants.php
##              includes/prune.php
##              includes/functions_post.php
##              includes/topic_review.php
##              includes/bbcode.php
##              admin/admin_board.php
##              admin/admin_forumauth.php
##              admin/admin_ug_auth.php
##              templates/subSilver/viewtopic_body.tpl
##              templates/subSilver/search_results_posts.tpl
##              templates/subSilver/admin/board_config_body.tpl
##              templates/subSilver/posting_preview.tpl
##              templates/subSilver/posting_topic_review.tpl
##              templates/subSilver/posting_body.tpl
##              templates/subSilver/bbcode.tpl
##              language/lang_english/lang_bbcode.php
##              language/lang_chinese_simplified/lang_bbcode.php
##              (quick_reply.php)
## Included Files: 7
##              functions_hide.php
##              hiding_information.tpl
##              lang_main_hide.php
##              lang_admin_hide.php
##              advanced_hide_post_1.0.0_db_install.php
##              language_chinese_simplified/lang_main_hide.php
##              language_chinese_simplified/lang_admin_hide.php
##############################################################
## For Security Purposes, Please Check: http://www.phpbb.com/mods/ for the 
## latest version of this MOD. Downloading this MOD from other sites could cause malicious code 
## to enter into your phpBB Forum. As such, phpBB will not offer support for MOD's not offered 
## in our MOD-Database, located at: http://www.phpbb.com/mods/ 
##############################################################
## Author Notes:
##          在安裝使用本插件之前,請先安裝Multiple BBCode
##          管理員可以在版面、團隊或用戶的權限設置裡分別設定允許發表隱藏帖的權限。
##          在修改constants.php時,請仔細設置AUTH_SELLPOST的值(參見下面有關constants.php的修改)
##          如果您使用EasyMOD來安裝本插件,在安裝完後請核對constants.php中的AUTH_SELLPOST是否正確\r
##          安裝時請注意本安裝文件中的註釋內容
############################################################## 
## 升級記錄: 
##
##   2004-03-27 - Version 1.0.2 Beta
##      - 支持CASH MOD2.2.x
##
##   2003-11-28 - Version 1.0.1 Beta
##      - 修正了一些小Bug
##
##   2003-11-19 - Version 1.0.0 Beta
##      - 更名為Advanced Hide Post
##      - 重新構造了Sell Post的代碼結構
##      - 增加了三種隱藏帖子的方式:根據回復、發帖數或現金/積分數隱藏
##      - 支持CASH MOD的多貨幣種類
##
##   2003-11-07 - Version 0.2.1 Beta 
##      - 修正引用時可以看見未購買帖子的漏洞
## 
##   2003-11-03 - Version 0.2.0 Beta 
##      - 增加了設定帖子售價的上限的功能 
##      - 修正一些小bug
## 
##   2003-10-30 - Version 0.1.1 Beta 
##      - 修正了一些小bug 
##
##   2003-10-30 - Version 0.1.0 Alpha 
##      - 首次發佈 
##
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD 
##############################################################

# 
#-----[ COPY ]------------------------------------------ 
#
copy functions_hide.php to includes/functions_hide.php
copy hiding_information.tpl to templates/subSilver/hiding_information.tpl
copy lang_main_hide.php to language/lang_english/lang_main_hide.php
copy lang_admin_hide.php to language/lang_english/lang_admin_hide.php
copy lang_chinese_simplified/lang_main_hide.php to language/lang_chinese_simplified/lang_main_hide.php
copy lang_chinese_simplified/lang_admin_hide.php to language/lang_chinese_simplified/lang_admin_hide.php

#
#-----[ SQL ]------------------------------------------
#
# 您也可以把 advanced_hide_post_1.0.0_db_install.php 上載到您的論壇根目錄裡,再從
# 瀏覽器裡執行它來進行數據庫的更新\r
ALTER TABLE phpbb_posts
	ADD hiding_type TINYINT(1) UNSIGNED DEFAULT '0',
	ADD hiding_condition_value INT(11) DEFAULT '0',
	ADD hiding_cash_id SMALLINT(6) DEFAULT '0';


INSERT INTO phpbb_config (config_name, config_value) VALUES 
	('cash_system_type', '0'),
	('allow_sellpost', '0'),
	('allow_hide4reply', '0'),
	('allow_hide4posts', '0'),
	('allow_hide4fortune', '0'),
	('max_sellingprice', '0'),
	('min_sellingprice', '1'),
	('max_postsrequired', '0'),
	('min_postsrequired', '1'),
	('max_fortunerequired', '0'),
	('min_fortunerequired', '1');

ALTER TABLE phpbb_auth_access
	ADD auth_sellpost TINYINT(1) NOT NULL,
	ADD auth_hide4reply TINYINT(1) NOT NULL,
	ADD auth_hide4posts TINYINT(1) NOT NULL,
	ADD auth_hide4fortune TINYINT(1) NOT NULL;

ALTER TABLE phpbb_forums
	ADD auth_sellpost TINYINT(2) DEFAULT '1' NOT NULL,
	ADD auth_hide4reply TINYINT(2) DEFAULT '3' NOT NULL,
	ADD auth_hide4posts TINYINT(2) DEFAULT '3' NOT NULL,
	ADD auth_hide4fortune TINYINT(2) DEFAULT '3' NOT NULL;
	
CREATE TABLE phpbb_payment (
	post_id MEDIUMINT(8) UNSIGNED NOT NULL,
	user_id MEDIUMINT(8) UNSIGNED NOT NULL,
	KEY post_id_user_id (post_id, user_id));

#
#-----[ OPEN ]------------------------------------------
#
posting.php

#
#-----[ FIND ]------------------------------------------
#
		$select_sql = ( !$submit ) ?

#
#-----[ IN-LINE FIND ]------------------------------------------
#
enable_sig

#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
, p.hiding_type, p.hiding_condition_value, p.hiding_cash_id

#
#-----[ FIND ]------------------------------------------
#
// --------------------
//  What shall we do?

#
#-----[ BEFORE, ADD ]------------------------------------------
#
$hiding_type = 0;
$hiding_value = 0;
$hiding_cash_id = 0;

$max_value = array(
	NORMAL_READ => 0,
	REPLY_TO_READ => 0,
	PAY_TO_READ => intval($board_config['max_sellingprice']),
	POSTS_TO_READ => intval($board_config['max_postsrequired']),
	FORTUNE_TO_READ => intval($board_config['max_fortunerequired']));

$min_value = array(
	NORMAL_READ => 0,
	REPLY_TO_READ => 0,
	PAY_TO_READ => intval($board_config['min_sellingprice']),
	POSTS_TO_READ => intval($board_config['min_postsrequired']),
	FORTUNE_TO_READ => intval($board_config['min_fortunerequired']));

$auth_hide = array(
	REPLY_TO_READ => $is_auth['auth_hide4reply'],
	PAY_TO_READ => $is_auth['auth_sellpost'],
	POSTS_TO_READ => $is_auth['auth_hide4posts'],
	FORTUNE_TO_READ => $is_auth['auth_hide4fortune']);

$allow_hide = array(
	REPLY_TO_READ => $board_config['allow_hide4reply'],
	PAY_TO_READ => $board_config['allow_sellpost'],
	POSTS_TO_READ => $board_config['allow_hide4posts'],
	FORTUNE_TO_READ => $board_config['allow_hide4fortune']);

$hiding_name = array(
	REPLY_TO_READ => 'Reply',
	PAY_TO_READ => 'Sale',
	POSTS_TO_READ => 'Posts',
	FORTUNE_TO_READ => 'Fortune');

include($phpbb_root_path . 'includes/functions_hide.' . $phpEx);

#
\n#-----[ FIND ]------------------------------------------
#
			$bbcode_uid = '';

#
#-----[ AFTER, ADD ]------------------------------------------
#
			$hiding_type = ( isset($HTTP_POST_VARS['hiding_type']) ) ? intval($HTTP_POST_VARS['hiding_type']) : 0;
			$hiding_value = ( isset($HTTP_POST_VARS['hiding_value']) ) ? intval($HTTP_POST_VARS['hiding_value']) : 0;
			$hiding_cash_id = isset($HTTP_POST_VARS['hiding_cash_id']) ? $HTTP_POST_VARS['hiding_cash_id'] : 0;

#
#-----[ FIND ]------------------------------------------
#
			prepare_post(

#
#-----[ AFTER, ADD ]------------------------------------------
#
			// Advanced Hide Post MOD
			if ( ($hiding_type < NORMAL_READ) or ($hiding_type > MAX_HIDE_TYPE) )
				message_die(GENERAL_ERROR, $lang['Invalid_hiding_type']);
				
			if ( ($hiding_type < MIN_HIDE_WITH_VALUE) )
				$hiding_value = 0;
			elseif ($hiding_value == 0)
				$hiding_type = NORMAL_READ;
			
			if ( $hiding_type )
			{
				if ( $allow_hide[$hiding_type] && $auth_hide[$hiding_type] )
				{
					if ( $hiding_type >= MIN_HIDE_WITH_VALUE )
					{
						if ( $hiding_type < MIN_HIDE_WITH_CASH )
						{
							$max = $max_value[$hiding_type];
							$min = $min_value[$hiding_type];
							$prefix = '';
							$postfix = '';
						}
						else
						{
							if (get_cash_info($hiding_cash_id, $cash_fieldname, $cash_name, $is_prefix, $max_min))
							{
								switch ($hiding_type)
								{
									case PAY_TO_READ:
										$max = $max_min['max_price'];
										$min = $max_min['min_price'];
										$prefix = $is_prefix ? $cash_name : '';
										$postfix = $is_prefix ? '' : $cash_name;
										break;
			
									case FORTUNE_TO_READ:
										$max = $max_min['max_fortune'];
										$min = $max_min['min_fortune'];
										$prefix = $is_prefix ? $cash_name : '';
										$postfix = $is_prefix ? '' : $cash_name;
										break;
								}
							}
							else
							{
								$max = 0;
								$min = 0;
								$error_msg .= (empty($error_msg) ? '' : '<br />') . $lang['No_valid_cash_type'];
							}
						}
			
						if ($max && ($hiding_value > $max))
						{
							$error_msg .= (empty($error_msg) ? '' : '<br />') . sprintf($lang['Sorry_high'][$hiding_name[$hiding_type]], $prefix . $hiding_value . $postfix, $prefix . $max . $postfix);
						}
						if ($min && ($hiding_value < $min))
						{
							$error_msg .= (empty($error_msg) ? '' : '<br />') . sprintf($lang['Sorry_low'][$hiding_name[$hiding_type]], $prefix . $hiding_value . $postfix, $prefix . $min . $postfix);
						}
							
					}
				}
				else
				{
					$error_msg .= (empty($error_msg) ? '' : '<br />') . $lang['Sorry_auth'][$hiding_name[$hiding_type]];
				}
			}

#
#-----[ FIND ]------------------------------------------
#
				submit_post(

#
#-----[ IN-LINE FIND ]------------------------------------------
#
);

#
#-----[ IN-LINE BEFORE, ADD ]------------------------------------------
#
, $hiding_type, $hiding_value, $hiding_cash_id

#
#-----[ FIND ]------------------------------------------
#
if( $refresh ||
{
	$username = (
	$subject = (
	$message = (

#
#-----[ AFTER, ADD ]------------------------------------------
#
	$hiding_type = ( isset($HTTP_POST_VARS['hiding_type']) ) ? intval($HTTP_POST_VARS['hiding_type']) : 0;
	$hiding_value = ( isset($HTTP_POST_VARS['hiding_value']) ) ? intval($HTTP_POST_VARS['hiding_value']) : 0;
	$hiding_cash_id = isset($HTTP_POST_VARS['hiding_cash_id']) ? intval($HTTP_POST_VARS['hiding_cash_id']) : 0;

#
#-----[ FIND ]------------------------------------------
#
		$template->assign_vars(array(
			'TOPIC_TITLE' => $preview_subject,

#
#-----[ BEFORE, ADD ]------------------------------------------
#
		// Advanced Hide Post MOD
		if ( ($hiding_type < NORMAL_READ) or ($hiding_type > MAX_HIDE_TYPE) )
			$hiding_type = NORMAL_READ;
		
		if ( ($hiding_type < MIN_HIDE_WITH_VALUE) )
			$hiding_value = 0;
		elseif ($hiding_value == 0)
			$hiding_type = NORMAL_READ;
		$hiding_info_box = '';
		if ( $hiding_type )
		{
			if ( $allow_hide[$hiding_type] && $auth_hide[$hiding_type] )
			{
				if ($hiding_type >= MIN_HIDE_WITH_VALUE)
				{
					if ( $hiding_type < MIN_HIDE_WITH_CASH )
					{
						$max = $max_value[$hiding_type];
						$min = $min_value[$hiding_type];
						$is_prefix = false;
					}
					else
					{
						if (get_cash_info($hiding_cash_id, $cash_fieldname, $cash_name, $is_prefix, $max_min))
						{
							switch ($hiding_type)
							{
								case PAY_TO_READ:
									$max = $max_min['max_price'];
									$min = $max_min['min_price'];
									break;
		
								case FORTUNE_TO_READ:
									$max = $max_min['max_fortune'];
									$min = $max_min['min_fortune'];
									break;
							}
						}
						else
						{
							$max = 0;
							$min = 0;
							$hiding_type = NORMAL_READ;
						}
					}
		
					if ($max && ($hiding_value > $max))
					{
						$hiding_value = $max;
					}
					if ($min && ($hiding_value < $min))
					{
						$hiding_value = $min;
					}
				}
			}
			else
				$hiding_type = NORMAL_READ;
		
			$hiding_info = array(
				'type' => $hiding_name[$hiding_type],
				'state' => 'Poster',
				'hiding_condition_value' => $hiding_value,
				'hiding_cash_id' => $hiding_cash_id,
				'cash_name' => $cash_name,
				'cash_prefix' => $is_prefix
			);
			$hiding_info_box = get_hiding_info_box($hiding_info);
		}

#
#-----[ FIND ]------------------------------------------ 
#
			'MESSAGE' => $preview_message,

# 
#-----[ AFTER, ADD ]------------------------------------------ 
#
			'HIDING_INFO_BOX' => $hiding_info_box,
			
#
#-----[ FIND ]------------------------------------------
#
			$user_sig = $post_info['user_sig'];

#
#-----[ AFTER, ADD ]------------------------------------------
#
			$hiding_type = $post_info['hiding_type'];
			$hiding_value = $post_info['hiding_condition_value'];
			$hiding_cash_id = $post_info['hiding_cash_id'];

#
#-----[ FIND ]------------------------------------------
#
		if ( $mode == 'quote' )
		{

#
#-----[ AFTER, ADD ]------------------------------------------
#
			if ($post_info['hiding_type'])
			{
				preg_match_all("#\[intro\](.*?)\[/intro\]#si", $message, $matches, PREG_PATTERN_ORDER);
				$message = implode('', $matches[0]);
			}

#
#-----[ 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)
	);

	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());
}

#
#-----[ FIND ]---------------------------------
#
$EMBB_keys = array(''

#
#-----[ IN-LINE FIND ]---------------------------------
#
)

#
#-----[ IN-LINE BEFORE, ADD ]---------------------------------
#
,'y'

#
#-----[ FIND ]---------------------------------
#
$EMBB_widths = array(''

#
#-----[ IN-LINE FIND ]---------------------------------
#
)
\n
#
#-----[ IN-LINE BEFORE, ADD ]---------------------------------
#
,'40'

#
#-----[ FIND ]---------------------------------
#
$EMBB_values = array(''

#
#-----[ IN-LINE FIND ]---------------------------------
#
)

#
#-----[ IN-LINE BEFORE, ADD ]---------------------------------
#
,'intro'

#
#-----[ FIND ]---------------------------------
#
	'L_BBCODE_F_HELP' =>


#
#-----[ AFTER, ADD ]--------------------------------
#
	'L_BBCODE_Y_HELP' => $lang['bbcode_y_help'],

#
#-----[ OPEN ]------------------------------------------
#
viewtopic.php

#
#-----[ FIND ]------------------------------------------
#
	$post_id = intval($HTTP_GET_VARS[POST_POST_URL]);
}

#
#-----[ AFTER, ADD ]------------------------------------------
#
if ( isset($HTTP_POST_VARS[POST_POST_URL]))
{
	$post_id = intval($HTTP_POST_VARS[POST_POST_URL]);
}

#
#-----[ FIND ]------------------------------------------
#
// End auth check
//

#
#-----[ AFTER, ADD ]------------------------------------------
#
// Advanced Hide Post MOD
include($phpbb_root_path . 'includes/functions_hide.' . $phpEx);
if ( isset($HTTP_POST_VARS['buypost']) )
{
	buy_post($post_id, "viewtopic.$phpEx?" . POST_POST_URL . "=$post_id#$post_id" . '">');
}

#
#-----[ FIND ]------------------------------------------
#
	$message = $postrow[$i]['post_text'];

#
#-----[ REPLACE WITH ]------------------------------------------
#
	$message = strip_hidden_contents($postrow[$i], $hiding_info);

#
#-----[ FIND ]------------------------------------------ 
#
	$template->assign_block_vars('postrow', array(
		'ROW_COLOR' => '#' . $row_color,

# 
#-----[ BEFORE, ADD ]------------------------------------------ 
#
	$hiding_info_box = get_hiding_info_box($hiding_info);

#
#-----[ FIND ]------------------------------------------
#
		'U_POST_ID' => $postrow[$i]['post_id'])
	);

# 
#-----[ BEFORE, ADD ]------------------------------------------ 
#
		'HIDING_INFO_BOX' => $hiding_info_box,

#
#-----[ FIND ]------------------------------------------
#
# 只有在您的論壇上安裝了 attach_mod 時才進行這一步\r
		display_post_attachments($postrow[$i]['post_id'], $postrow[$i]['post_attachment']);


#
#-----[ BEFORE, ADD ]------------------------------------------
#
# 只有在您的論壇上安裝了 attach_mod 時才進行這一步\r
	if ( $hiding_info['show_attachment'] )

#
#-----[ FIND ]------------------------------------------
#
# 只有在您的論壇上安裝了 Quick Reply MOD 時才進行這一步\r
	$last_msg = $postrow[$total_posts - 1]['post_text'];

#
#-----[ BEFORE, ADD ]------------------------------------------
#
# 只有在您的論壇上安裝了 Quick Reply MOD 時才進行這一步\r
	if ($postrow[$total_posts - 1]['hiding_type'])
	{
		preg_match_all("#\[intro:$bbcode_uid\](.*?)\[/intro:$bbcode_uid\]#si", $postrow[$total_posts - 1]['post_text'], $matches, PREG_PATTERN_ORDER);
		$last_msg = implode('', $matches[0]);
	}
	else

#
#-----[ OPEN ]------------------------------------------
#
modcp.php

#
#-----[ FIND ]------------------------------------------
#
remove_search_post($post_id_sql);

#
#-----[ BEFORE, ADD ]------------------------------------------
#
$sql = "DELETE 
	FROM " . PAYMENT_TABLE . " 
	WHERE post_id IN ($post_id_sql)";
if ( !$db->sql_query($sql) )
{
	message_die(GENERAL_ERROR, 'Could not delete posts\' payment information', '', __LINE__, __FILE__, $sql);
}

#
#-----[ OPEN ]------------------------------------------
#
search.php

#
#-----[ FIND ]------------------------------------------ 
#
		for($i = 0; $i < count($searchset); $i++)
		{

# 
#-----[ BEFORE, ADD ]------------------------------------------ 
#
		include($phpbb_root_path . 'includes/functions_hide.' . $phpEx);

#
#-----[ FIND ]------------------------------------------
#
			$message = $searchset[$i]['post_text'];

#
#-----[ REPLACE WITH ]------------------------------------------
#
			$message = strip_hidden_contents($searchset[$i], $hiding_info);

#
#-----[ FIND ]------------------------------------------ 
#
				$template->assign_block_vars("searchresults", array( 

# 
#-----[ BEFORE, ADD ]------------------------------------------ 
#
				$info_box = get_hiding_info_box($hiding_info);

#
#-----[ FIND ]------------------------------------------
#
					'MESSAGE' => $message,				

# 
#-----[ AFTER, ADD ]------------------------------------------ 
#
					'HIDING_INFO_BOX' => $info_box,
\n
#
#-----[ OPEN ]------------------------------------------
#
includes/auth.php

#
#-----[ FIND ]------------------------------------------
#
		case AUTH_ALL:
			$a_sql = 

#
#-----[ IN-LINE FIND ]------------------------------------------
#
';

#
#-----[ IN-LINE BEFORE, ADD ]------------------------------------------
#
, a.auth_sellpost, a.auth_hide4reply, a.auth_hide4posts, a.auth_hide4fortune

#
#-----[ FIND ]------------------------------------------
#
			$auth_fields = 

#
#-----[ IN-LINE FIND ]------------------------------------------
#
);

#
#-----[ IN-LINE BEFORE, ADD ]------------------------------------------
#
, 'auth_sellpost', 'auth_hide4reply', 'auth_hide4posts', 'auth_hide4fortune'

#
#-----[ FIND ]------------------------------------------
#
		default:

#
#-----[ BEFORE, ADD ]------------------------------------------
#
		case AUTH_SELLPOST:
			$a_sql = 'a.auth_sellpost'; 
			$auth_fields = array('auth_sellpost'); 
			break; 
		
		case AUTH_HIDE4REPLY:
			$a_sql = 'a.auth_hide4reply'; 
			$auth_fields = array('auth_hide4reply'); 
		break; 
		
		case AUTH_HIDE4POSTS:
			$a_sql = 'a.auth_hide4posts'; 
			$auth_fields = array('auth_hide4posts'); 
		break;
		
		case AUTH_HIDE4FORTUNE:
			$a_sql = 'a.auth_hide4fortune'; 
			$auth_fields = array('auth_hide4fortune'); 
		break; 

#
#-----[ OPEN ]------------------------------------------
#
includes/constants.php

#
#-----[ FIND ]------------------------------------------
#
define('AUTH_ATTACH', 11);

#
#-----[ AFTER, ADD ]------------------------------------------
#
# 在這裡與AUTH_SELLPOST對應的數字12應設為實際在您的constants.php裡已有的已AUTH_開頭的常量
# 的最大值加 1。例如,當您安裝有Global Announcement時,會有一個AUTH_GLOBALANNOUNCEMENT的
# 值為12,這樣如果沒有其它更大的值,那你就把AUTH_SELLPOST設為13
define('AUTH_SELLPOST', 12);
define('AUTH_HIDE4REPLY', AUTH_SELLPOST + 1);
define('AUTH_HIDE4POSTS', AUTH_SELLPOST + 2);
define('AUTH_HIDE4FORTUNE', AUTH_SELLPPOST + 3);

#
#-----[ FIND ]------------------------------------------
#
?>

#
#-----[ BEFORE, ADD ]------------------------------------------
#
// Advanced Hide Post Mod
define('PAYMENT_TABLE', $table_prefix.'payment');
define('NORMAL_READ', 0);
define('REPLY_TO_READ', 1);
define('POSTS_TO_READ', 2);
define('PAY_TO_READ', 3);
define('FORTUNE_TO_READ', 4);
define('MIN_HIDE_WITH_VALUE', POSTS_TO_READ);
define('MIN_HIDE_WITH_CASH', PAY_TO_READ);
define('MAX_HIDE_TYPE', FORTUNE_TO_READ);
define('CASH_TYPE_OTHERS', 0);
define('CASH_TYPE_POINTS', 1);
define('CASH_TYPE_CASHMOD2', 2);

#
#-----[ OPEN ]------------------------------------------
#
includes/prune.php

#
#-----[ FIND ]------------------------------------------
#
			remove_search_post($sql_post);

#
#-----[ BEFORE, ADD ]------------------------------------------
#
			$sql = "DELETE FROM " . PAYMENT_TABLE . " 
				WHERE post_id IN ($sql_post)";
			if ( !$db->sql_query($sql) )
			{
				message_die(GENERAL_ERROR, 'Could not delete payment information during prune', '', __LINE__, __FILE__, $sql);
			}

#
#-----[ OPEN ]------------------------------------------
#
includes/functions_post.php

#
#-----[ FIND ]------------------------------------------
#
	function submit_post($mode

#
#-----[ IN-LINE FIND ]------------------------------------------
#
)

#
#-----[ IN-LINE BEFORE, ADD ]------------------------------------------
#
, $hiding_type, $hiding_value, $hiding_cash_id

#
#-----[ FIND ]------------------------------------------
#
	$sql = ($mode != "editpost")

#
#-----[ IN-LINE FIND ]------------------------------------------
#
enable_sig

#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
, hiding_type, hiding_condition_value, hiding_cash_id

#
#-----[ IN-LINE FIND ]------------------------------------------
#
$attach_sig

#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
, $hiding_type, $hiding_value, $hiding_cash_id

#
#-----[ IN-LINE FIND ]------------------------------------------
#
enable_sig = $attach_sig

#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
, hiding_type = $hiding_type, hiding_condition_value=$hiding_value, hiding_cash_id=$hiding_cash_id

#
#-----[ FIND ]------------------------------------------
#
function delete_post(

#
#-----[ FIND ]------------------------------------------
#
		if ($post_data['last_post'])

#
#-----[ BEFORE, ADD ]------------------------------------------
#
		// Advanced Hide Post MOD
		$sql = "DELETE FROM " . PAYMENT_TABLE . " 
			WHERE post_id = $post_id";
		if (!$db->sql_query($sql))
		{
			message_die(GENERAL_ERROR, 'Error in deleting post\'s payment information', '', __LINE__, __FILE__, $sql);
		}

#
#-----[ OPEN ]------------------------------------------
#
includes/topic_review.php

#
#-----[ FIND ]------------------------------------------
#
			$message = $row['post_text'];

#
#-----[ REPLACE WITH ]------------------------------------------
#
			include_once($phpbb_root_path . 'includes/functions_hide.' . $phpEx);
			$message = strip_hidden_contents($row, $hiding_info);

#
#-----[ FIND ]------------------------------------------ 
#
			$template->assign_block_vars('postrow', array(

# 
#-----[ BEFORE, ADD ]------------------------------------------ 
#
			$info_box = get_hiding_info_box($hiding_info, true);

#
#-----[ FIND ]------------------------------------------
#
				'MESSAGE' => $message,

#
#-----[ AFTER, ADD ]------------------------------------------
#
				'HIDING_INFO_BOX' => $info_box,

#
#-----[ FIND ]------------------------------------------
#
# 只有在您的論壇上安裝了 attach_mod 時才進行這一步\r
			display_review_attachments($row['post_id'], $row['post_attachment'], $is_auth);

#
#-----[ BEFORE, ADD ]------------------------------------------
#
# 只有在您的論壇上安裝了 attach_mod 時才進行這一步\r
			if ( $hiding_info['show_attachment'] )

# 
#-----[ OPEN ]------------------------------------------ 
#
includes/bbcode.php

#
#-----[ FIND ]------------------------------------------ 
#
	define("BBCODE_TPL_READY", true);

# 
#-----[ BEFORE, ADD ]------------------------------------------ 
#
\n	$bbcode_tpl['intro_open'] = str_replace('{L_INTRO}', $lang['Introduction'], $bbcode_tpl['intro_open']);

#
#-----[ FIND ]------------------------------------------ 
#
		$bbcode_tpl = prepare_bbcode_template($bbcode_tpl);
	}

# 
#-----[ AFTER, ADD ]------------------------------------------ 
#
	// [intro] and [/intro] for introduction of hidden contents
	$text = str_replace("[intro:$uid]", $bbcode_tpl['intro_open'], $text);
	$text = str_replace("[/intro:$uid]", $bbcode_tpl['intro_close'], $text);

#
#-----[ FIND ]------------------------------------------ 
#
	// Remove our padding from the string..
	return substr($text, 1);;

} // bbencode_first_pass()

# 
#-----[ BEFORE, ADD ]------------------------------------------ 
#
	$text = preg_replace("#\[intro\](.*?)\[/intro\]#si", "[intro:$uid]\\\1[/intro:$uid]", $text);

#
#-----[ OPEN ]------------------------------------------
#
admin/admin_board.php

#
#-----[ FIND ]------------------------------------------ 
#
include($phpbb_root_path . 'includes/functions_selects.'.$phpEx);

# 
#-----[ AFTER, ADD ]------------------------------------------ 
#
include($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_admin_hide.' . $phpEx);

#
#-----[ FIND ]------------------------------------------
#
$namechange_no = (

#
#-----[ AFTER, ADD ]------------------------------------------
#
$sellpost_yes = ( $new['allow_sellpost'] ) ? "checked=\"checked\"" : "";
$sellpost_no = ( !$new['allow_sellpost'] ) ? "checked=\"checked\"" : "";
$hide4reply_yes = ( $new['allow_hide4reply'] ) ? "checked=\"checked\"" : "";
$hide4reply_no = ( !$new['allow_hide4reply'] ) ? "checked=\"checked\"" : "";
$hide4posts_yes = ( $new['allow_hide4posts'] ) ? "checked=\"checked\"" : "";
$hide4posts_no = ( !$new['allow_hide4posts'] ) ? "checked=\"checked\"" : "";
$hide4fortune_yes = ( $new['allow_hide4fortune'] ) ? "checked=\"checked\"" : "";
$hide4fortune_no = ( !$new['allow_hide4fortune'] ) ? "checked=\"checked\"" : "";
$cashtype_others = ( $new['cash_system_type'] == CASH_TYPE_OTHERS ) ? "checked=\"checked\"" : "";
$cashtype_points = ( $new['cash_system_type'] == CASH_TYPE_POINTS ) ? "checked=\"checked\"" : "";
$cashtype_cashmod2 = ( $new['cash_system_type'] == CASH_TYPE_CASHMOD2 ) ? "checked=\"checked\"" : "";

#
#-----[ FIND ]------------------------------------------
#
	"L_RESET" =>

#
#-----[ AFTER, ADD ]------------------------------------------
#
	"L_HIDE_POST" => $lang['Hide_post'],
	"L_ALLOW_SELL_POST" => $lang['Allow_sell_post'],
	"L_MAX_SELLINGPRICE" => $lang['Max_sellingprice'],
	"L_MAX_PRICE_EXPLAIN" => $lang['Max_price_explain'],
	"L_MIN_SELLINGPRICE" => $lang['Min_sellingprice'],
	"L_MIN_PRICE_EXPLAIN" => $lang['Min_price_explain'],
	"SELLPOST_YES" => $sellpost_yes,
	"SELLPOST_NO" => $sellpost_no,
	"MAX_SELLINGPRICE" => $new['max_sellingprice'],
	"MIN_SELLINGPRICE" => $new['min_sellingprice'],	
	"L_ALLOW_HIDE4REPLY" => $lang['Allow_hide4reply'],
	"HIDE4REPLY_YES" => $hide4reply_yes,
	"HIDE4REPLY_NO" => $hide4reply_no,
	"L_ALLOW_HIDE4POSTS" => $lang['Allow_hide4posts'],
	"L_MAX_POSTS_REQUIRED" => $lang['Max_posts_required'],
	"L_MAX_POSTS_EXPLAIN" => $lang['Max_posts_explain'],
	"L_MIN_POSTS_REQUIRED" => $lang['Min_posts_required'],
	"L_MIN_POSTS_EXPLAIN" => $lang['Min_posts_explain'],
	"HIDE4POSTS_YES" => $hide4posts_yes,
	"HIDE4POSTS_NO" => $hide4posts_no,	
	"MAX_POSTSREQUIRED" => $new['max_postsrequired'],
	"MIN_POSTSREQUIRED" => $new['min_postsrequired'],
	"L_ALLOW_HIDE4FORTUNE" => $lang['Allow_hide4fortune'],
	"L_MAX_FORTUNE_REQUIRED" => $lang['Max_fortune_required'],
	"L_MAX_FORTUNE_EXPLAIN" => $lang['Max_fortune_explain'],
	"L_MIN_FORTUNE_REQUIRED" => $lang['Min_fortune_required'],
	"L_MIN_FORTUNE_EXPLAIN" => $lang['Min_fortune_explain'],
	"HIDE4FORTUNE_YES" => $hide4fortune_yes,
	"HIDE4FORTUNE_NO" => $hide4fortune_no,
	"MAX_FORTUNEREQUIRED" => $new['max_fortunerequired'],
	"MIN_FORTUNEREQUIRED" => $new['min_fortunerequired'],
	"L_CASHSYSTEMTYPE" => $lang['Cash_system_type'],
	"L_CASH_TYPE_EXPLAIN" => $lang['Cash_type_explain'],
	"L_CASH_OTHERS" => $lang['Cash_others'],
	"L_CASH_FIELDNAME" => $lang['Cash_fieldname'],
	"L_CASH_FIELD_EXPLAIN" => $lang['Cash_fieldname_explain'],
	"L_CASH_NAME" => $lang['Cash_name'],
	"L_CASH_NAME_EXPLAIN" => $lang['Cash_name_explain'],
	"CASHTYPE_POINTS" => $cashtype_points,
	"CASHTYPE_CASHMOD2" => $cashtype_cashmod2,
	"CASHTYPE_OTHERS" => $cashtype_others,
	"CASH_FIELD_NAME" => $new['cash_field_name'],
	"CASH_NAME" => $new['cash_type_name'],

#
#-----[ OPEN ]------------------------------------------
#
admin/admin_forumauth.php

#
#-----[ FIND ]------------------------------------------ 
#
require('./pagestart.' . $phpEx);

# 
#-----[ AFTER, ADD ]------------------------------------------ 
#
include($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_admin_hide.' . $phpEx);

#
#-----[ FIND ]------------------------------------------
#
	0  =>

#
#-----[ IN-LINE FIND ]------------------------------------------
#
),

#
#-----[ IN-LINE BEFORE, ADD ]------------------------------------------
#
, AUTH_REG, AUTH_MOD, AUTH_MOD, AUTH_MOD

#
#-----[ FIND ]------------------------------------------
#
	1  =>

#
#-----[ IN-LINE FIND ]------------------------------------------
#
),

#
#-----[ IN-LINE BEFORE, ADD ]------------------------------------------
#
, AUTH_REG, AUTH_MOD, AUTH_MOD, AUTH_MOD

#
#-----[ FIND ]------------------------------------------
#
	2  =>

#
#-----[ IN-LINE FIND ]------------------------------------------
#
),

#
#-----[ IN-LINE BEFORE, ADD ]------------------------------------------
#
, AUTH_REG, AUTH_MOD, AUTH_MOD, AUTH_MOD

#
#-----[ FIND ]------------------------------------------
#
	3  =>

#
#-----[ IN-LINE FIND ]------------------------------------------
#
),

#
#-----[ IN-LINE BEFORE, ADD ]------------------------------------------
#
, AUTH_ACL, AUTH_MOD, AUTH_MOD, AUTH_MOD

#
#-----[ FIND ]------------------------------------------
#
	4  =>

#
#-----[ IN-LINE FIND ]------------------------------------------
#
),

#
#-----[ IN-LINE BEFORE, ADD ]------------------------------------------
#
, AUTH_ACL, AUTH_MOD, AUTH_MOD, AUTH_MOD

#
#-----[ FIND ]------------------------------------------
#
	5  =>

#
#-----[ IN-LINE FIND ]------------------------------------------
#
),

#
#-----[ IN-LINE BEFORE, ADD ]------------------------------------------
#
, AUTH_MOD, AUTH_MOD, AUTH_MOD, AUTH_MOD
#\r
#-----[ FIND ]------------------------------------------
#
	6  =>

#
#-----[ IN-LINE FIND ]------------------------------------------
#
),

#
#-----[ IN-LINE BEFORE, ADD ]------------------------------------------
#
, AUTH_MOD, AUTH_MOD, AUTH_MOD, AUTH_MOD

#
#-----[ FIND ]------------------------------------------
#
$forum_auth_fields

#
#-----[ IN-LINE FIND ]------------------------------------------
#
);

#
#-----[ IN-LINE BEFORE, ADD ]------------------------------------------
#
, 'auth_sellpost', 'auth_hide4reply', 'auth_hide4posts', 'auth_hide4fortune'

#
#-----[ FIND ]------------------------------------------
#
']);

#
#-----[ IN-LINE FIND ]------------------------------------------
#
);

#
#-----[ IN-LINE REPLACE WITH ]------------------------------------------
#
,

#
#-----[ AFTER, ADD ]------------------------------------------
#
	'auth_sellpost' => $lang['Sellpost'],
	'auth_hide4reply' => $lang['Hide4reply'],
	'auth_hide4posts' => $lang['Hide4posts'],
	'auth_hide4fortune' => $lang['Hide4fortune']);

#
#-----[ OPEN ]------------------------------------------
#
admin/admin_ug_auth.php

#
#-----[ FIND ]------------------------------------------
#
$forum_auth_fields =

#
#-----[ IN-LINE FIND ]------------------------------------------
#
);

#
#-----[ IN-LINE BEFORE, ADD ]------------------------------------------
#
, 'auth_sellpost', 'auth_hide4reply', 'auth_hide4posts', 'auth_hide4fortune'

#
#-----[ FIND ]------------------------------------------
#
$auth_field_match =

#
#-----[ FIND ]------------------------------------------
#
);

#
#-----[ IN-LINE FIND ]------------------------------------------
#
);

#
#-----[ IN-LINE REPLACE WITH ]------------------------------------------
#
,

#
#-----[ AFTER, ADD ]------------------------------------------
#
	'auth_sellpost' => AUTH_SELLPOST,
	'auth_hide4reply' => AUTH_HIDE4REPLY,
	'auth_hide4posts' => AUTH_HIDE4POSTS,
	'auth_hide4fortune' => AUTH_HIDE4FORTUNE);

#
#-----[ FIND ]------------------------------------------
#
']);

#
#-----[ IN-LINE FIND ]------------------------------------------
#
);

#
#-----[ IN-LINE REPLACE WITH ]------------------------------------------
#
,

#
#-----[ AFTER, ADD ]------------------------------------------
#
	'auth_sellpost' => $lang['Sellpost'],
	'auth_hide4reply' => $lang['Hide4reply'],
	'auth_hide4posts' => $lang['Hide4posts'],
	'auth_hide4fortune' => $lang['Hide4fortune']);

#
#-----[ FIND ]------------------------------------------
#
			$sql = "UPDATE " . AUTH_ACCESS_TABLE . "
				SET auth_view =

#
#-----[ IN-LINE FIND ]------------------------------------------
#
auth_announce = 0

#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
, auth_sellpost = 0, auth_hide4reply = 0, auth_hide4posts = 0, auth_hide4fortune = 0

#
#-----[ FIND ]------------------------------------------
#
				$sql = "UPDATE " . AUTH_ACCESS_TABLE . "
					SET auth_view = 0

#
#-----[ IN-LINE FIND ]------------------------------------------
#
auth_announce = 0

#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
, auth_sellpost = 0, auth_hide4reply = 0, auth_hide4posts = 0, auth_hide4fortune = 0

#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/viewtopic_body.tpl

#
#-----[ FIND ]------------------------------------------
#
{postrow.SIGNATURE}

#
#-----[ IN-LINE FIND ]------------------------------------------
#
{postrow.SIGNATURE}

#
#-----[ IN-LINE BEFORE, ADD ]------------------------------------------
#
{postrow.HIDING_INFO_BOX}

#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/search_results_posts.tpl

#
#-----[ FIND ]------------------------------------------
#
{searchresults.MESSAGE}

#
#-----[ IN-LINE FIND ]------------------------------------------
#
</span>

# 
#-----[ IN-LINE AFTER, ADD ]------------------------------------------ 
#
{searchresults.HIDING_INFO_BOX}

#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/admin/board_config_body.tpl

#
#-----[ FIND ]------------------------------------------
#
	<tr>
		<th class="thHead" colspan="2">{L_COOKIE_SETTINGS}</th>

#
#-----[ BEFORE, ADD ]------------------------------------------
#
	<tr>
		<th class="thHead" colspan="2">{L_HIDE_POST}</th>
	</tr>
	<tr>
		<td class="row1">{L_CASHSYSTEMTYPE}<br /><span class="gensmall">{L_CASH_TYPE_EXPLAIN}</span></td>
		<td class="row2"><input type="radio" name="cash_system_type" value="1" {CASHTYPE_POINTS} /> POINTS  <input type="radio" name="cash_system_type" value="2" {CASHTYPE_CASHMOD2} /> CASH MOD 2  <input type="radio" name="cash_system_type" value="0" {CASHTYPE_OTHERS} /> {L_CASH_OTHERS}</td>
	</tr>
	<tr>
		<td class="row1">{L_CASH_FIELDNAME}<br /><span class="gensmall">{L_CASH_FIELD_EXPLAIN}</span></td>
		<td class="row2"><input type="text" name="cash_field_name" value="{CASH_FIELD_NAME}" /></td>
	</tr>
	<tr>
		<td class="row1">{L_CASH_NAME}<br /><span class="gensmall">{L_CASH_NAME_EXPLAIN}</span></td>
		<td class="row2"><input type="text" name="cash_type_name" value="{CASH_NAME}" /></td>
	</tr>
	<tr>
		<td class="row1">{L_ALLOW_HIDE4REPLY}</td>
		<td class="row2"><input type="radio" name="allow_hide4reply" value="1" {HIDE4REPLY_YES} /> {L_YES}  <input type="radio" name="allow_hide4reply" value="0" {HIDE4REPLY_NO} /> {L_NO}</td>
	</tr>
	<tr>
		<td class="row1">{L_ALLOW_SELL_POST}</td>
		<td class="row2"><input type="radio" name="allow_sellpost" value="1" {SELLPOST_YES} /> {L_YES}  <input type="radio" name="allow_sellpost" value="0" {SELLPOST_NO} /> {L_NO}</td>
	</tr>
	<tr>
		<td class="row1">{L_MAX_SELLINGPRICE}<br /><span class="gensmall">{L_MAX_PRICE_EXPLAIN}</span></td>
		<td class="row2"><input type="text" name="max_sellingprice" value="{MAX_SELLINGPRICE}" /></td>
	</tr>
	<tr>
		<td class="row1">{L_MIN_SELLINGPRICE}<br /><span class="gensmall">{L_MIN_PRICE_EXPLAIN}</span></td>
		<td class="row2"><input type="text" name="min_sellingprice" value="{MIN_SELLINGPRICE}" /></td>
	</tr>
	<tr>
		<td class="row1">{L_ALLOW_HIDE4POSTS}</td>
		<td class="row2"><input type="radio" name="allow_hide4posts" value="1" {HIDE4POSTS_YES} /> {L_YES}  <input type="radio" name="allow_hide4posts" value="0" {HIDE4POSTS_NO} /> {L_NO}</td>
	</tr>
	<tr>
		<td class="row1">{L_MAX_POSTS_REQUIRED}<br /><span class="gensmall">{L_MAX_POSTS_EXPLAIN}</span></td>
		<td class="row2"><input type="text" name="max_postsrequired" value="{MAX_POSTSREQUIRED}" /></td>
	</tr>
	<tr>
		<td class="row1">{L_MIN_POSTS_REQUIRED}<br /><span class="gensmall">{L_MIN_POSTS_EXPLAIN}</span></td>
		<td class="row2"><input type="text" name="min_postsrequired" value="{MIN_POSTSREQUIRED}" /></td>
	</tr>
	<tr>
		<td class="row1">{L_ALLOW_HIDE4FORTUNE}</td>
		<td class="row2"><input type="radio" name="allow_hide4fortune" value="1" {HIDE4FORTUNE_YES} /> {L_YES}  <input type="radio" name="allow_hide4fortune" value="0" {HIDE4FORTUNE_NO} /> {L_NO}</td>
	</tr>
	<tr>
		<td class="row1">{L_MAX_FORTUNE_REQUIRED}<br /><span class="gensmall">{L_MAX_POSTS_EXPLAIN}</span></td>
		<td class="row2"><input type="text" name="max_fortunerequired" value="{MAX_FORTUNEREQUIRED}" /></td>
	</tr>
	<tr>
		<td class="row1">{L_MIN_FORTUNE_REQUIRED}<br /><span class="gensmall">{L_MIN_POSTS_EXPLAIN}</span></td>
		<td class="row2"><input type="text" name="min_fortunerequired" value="{MIN_FORTUNEREQUIRED}" /></td>
	</tr>

#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/posting_preview.tpl

#
#-----[ FIND ]------------------------------------------
#
{MESSAGE}

#
#-----[ FIND ]------------------------------------------
#
				</td>
			</tr>

#
#-----[ BEFORE, ADD ]------------------------------------------
#
					{HIDING_INFO_BOX}

#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/posting_topic_review.tpl

#
#-----[ FIND ]------------------------------------------
#
{postrow.MESSAGE}

#
#-----[ IN-LINE FIND ]------------------------------------------
#
</td>

# 
#-----[ IN-LINE BEFORE, ADD ]------------------------------------------ 
#
{postrow.HIDING_INFO_BOX}

#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/posting_body.tpl

#
#-----[ FIND ]---------------------------------
#
f_help =

#
#-----[ AFTER, ADD ]------------------------------------------
#
y_help = "{L_BBCODE_Y_HELP}";

#
#-----[ FIND ]---------------------------------
#
bbtags = new Array(


#
#-----[ IN-LINE FIND ]---------------------------------
#
);


#
#-----[ IN-LINE BEFORE, ADD ]---------------------------------
#
,'[intro]','[/intro]'

#
#-----[ FIND ]------------------------------------------
#
		  <!-- BEGIN switch_html_checkbox -->

#
#-----[ BEFORE, ADD ]------------------------------------------
#
		<!-- BEGIN switch_hide_post -->
			<tr>
				<td> </td>
				<td>
					<select name='hiding_type' onchange="javascript:check_type(this);">
					<option value="0">{switch_hide_post.L_HIDE_NORMAL}</option>
					<!-- BEGIN hiding_option -->
						<option value="{switch_hide_post.hiding_option.HIDING_TYPE}" {switch_hide_post.hiding_option.S_HIDING_SELECTED} />{switch_hide_post.hiding_option.HIDING_TYPE_DESC}</option>
					<!-- END hiding_option -->
					</select>
					<!-- BEGIN switch_hiding_value -->
						<span class="gen"> <span class="gen" id="value_range"></span> {switch_hide_post.switch_hiding_value.CASH_NAME_PREFIX} {switch_hide_post.switch_hiding_value.CASH_ID}<input type="text" name="hiding_value" size="5" value="{switch_hide_post.switch_hiding_value.HIDING_COND_VALUE}" {switch_hide_post.S_HIDING_VALUE_DISABLED}> {switch_hide_post.switch_hiding_value.CASH_NAME_POSTFIX}</span>
					<!-- END switch_hiding_value -->
					<!-- BEGIN cash_type_box -->
						<select name="hiding_cash_id" id="cash_type" onChange="javascript:check_type();">
						<!-- BEGIN cash_type_option -->
							<option value="{switch_hide_post.cash_type_box.cash_type_option.CASH_ID}" {switch_hide_post.cash_type_box.cash_type_option.S_CASH_TYPE_SELECTED} />{switch_hide_post.cash_type_box.cash_type_option.CASH_NAME}</option>
						<!-- END cash_type_option -->
						</select>
					<!-- END cash_type_box -->
					
				</td>
			</tr>
			<SCRIPT language="JavaScript" type="text/javascript">
			<!--
			function check_type() {
			<!-- BEGIN hiding_script -->
				var s1=document.getElementById('hiding_type');
				var v1=s1.options[s1.selectedIndex].value;
				var min_cash_type={switch_hide_post.MIN_CASH_TYPE};
				var cash_range_list=[{switch_hide_post.hiding_script.CASH_RANGE_LIST}];
				var v2=0;
				<!-- BEGIN have_cash -->
				if (v1<min_cash_type) document.getElementById('cash_type').style.visibility='hidden';
				else document.getElementById('cash_type').style.visibility='visible';
				if (v1<{switch_hide_post.MIN_VALUE_BOX_TYPE}) document.getElementById('hiding_value').style.visibility='hidden';
				else document.getElementById('hiding_value').style.visibility='visible';
				var s2=document.getElementById('cash_type');
				if (v1>=min_cash_type && {switch_hide_post.hiding_script.NON_SINGLE_CASH}) v2=s2.selectedIndex;
				<!-- END have_cash -->
				document.getElementById('value_range').innerHTML=cash_range_list[v1][v2];
			<!-- END hiding_script -->
			}
			check_type();
			// -->
			</SCRIPT>
		<!-- END switch_hide_post -->

# 
#-----[ OPEN ]------------------------------------------ 
#
templates/subSilver/bbcode.tpl

#
#-----[ FIND ]------------------------------------------ 
#
<!-- BEGIN email --><a href="mailto:{EMAIL}">{EMAIL}</A><!-- END email -->

# 
#-----[ AFTER, ADD ]------------------------------------------ 
#
<!-- BEGIN intro_open --></span>
<table cellspacing="1" cellpadding="3" border="0">
<tr> 
	  <td><span class="genmed"><b>{L_INTRO}</b></span></td>
	</tr>
	<tr>
	  <td class="quote"><!-- END intro_open -->
<!-- BEGIN intro_close --></td>
	</tr>
</table>
<span class="postbody"><!-- END intro_close -->

#
#-----[ OPEN ]------------------------------------------
#
language/lang_english/lang_bbcode.php

#
#-----[ FIND ]------------------------------------------
#
$faq[] = array("--", "Other matters");

#
#-----[ BEFORE, ADD ]------------------------------------------
#
$faq[] = array("--", "Introduction of the hidden contents");
$faq[] = array("Show introduction in a hidden post", "This feature is used for hiding a post. Normally the user cannot see your message if you select to hide it with one of the methods allowed. You may want to show some informations to the user before he can read it in some cases. For example you can show the introduction of the sold post to attract the user to buy it. Any text including URL, images and so on enclosed in the [intro] and [/intro] tags will be shown no matter which kind of hiding type you select.<p>Just put the informations you want to show between [intro] and [/intro]. For example: <p><b>[intro]</b>You should buy the post to get the downloading URL for this program.<b>[/intro]</b></p></p>");

#
#-----[ OPEN ]------------------------------------------
#
language/lang_chinese_simplified/lang_bbcode.php

#
#-----[ FIND ]------------------------------------------
#
$faq[] = array("--", "其它功能");

#
#-----[ BEFORE, ADD ]------------------------------------------
#
$faq[] = array("--", "隱藏內容介紹");
$faq[] = array("在隱藏帖子中加入內容簡介", "這一功能是為了配合隱藏帖子內容。如果您發帖時指定了一種隱藏帖子的方式,通常來說其他用戶在達到您所指定的要求時是不能看到這個帖子的任何內容的。而無論其他會員是否有權查看您的帖子的正文,在[intro][/intro]標籤內的內容都可以顯示出來。比如當您想出售一個帖子時,可以用這一方法給用戶顯示一些相關信息,以利於會員決定是否購買您的帖子。本標籤的使用很簡單,只要把您想顯示的內容寫在[intro]與[/intro]之間即可。");

#
#-----[ OPEN ]------------------------------------------
#
# 只有在您的論壇上安裝了 Advanced Quick Reply MOD 時才進行這一步\r
quick_reply.php

#
#-----[ FIND ]------------------------------------------
#
# 只有在您的論壇上安裝了 Advanced Quick Reply MOD 時才進行這一步\r
	$last_msg = $postrow[$total_posts - 1]['post_text'];

#
#-----[ BEFORE, ADD ]------------------------------------------
#
# 只有在您的論壇上安裝了 Advanced Quick Reply MOD 時才進行這一步\r
	if ($postrow[$total_posts - 1]['hiding_type'])
	{
		preg_match_all("#\[intro:$bbcode_uid\](.*?)\[/intro:$bbcode_uid\]#si", $postrow[$total_posts - 1]['post_text'], $matches, PREG_PATTERN_ORDER);
		$last_msg = implode('', $matches[0]);
	}
	else

#
#-----[ SAVE/CLOSE ALL FILES ]---------------------------------
#
# EoM


我看你在這個code之前應該安裝錯誤, 令到它得不到數值, 請參考多一次。
i-Web System 隨坊出來耶

新聞:
遊戲區開幕啦! 打造隨城最強的遊戲王國!
宣傳車出動! 賣力宣傳隨坊吧!
版主召募!版主魂激發!
中文好好學,不要方言通天飛
i-Web System 正式版上架測試!
momohow
星球普通子民
星球普通子民
文章: 5
註冊時間: 2004-02-14 18:10

文章 momohow »

請問藍色的天空大大
Advanced Hide Post 1.0.2 Beta在哪下載到的啊?
我在http://roc.phpbbhost1.biz/portal.php或者http://roc.myz.info
都沒找到1.0.2 beta版耶,可否告知去哪邊下載?
因為照你所列的code裡,升級記錄說這版才支援cashmod 2.2.x
麻煩你了,謝謝~
basang
星球普通子民
星球普通子民
文章: 28
註冊時間: 2003-07-27 02:04

文章 basang »

我也是安裝完後
編輯文章,就出現這個錯誤
我已經重新安裝了3次,都一樣\r

拜託一下,竹貓的高手,能幫忙一下嗎

代碼: 選擇全部

Error in posting

DEBUG MODE

SQL Error : 1064 You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near ' hiding_condition_value=, hiding_cash_id= WHERE post_id = 18' a

UPDATE phpbb_posts SET post_username = '', enable_bbcode = 1, enable_html = 0, enable_smilies = 1, enable_sig = 1, hiding_type = , hiding_condition_value=, hiding_cash_id= WHERE post_id = 18

Line : 271
File : c:\appserv\www\phpbb2\includes\functions_post.php
Mac
百戰天龍馬蓋先
百戰天龍馬蓋先
文章: 2590
註冊時間: 2003-02-02 02:28
來自: MacphpBBMOD
聯繫:

文章 Mac »

includes/functions_post.php

代碼: 選擇全部

#
#-----[ IN-LINE FIND ]------------------------------------------
#
enable_sig = $attach_sig

#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
, hiding_type = $hiding_type, hiding_condition_value=$hiding_value, hiding_cash_id=$hiding_cash_id
改成

代碼: 選擇全部

#
#-----[ IN-LINE FIND ]------------------------------------------
#
enable_sig = $attach_sig

#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
, hiding_type = $hiding_type, hiding_condition_value='$hiding_value', hiding_cash_id='$hiding_cash_id'
~Mac
+ 關於 phpBB 使用問題請在版面發問,私人訊息提供其他不相干或是隱私的事情聯絡之用。

phpBB 官網 | 竹貓星球 | MacphpBBMOD | 我的服務
basang
星球普通子民
星球普通子民
文章: 28
註冊時間: 2003-07-27 02:04

文章 basang »

感謝MAC大大的回覆

但是問題還沒解決
忘嚕補充最上面還有一個錯誤
我已經從新檢查過好幾次修改的PHP
我確定我都沒有增加錯誤

Warning: Missing argument 21 for submit_post() in c:\appserv\www\phpbb2\includes\functions_post.php on line 216

Warning: Missing argument 22 for submit_post() in c:\appserv\www\phpbb2\includes\functions_post.php on line 216

Warning: Missing argument 23 for submit_post() in c:\appserv\www\phpbb2\includes\functions_post.php on line 216
主題已鎖定

回到「外掛問題討論」