1 頁 (共 1 頁)

[問題] 改良型引言 1.0.0

發表於 : 2006-01-18 11:00
阿維
問題外掛:改良型引言 1.0.0
參考連結:http://www.phpbb-tw.net/phpbb/viewtopic.php?t=28049
使用版本:phpBB 2.0.19
網站位置:http://forums.jcms.com.tw
狀況描述:
我在升級完2.0.19了之後發現引言代碼會變成"WesleyWei";p="22668 寫到:"
可是phpBB 2.0.18卻沒有這個問題,請問這是不是跟下面這段phpbb_2.0.18_to_2.0.19有關?

代碼: 選擇全部

#
#-----[ FIND ]---------------------------------------------
# Line 255
	$text = bbencode_first_pass_pda($text, $uid, '/\[quote=(\\\\\".*?\\\\\")\]/is', '[/quote]', '', false, '', "[quote:$uid=\\\1]");

#
#-----[ REPLACE WITH ]---------------------------------------------
# 
	$text = bbencode_first_pass_pda($text, $uid, '/\[quote=\\\\\\\"(.*?)\\\\\\\"\]/is', '[/quote]', '', false, '', "[quote:$uid=\\\\\"\\\1\\\\\"]");

#
#-----[ FIND ]---------------------------------------------
# Line 392
				if( preg_match('#\[quote=\\\\\"#si', $possible_start, $match) && !preg_match('#\[quote=\\\\\"(.*?)\\\\\"\]#si', $possible_start) )
				{
					// OK we are in a quote tag that probably contains a ] bracket.
					// Grab a bit more of the string to hopefully get all of it..
					if ($close_pos = strpos($text, '"]', $curr_pos + 9))
					{
						if (strpos(substr($text, $curr_pos + 9, $close_pos - ($curr_pos + 9)), '[quote') === false)
						{
							$possible_start = substr($text, $curr_pos, $close_pos - $curr_pos + 2);

#
#-----[ REPLACE WITH ]---------------------------------------------
# 
				if( preg_match('#\[quote=\\\\\"#si', $possible_start, $match) && !preg_match('#\[quote=\\\\\"(.*?)\\\\\"\]#si', $possible_start) )
				{
					// OK we are in a quote tag that probably contains a ] bracket.
					// Grab a bit more of the string to hopefully get all of it..
					if ($close_pos = strpos($text, '"]', $curr_pos + 14))
					{
						if (strpos(substr($text, $curr_pos + 14, $close_pos - ($curr_pos + 14)), '[quote') === false)
						{
							$possible_start = substr($text, $curr_pos, $close_pos - $curr_pos + 7);
改良型引言 1.0.0

代碼: 選擇全部

#
#-----[ FIND ]---------------------------------------------
# around line 269
	$text = bbencode_first_pass_pda($text, $uid, '/\[quote=(\\\\\\\"[^"]*?\\\\\\\")\]/is', '[/quote]', '', false, '', "[quote:$uid=\\\1]");

# 
#-----[ AFTER, ADD ]--------------------------------------- 
# 
	// [QUOTE] and [/QUOTE] for posting replies with quote, or just for quoting stuff with an pre-defined post entry
	$text = bbencode_first_pass_pda($text, $uid, '/\[quote=p=(\\\\\\\"[0-9]+\\\\\\\")\]/is', '[/quote]', '', false, '', "[quote:$uid=p=\\\1]");

	$text = bbencode_first_pass_pda($text, $uid, '/\[quote=(\\\\\".*?\\\\\");p=(\\\\\\\"[0-9]+\\\\\\\")\]/is', '[/quote]', '', false, '', "[quote:$uid=\\\1;p=\\\2]");

發表於 : 2006-02-09 22:08
阿維
請問有前輩知道解決的方法嗎?
因為官方也沒釋出修正的方法,請問可以幫忙檢查嗎?

發表於 : 2006-02-10 15:17
hpo14
以下為不負責發表 !!

在修改前,請先最好備份動作,以免發生不測... :oops:

第一種\r

代碼: 選擇全部

# 
#-----[ FIND ]--------------------------------------------- 
# Line 255 
   $text = bbencode_first_pass_pda($text, $uid, '/\[quote=(\\\\\".*?\\\\\")\]/is', '[/quote]', '', false, '', "[quote:$uid=\\\1]"); 

# 
#-----[ REPLACE WITH ]--------------------------------------------- 
# 
   $text = bbencode_first_pass_pda($text, $uid, '/\[quote=(\\\\\\\".*?\\\\\\\")\]/is', '[/quote]', '', false, '', "[quote:$uid=\\\\\"\\\1\\\\\"]");
第二種\r

代碼: 選擇全部

# 
#-----[ FIND ]--------------------------------------------- 
# Line 255 
   $text = bbencode_first_pass_pda($text, $uid, '/\[quote=(\\\\\".*?\\\\\")\]/is', '[/quote]', '', false, '', "[quote:$uid=\\\1]"); 

# 
#-----[ REPLACE WITH ]--------------------------------------------- 
# 
   $text = bbencode_first_pass_pda($text, $uid, '/\[quote=(\\\\\\\".*?\\\\\\\")\]/is', '[/quote]', '', false, '', "[quote:$uid=\\\\\"\\\1\\\\\";]";);
分兩種是因為我不確定... :-(
所以都試試看吧.. Jordan 兄 ;-)

發表於 : 2006-02-11 01:37
阿維
我想我知道原因了
原因是因為這兩段的關係,現在都已經沒問題了! :mrgreen:

略過修改:

代碼: 選擇全部

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

#
#-----[ FIND ]---------------------------------------------
# Line 28
$html_entities_match = array('#&(?!(\#[0-9]+;))#', '#<#', '#>#');
$html_entities_replace = array('&', '<', '>');

#
#-----[ REPLACE WITH ]---------------------------------------------
# 
$html_entities_match = array('#&(?!(\#[0-9]+;))#', '#<#', '#>#', '#"#');
$html_entities_replace = array('&', '<', '>', '"');

代碼: 選擇全部

# 
#-----[ OPEN ]--------------------------------------------- 
# 
privmsg.php

#
#-----[ FIND ]---------------------------------------------
# Line 38
$html_entities_match = array('#&(?!(\#[0-9]+;))#', '#<#', '#>#');
$html_entities_replace = array('&', '<', '>');

#
#-----[ REPLACE WITH ]---------------------------------------------
# 
$html_entities_match = array('#&(?!(\#[0-9]+;))#', '#<#', '#>#', '#"#');
$html_entities_replace = array('&', '<', '>', '"');
如果是Big5的phpBB有做Scorpion前輩的多國語系修正,該步驟不需要修改!

發表於 : 2006-10-30 09:08
阿維
回報,這個改法在"私人訊息"還是會失效,請問有前輩能夠幫忙解決這個問題嗎? :-(

我的版本是phpBB 2.0.21

發表於 : 2007-02-12 22:10
hentaibbc
JORDAN 寫:回報,這個改法在"私人訊息"還是會失效,請問有前輩能夠幫忙解決這個問題嗎? :-(

我的版本是phpBB 2.0.21
最近有人問我這個問題...
在陰錯陽差之下...
發現用下面的改法可以解決...

但是我不知道會不會有什麼其他的後遺症....^^"

不過...有空的人倒是可以幫我看看...



打開posting.php
找到

代碼: 選擇全部

			$message = '[quote="' . $quote_username . '";p="' . $post_id . '"]' . $message . '[/quote]';
改成

代碼: 選擇全部

			$message = '[quote="' . $quote_username . ';p=' . $post_id . '"]' . $message . '[/quote]';
打開template/subSilver/posting_topic_review.tpl
找到

代碼: 選擇全部

message[{postrow.U_POST_ID}] = "[quote="{postrow.POSTER_NAME}";p="{postrow.U_POST_ID}"]\n{postrow.PLAIN_MESSAGE}\n[/quote]";
改成

代碼: 選擇全部

message[{postrow.U_POST_ID}] = "[quote="{postrow.POSTER_NAME};p={postrow.U_POST_ID}"]\n{postrow.PLAIN_MESSAGE}\n[/quote]";
就麻煩有空有閒的人看一下吧!!