1 頁 (共 6 頁)

[2006/06/08] phpBB 2.0.21 安全性修正版本釋出

發表於 : 2006-06-08 05:42
jwxinst
哇哇= ="2.0.21終於釋出了
(今天有點空, 所以就寫了三篇....希望各位大大不會介意= =)

版本: phpBB 2.0.21
時間: 7th June 2006

目前下載點
http://www.phpbb.com/downloads.php

官方公佈查詢
http://www.phpbb.com/phpBB/viewtopic.php?t=397315

]竹貓星球正體中文版
http://www.phpbb-tw.net/phpbb/viewtopic.php?t=44770

  • Full Package
    Contains entire phpBB2 source and English language package
  • Changed Files Only
    Contains only those files changed from previous versions of phpBB. Please note this archive contains changed files for each previous release
  • Patch Files
    Contains patch compatible patches from the previous versions of phpBB.
  • Code Changes
    Contains step-by-step instructions in MOD format for updating heavily MODified installs

官方建議
Please ensure you read the INSTALL and README documents in docs/ before proceeding with installation or updates!.

更新重點
The changelog (contained within this release) is as follows:

[修正] Changes to random number generator code to explicitly truncate the length of the string

[修正] Quoting on boards with HTML enabled
解決了2.0.20的BBCODE在HTML開啟後出現引言錯誤

[修正] Special characters on boards with HTML enabled

[修正] Redirect to list if cancelling deletion of ranks, smilies or word censors
     這個好像是說可以更新了這些後台項目後會轉向

[修正] Missing error message if an inactive user tried to login (Bug #1598)
          修正了和正常顯示一段非正式會員 / 非法會員的錯誤訊息

[修正] Do not alter post counts when just removing a poll (Bug #1602)
          修正刪除一選票後不會自動更新票數

[修正] Correct error in removal of old session keys
          修正和解決錯誤訊息緩存數據(session keys)

[修正] Changed filtering of short search terms
          修正和改善短關鍵字的搜尋

[安全修正] Improved filtering on language selection (also addresses a number of bug reports related to missing languages)
改善系統控制台的過濾文字的功能

[改變] Backported more efficient highlighting code from Olympus


[改變] Backported zlib emulation code so that there is only a single confirmation image even if zlib is not available
From: Graham
Hi everyone,

phpBB Group announces the release of phpBB 2.0.21, the "Bertie's Summer Vacation" edition. This release is a cumulative bug fix update, as well as including a number of minor security fixes. We have altered the visual confirmation system used on servers without zlib enabled to bring it up to the same level as that used elsewhere and made a few small performance improvements.

發表於 : 2006-06-08 06:28
jwxinst
哈哈,我真是粗心大意, 忘了提醒各位本次升級並不需要改用任何的語系

代碼: 選擇全部

## Installation Level: Easy
## Installation Time: 45 Minutes 
## Files To Edit: 
##		admin/admin_ranks.php
##		admin/admin_smilies.php
##		admin/admin_styles.php
##		admin/admin_words.php
##		common.php
##		includes/functions.php
##		includes/functions_post.php
##		includes/sessions.php
##		includes/usercp_avatar.php
##		includes/usercp_confirm.php
##		includes/usercp_register.php
##		login.php
##		privmsg.php
##		profile.php
##		search.php
##		viewtopic.php
]竹貓星球正體中文版
已經正式發佈
http://www.phpbb-tw.net/phpbb/viewtopic.php?t=44770

發表於 : 2006-06-08 07:35
jwxinst
phpBB 2.0.20 升級至 phpBB 2.0.21 代碼變更

以下是把 phpBB 2.0.20 至 phpBB 2.0.21 的程式碼修改部分寫成外掛的方式。這對於已經安裝了多種外掛的討論版應該是一個比較好的升級方式。修改以下不同之處當然會比重新安裝所有外掛來的簡單。

當你看到 '之後,加上'-語法, 代碼必須加在 '尋找'-語法找的的最後一行的下面.
當你看到 '之前,加上'-語法, 代碼必須加在 '尋找'-語法找到的最上一行的上面.
當你看到 '取代為'-語法, 在 '尋找'-語法找到的代碼必須完全的取代成 '取代為'-語法中的代碼.
(轉貼自DL)

當你執行完以下的修正後,你必須上傳 install/update_to_latest.php 檔案到你的主機上的 phpBB 目錄下,然後在執行它後刪除。
如果對於執行更新資料庫不了解, 請參考這篇
http://www.phpbb-tw.net/phpbb/viewtopic ... 120#238120

代碼: 選擇全部

## Installation Level: Easy
## Installation Time: 45 Minutes 
## Files To Edit: 
##		admin/admin_ranks.php
##		admin/admin_smilies.php
##		admin/admin_styles.php
##		admin/admin_words.php
##		common.php
##		includes/functions.php
##		includes/functions_post.php
##		includes/sessions.php
##		includes/usercp_avatar.php
##		includes/usercp_confirm.php
##		includes/usercp_register.php
##		login.php
##		privmsg.php
##		profile.php
##		search.php
##		viewtopic.php
##
## Included Files: install/update_to_latest.php
  • admin/admin_ranks.php

    尋找: 約33段

    代碼: 選擇全部

    //
    $phpbb_root_path = "./../";
    require($phpbb_root_path . 'extension.inc');
    之後, 加上

    代碼: 選擇全部

    $cancel = ( isset($HTTP_POST_VARS['cancel']) ) ? true : false;
    $no_page_header = $cancel;

    尋找: 約39段

    代碼: 選擇全部

    require('./pagestart.' . $phpEx);

    之後, 加上

    代碼: 選擇全部

    if ($cancel)
    {
    	redirect('admin/' . append_sid("admin_ranks.$phpEx", true));
    }
    
    
  • admin/admin_smilies.php

    尋找: 約50段

    代碼: 選擇全部

    $phpbb_root_path = "./../";
    require($phpbb_root_path . 'extension.inc');

    之後, 加上

    代碼: 選擇全部

    $cancel = ( isset($HTTP_POST_VARS['cancel']) ) ? true : false;
    $no_page_header = $cancel;


    尋找: 約55段

    代碼: 選擇全部

    require('./pagestart.' . $phpEx);

    之後, 加上

    代碼: 選擇全部

    if ($cancel)
    {
    	redirect('admin/' . append_sid("admin_smilies.$phpEx", true));
    }
  • admin/admin_styles.php


    尋找: 約838段

    代碼: 選擇全部

    			$template->set_filenames(array(
    				  "confirm" => "confirm_body.tpl")
    			);
    取代為

    代碼: 選擇全部

    			$template->set_filenames(array(
    				  "confirm" => "admin/confirm_body.tpl")
    			);
  • admin/admin_words.php

    尋找: 約35段

    代碼: 選擇全部

    $phpbb_root_path = "./../";
    require($phpbb_root_path . 'extension.inc');
    之後, 加上

    代碼: 選擇全部

    $cancel = ( isset($HTTP_POST_VARS['cancel']) ) ? true : false;
    $no_page_header = $cancel;


    尋找: 約40段

    代碼: 選擇全部

    require('./pagestart.' . $phpEx);

    之後, 加上

    代碼: 選擇全部

    if ($cancel)
    {
    	redirect('admin/' . append_sid("admin_words.$phpEx", true));
    }
  • common.php


    尋找: 約80段

    代碼: 選擇全部

    		if (!in_array($var, $not_unset))
    		{
    			unset($$var);
    		}
    取代為

    代碼: 選擇全部

    		if (in_array($var, $not_unset))
    		{
    			die('Hacking attempt!');
    		}
    		unset($$var);
  • includes/functions.php


    尋找: 約171段

    代碼: 選擇全部

    	return substr($val, 16);
    取代為

    代碼: 選擇全部

    	return substr($val, 4, 16);

    尋找: 約307段

    代碼: 選擇全部

    	global $template, $lang, $phpEx, $phpbb_root_path;
    	global $nav_links;


    取代為

    代碼: 選擇全部

    	global $template, $lang, $phpEx, $phpbb_root_path, $db;
    	global $nav_links;


    尋找: 約314段

    代碼: 選擇全部

    			$board_config['default_lang'] = $userdata['user_lang'];

    取代為

    代碼: 選擇全部

    			$default_lang = phpbb_ltrim(basename(phpbb_rtrim($userdata['user_lang'])), "'");


    尋找: 約327段

    代碼: 選擇全部

    	if ( !file_exists(@phpbb_realpath($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_main.'.$phpEx)) )
    	{
    		$board_config['default_lang'] = 'english';
    	}
    取代為

    代碼: 選擇全部

    	else
    	{
    		$default_lang = phpbb_ltrim(basename(phpbb_rtrim($board_config['default_lang'])), "'");
    	}
    
    	if ( !file_exists(@phpbb_realpath($phpbb_root_path . 'language/lang_' . $default_lang . '/lang_main.'.$phpEx)) )
    	{
    		if ( $userdata['user_id'] != ANONYMOUS )
    		{
    			// For logged in users, try the board default language next
    			$default_lang = phpbb_ltrim(basename(phpbb_rtrim($board_config['default_lang'])), "'");
    		}
    		else
    		{
    			// For guests it means the default language is not present, try english
    			// This is a long shot since it means serious errors in the setup to reach here,
    			// but english is part of a new install so it's worth us trying
    			$default_lang = 'english';
    		}
    
    		if ( !file_exists(@phpbb_realpath($phpbb_root_path . 'language/lang_' . $default_lang . '/lang_main.'.$phpEx)) )
    		{
    			message_die(CRITICAL_ERROR, 'Could not locate valid language pack');
    		}
    	}
    
    	// If we've had to change the value in any way then let's write it back to the database
    	// before we go any further since it means there is something wrong with it
    	if ( $userdata['user_id'] != ANONYMOUS && $userdata['user_lang'] !== $default_lang )
    	{
    		$sql = 'UPDATE ' . USERS_TABLE . "
    			SET user_lang = '" . $default_lang . "'
    			WHERE user_lang = '" . $userdata['user_lang'] . "'";
    
    		if ( !($result = $db->sql_query($sql)) )
    		{
    			message_die(CRITICAL_ERROR, 'Could not update user language info');
    		}
    
    		$board_config['default_lang'] = $default_lang;
    		$userdata['user_lang'] = $default_lang;
    	}
    	elseif ( $board_config['default_lang'] !== $default_lang )
    	{
    		$sql = 'UPDATE ' . CONFIG_TABLE . "
    			SET config_value = '" . $default_lang . "'
    			WHERE config_name = 'default_lang'";
    
    		if ( !($result = $db->sql_query($sql)) )
    		{
    			message_die(CRITICAL_ERROR, 'Could not update user language info');
    		}
    
    		$board_config['default_lang'] = $default_lang;
    	}


    尋找: 約411段

    代碼: 選擇全部

    $sql = "SELECT *
    		FROM " . THEMES_TABLE . "
    		WHERE themes_id = $style";
    取代為

    代碼: 選擇全部

    	$sql = 'SELECT *
    		FROM ' . THEMES_TABLE . '
    		WHERE themes_id = ' . (int) $style;

    尋找: 約458段

    代碼: 選擇全部

    				WHERE themes_id = ' . $board_config['default_style'];

    取代為

    代碼: 選擇全部

    				WHERE themes_id = ' . (int) $board_config['default_style'];


    尋找: 約469段

    代碼: 選擇全部

    					SET user_style = ' . $board_config['default_style'] . "

    取代為

    代碼: 選擇全部

    					SET user_style = ' . (int) $board_config['default_style'] . "
  • includes/functions_post.php

    尋找: 約59段

    代碼: 選擇全部

    			$message .= htmlspecialchars($part) . clean_html($tag);
    		}
    
    		$message = addslashes($message);
    取代為

    代碼: 選擇全部

    			$message .= preg_replace($html_entities_match, $html_entities_replace, $part) . clean_html($tag);
    		}
    
    		$message = addslashes($message);
    		$message = str_replace('"', '\"', $message);

    尋找: 約411段

    代碼: 選擇全部

    	$sql = "UPDATE " . FORUMS_TABLE . " SET 
    		$forum_update_sql 
    		WHERE forum_id = $forum_id";
    	if (!$db->sql_query($sql))
    	{
    		message_die(GENERAL_ERROR, 'Error in posting', '', __LINE__, __FILE__, $sql);
    	}
    取代為

    代碼: 選擇全部

    	if ($mode != 'poll_delete')
    	{
    		$sql = "UPDATE " . FORUMS_TABLE . " SET 
    			$forum_update_sql 
    			WHERE forum_id = $forum_id";
    		if (!$db->sql_query($sql))
    		{
    			message_die(GENERAL_ERROR, 'Error in posting', '', __LINE__, __FILE__, $sql);
    		}
    	}
    
  • includes/sessions.php

    尋找: 約365段

    代碼: 選擇全部

    					setcookie($cookiename . '_data', serialize($sessiondata), $current_time + 31536000, $cookiepath, $cookiedomain, $cookiesecure);
    					setcookie($cookiename . '_sid', $session_id, 0, $cookiepath, $cookiedomain, $cookiesecure);
    				}
    

    之後, 加上

    代碼: 選擇全部

    				// Add the session_key to the userdata array if it is set
    				if ( isset($sessiondata['autologinid']) && $sessiondata['autologinid'] != '' )
    				{
    					$userdata['session_key'] = $sessiondata['autologinid'];
    				}

    尋找: 約505段

    代碼: 選擇全部

    function session_reset_keys($user_id, $user_ip)
    {
    	global $db, $userdata;
    取代為

    代碼: 選擇全部

    function session_reset_keys($user_id, $user_ip)
    {
    	global $db, $userdata, $board_config;

    尋找: 約544段

    代碼: 選擇全部

    		// And now rebuild the cookie
    		$sessiondata['userid'] = $user_id;
    		$sessiondata['autologinid'] = $autologin_id;
    取代為

    代碼: 選擇全部

    		// And now rebuild the cookie
    		$sessiondata['userid'] = $user_id;
    		$sessiondata['autologinid'] = $auto_login_key;
  • includes/usercp_avatar.php

    尋找: 約120段

    代碼: 選擇全部

    	if ( $avatar_mode == 'remote' && preg_match('/^(http:\/\/)?([\w\-\.]+)\:?([0-9]*)\/(.*)$/', $avatar_filename, $url_ary) )

    取代為

    代碼: 選擇全部

    	if ( $avatar_mode == 'remote' && preg_match('/^(http:\/\/)?([\w\-\.]+)\:?([0-9]*)\/([^ \?&=\#\"\n\r\t<]*?(\.(jpg|jpeg|gif|png)))$/', $avatar_filename, $url_ary) )
  • includes/usercp_confirm.php

    尋找: 約64段

    代碼: 選擇全部

    // If we can we will generate a single filtered png else we will have to simply
    // output six seperate original pngs ... first way is preferable!
    if (@extension_loaded('zlib'))
    {
    	$_png = define_filtered_pngs();
    
    	$total_width = 320;
    	$total_height = 50;
    	$img_height = 40;
    	$img_width = 0;
    	$l = 0;
    
    	list($usec, $sec) = explode(' ', microtime()); 
    	mt_srand($sec * $usec); 
    
    	$char_widths = array();
    	for ($i = 0; $i < strlen($code); $i++)
    	{
    		$char = $code{$i};
    
    		$width = mt_rand(0, 4);
    		$char_widths[] = $width;
    		$img_width += $_png[$char]['width'] - $width;
    	}
    
    	$offset_x = mt_rand(0, $total_width - $img_width);
    	$offset_y = mt_rand(0, $total_height - $img_height);
    
    	$image = '';
    	$hold_chars = array();
    	for ($i = 0; $i < $total_height; $i++)
    	{
    		$image .= chr(0);
    
    		if ($i > $offset_y && $i < $offset_y + $img_height)
    		{
    			$j = 0;
    
    			for ($k = 0; $k < $offset_x; $k++)
    			{
    				$image .= chr(mt_rand(140, 255));
    			}
    
    			for ($k = 0; $k < strlen($code); $k++)
    			{
    				$char = $code{$k};
    
    				if (empty($hold_chars[$char]))
    				{
    					$hold_chars[$char] = explode("\n", chunk_split(base64_decode($_png[$char]['data']), $_png[$char]['width'] + 1, "\n"));
    				}
    				$image .= randomise(substr($hold_chars[$char][$l], 1), $char_widths[$j]);
    				$j++;
    			}
    
    			for ($k = $offset_x + $img_width; $k < $total_width; $k++)
    			{
    				$image .= chr(mt_rand(140, 255));
    			}
    
    			$l++;
    		}
    		else
    		{
    			for ($k = 0; $k < $total_width; $k++)
    			{
    				$image .= chr(mt_rand(140, 255));
    			}
    		}
    
    	}
    	unset($hold);
    
    	$image = create_png(gzcompress($image), $total_width, $total_height);
    
    	// Output image
    	header('Content-Type: image/png');
    	header('Cache-control: no-cache, no-store');
    	echo $image;
    
    	unset($image);
    	unset($_png);
    	exit;
    
    }
    else
    {
    	$_png = define_raw_pngs();
    
    	$c = intval($HTTP_GET_VARS['c']);
    	$char = substr($code, $c - 1, 1);
    	
    	header('Content-Type: image/png');
    	header('Cache-control: no-cache, no-store');
    	echo base64_decode($_png[$char]);
    
    	unset($_png);
    	exit;
    }
    
    exit;

    取代為

    代碼: 選擇全部

    // We can we will generate a single filtered png 
    // Thanks to DavidMJ for emulating zlib within the code :)
    $_png = define_filtered_pngs();
    
    $total_width = 320;
    $total_height = 50;
    $img_height = 40;
    $img_width = 0;
    $l = 0;
    
    list($usec, $sec) = explode(' ', microtime()); 
    mt_srand($sec * $usec); 
    
    $char_widths = array();
    for ($i = 0; $i < strlen($code); $i++)
    {
    	$char = $code{$i};
    
    	$width = mt_rand(0, 4);
    	$char_widths[] = $width;
    	$img_width += $_png[$char]['width'] - $width;
    }
    
    $offset_x = mt_rand(0, $total_width - $img_width);
    $offset_y = mt_rand(0, $total_height - $img_height);
    
    $image = '';
    $hold_chars = array();
    for ($i = 0; $i < $total_height; $i++)
    {
    	$image .= chr(0);
    
    	if ($i > $offset_y && $i < $offset_y + $img_height)
    	{
    		$j = 0;
    
    		for ($k = 0; $k < $offset_x; $k++)
    		{
    			$image .= chr(mt_rand(140, 255));
    		}
    
    		for ($k = 0; $k < strlen($code); $k++)
    		{
    			$char = $code{$k};
    
    			if (empty($hold_chars[$char]))
    			{
    				$hold_chars[$char] = explode("\n", chunk_split(base64_decode($_png[$char]['data']), $_png[$char]['width'] + 1, "\n"));
    			}
    			$image .= randomise(substr($hold_chars[$char][$l], 1), $char_widths[$j]);
    			$j++;
    		}
    
    		for ($k = $offset_x + $img_width; $k < $total_width; $k++)
    		{
    			$image .= chr(mt_rand(140, 255));
    		}
    
    		$l++;
    	}
    	else
    	{
    		for ($k = 0; $k < $total_width; $k++)
    		{
    			$image .= chr(mt_rand(140, 255));
    		}
    	}
    
    }
    unset($hold);
    
    $image = create_png($image, $total_width, $total_height);
    
    // Output image
    header('Content-Type: image/png');
    header('Cache-control: no-cache, no-store');
    echo $image;
    
    unset($image);
    unset($_png);
    exit;


    尋找: 約198段

    代碼: 選擇全部

    function create_png($gzimage, $width, $height)
    取代為

    代碼: 選擇全部

    function create_png($raw_image, $width, $height)
    尋找: 約202段

    代碼: 選擇全部

    	// IDAT
    	$image .= png_chunk(strlen($gzimage), 'IDAT', $gzimage);

    取代為

    代碼: 選擇全部

    	if (@extension_loaded('zlib'))
    	{
    		$raw_image = gzcompress($raw_image);
    		$length = strlen($raw_image);
    	}
    	else
    	{
    		// The total length of this image, uncompressed, is just a calculation of pixels
    		$length = ($width + 1) * $height;
    
    		// Adler-32 hash generation
    		// Optimized Adler-32 loop ported from the GNU Classpath project
    		$temp_length = $length;
    		$s1 = 1;
    		$s2 = $index = 0;
    
    		while ($temp_length > 0)
    		{
    			// We can defer the modulo operation:
    			// s1 maximally grows from 65521 to 65521 + 255 * 3800
    			// s2 maximally grows by 3800 * median(s1) = 2090079800 < 2^31
    			$substract_value = ($temp_length < 3800) ? $temp_length : 3800;
    			$temp_length -= $substract_value;
    
    			while (--$substract_value >= 0)
    			{
    				$s1 += ord($raw_image[$index]);
    				$s2 += $s1;
    
    				$index++;
    			}
    
    			$s1 %= 65521;
    			$s2 %= 65521;
    		}
    		$adler_hash = pack('N', ($s2 << 16) | $s1);
    
    		// This is the same thing as gzcompress($raw_image, 0) but does not need zlib
    		$raw_image = pack('C3v2', 0x78, 0x01, 0x01, $length, ~$length) . $raw_image . $adler_hash;
    
    		// The Zlib header + Adler hash make us add on 11
    		$length += 11;
    	}
    
    	// IDAT
    	$image .= png_chunk($length, 'IDAT', $raw_image);
  • includes/usercp_register.php

    尋找: 約989段

    代碼: 選擇全部

    		$code = strtoupper(str_replace('0', 'o', substr($code, 6)));

    取代為

    代碼: 選擇全部

    		$code = substr(str_replace('0', 'Z', strtoupper(base_convert($code, 16, 35))), 2, 6);

    尋找: 約1002段

    代碼: 選擇全部

    		$confirm_image = (@extension_loaded('zlib')) ? '<img src="' . append_sid("profile.$phpEx?mode=confirm&id=$confirm_id") . '" alt="" title="" />' : '<img src="' . append_sid("profile.$phpEx?mode=confirm&id=$confirm_id&c=1") . '" alt="" title="" /><img src="' . append_sid("profile.$phpEx?mode=confirm&id=$confirm_id&c=2") . '" alt="" title="" /><img src="' . append_sid("profile.$phpEx?mode=confirm&id=$confirm_id&c=3") . '" alt="" title="" /><img src="' . append_sid("profile.$phpEx?mode=confirm&id=$confirm_id&c=4") . '" alt="" title="" /><img src="' . append_sid("profile.$phpEx?mode=confirm&id=$confirm_id&c=5") . '" alt="" title="" /><img src="' . append_sid("profile.$phpEx?mode=confirm&id=$confirm_id&c=6") . '" alt="" title="" />';

    取代為

    代碼: 選擇全部

    $confirm_image = '<img src="' . append_sid("profile.$phpEx?mode=confirm&id=$confirm_id") . '" alt="" title="" />';
  • login.php

    尋找: 約116段

    代碼: 選擇全部

    					$redirect = ( !empty($HTTP_POST_VARS['redirect']) ) ? str_replace('&', '&', htmlspecialchars($HTTP_POST_VARS['redirect'])) : '';
    					$redirect = str_replace('?', '&', $redirect);
    
    					if (strstr(urldecode($redirect), "\n") || strstr(urldecode($redirect), "\r"))
    					{
    						message_die(GENERAL_ERROR, 'Tried to redirect to potentially insecure url.');
    					}
    
    					$template->assign_vars(array(
    						'META' => "<meta http-equiv=\"refresh\" content=\"3;url=login.$phpEx?redirect=$redirect\">")
    					);
    
    					$message = $lang['Error_login'] . '<br /><br />' . sprintf($lang['Click_return_login'], "<a href=\"login.$phpEx?redirect=$redirect\">", '</a>') . '<br /><br />' .  sprintf($lang['Click_return_index'], '<a href="' . append_sid("index.$phpEx") . '">', '</a>');
    
    					message_die(GENERAL_MESSAGE, $message);
    				}

    取代為

    代碼: 選擇全部

    				}
    
    				$redirect = ( !empty($HTTP_POST_VARS['redirect']) ) ? str_replace('&', '&', htmlspecialchars($HTTP_POST_VARS['redirect'])) : '';
    				$redirect = str_replace('?', '&', $redirect);
    
    				if (strstr(urldecode($redirect), "\n") || strstr(urldecode($redirect), "\r"))
    				{
    					message_die(GENERAL_ERROR, 'Tried to redirect to potentially insecure url.');
    				}
    
    				$template->assign_vars(array(
    					'META' => "<meta http-equiv=\"refresh\" content=\"3;url=login.$phpEx?redirect=$redirect\">")
    				);
    
    				$message = $lang['Error_login'] . '<br /><br />' . sprintf($lang['Click_return_login'], "<a href=\"login.$phpEx?redirect=$redirect\">", '</a>') . '<br /><br />' .  sprintf($lang['Click_return_index'], '<a href="' . append_sid("index.$phpEx") . '">', '</a>');
    
    				message_die(GENERAL_MESSAGE, $message);
  • privmsg.php

    尋找: 約1510段

    代碼: 選擇全部

    			$orig_word = $replacement_word = array();
    			obtain_word_list($orig_word, $replace_word);

    取代為

    代碼: 選擇全部

    			$orig_word = $replacement_word = array();
    			obtain_word_list($orig_word, $replacement_word);
  • profile.php


    尋找: 約60段

    代碼: 選擇全部

    	return ( $hash ) ? md5($rand_str) : substr($rand_str, 8);

    取代為

    代碼: 選擇全部

    	return ( $hash ) ? md5($rand_str) : substr($rand_str, 0, 8);
  • search.php

    尋找: 約216段

    代碼: 選擇全部

    				if( ( strpos($search_author, '%') !== false ) && ( strlen(str_replace('%', '', $search_author)) < 3 ) )
    取代為

    代碼: 選擇全部

    				if( ( strpos($search_author, '%') !== false ) && ( strlen(str_replace('%', '', $search_author)) < $board_config['search_min_chars'] ) )


    尋找: 約288段

    代碼: 選擇全部

    				if (preg_match('#^[\*%]+$#', trim($split_search[$i])) || preg_match('#^[^\*]{1,2}$#', str_replace(array('*', '%'), '', trim($split_search[$i]))))

    取代為

    代碼: 選擇全部

    				if ( strlen(str_replace(array('*', '%'), '', trim($split_search[$i]))) < $board_config['search_min_chars'] )


    尋找: 約439段

    代碼: 選擇全部

    			if( ( strpos($search_author, '%') !== false ) && ( strlen(str_replace('%', '', $search_author)) < 3 ) )

    取代為

    代碼: 選擇全部

    			if( ( strpos($search_author, '%') !== false ) && ( strlen(str_replace('%', '', $search_author)) < $board_config['search_min_chars'] ) )
  • viewtopic.php

    尋找: 約1101段

    代碼: 選擇全部

    		// This was shamelessly 'borrowed' from volker at multiartstudio dot de
    		// via php.net's annotated manual
    		$message = str_replace('\"', '"', substr(@preg_replace('#(\>(((?>([^><]+|(?R)))*)\<))#se', "@preg_replace('#\b(" . str_replace('\\', '\\\\', addslashes($highlight_match)) . ")\b#i', '<span style=\"color:#" . $theme['fontcolor3'] . "\"><b>\\\\1</b></span>', '\\0')", '>' . $message . '<'), 1, -1));
    取代為

    代碼: 選擇全部

    		// This has been back-ported from 3.0 CVS
    		$message = preg_replace('#(?!<.*)(?<!\w)(' . $highlight_match . ')(?!\w|[^<>]*>)#i', '<b style="color:#'.$theme['fontcolor3'].'">\1</b>', $message);

發表於 : 2006-06-08 08:08
動機不明
這次真的要替你拍拍手了 :)

圖檔

發表於 : 2006-06-08 09:58
computer315
裝了以後引言功能又失效...Orz
只好先參考這篇頂著用:http://phpbb-tw.net/phpbb/viewtopic.php?p=233991#233991

發表於 : 2006-06-08 12:01
CPC309001
花了兩小時, 還好不是太難.

●架設主機作業系統:Linux
●上網方式:WWW
●安裝的程式:php + MSSQL Server 2000
●phpBB2 版本:phpBB 2.0.21
●網站:http://www.waterhorse.com.tw/
:-D

CPC309001
06/08/2006

發表於 : 2006-06-08 13:32
Mac
改了標題並且置頂

網頁版: http://macphpbbmod.sourceforge.net/word ... page_id=55

~Mac

發表於 : 2006-06-08 22:22
chenyilun
●架設主機作業系統:WindowsXp Pro
●快速架站程式:apache2_2.0.50-win32-x86-no_ssl
●免費空間連結: http://ssomron.dyndns.org免費網域
●您的上網方式:中華電信ADSL。
●您安裝的程式:Apache 2.0.50 + php 5.0.1+ MySql 4.0.18。
●您的 phpBB2 版本:phpBB 2.0.20 big5

太棒了,我用easymod(codechanges)一下子就ok,然後/install/update_to_latest.php執行,前後不用2分鐘搞定.

發表於 : 2006-06-09 08:16
Mac
http://www.phpbb.com/phpBB/viewtopic.ph ... 27#2171327

如果你的討論版安裝多個語系並且使用 phpBB 2.0.21,你的討論版可能會出現語系轉換的問題,官方已經提供修正方式,請依照以下辦法做出修改

打開
includes/functions.php

尋找 (約行 371)

代碼: 選擇全部

      $board_config['default_lang'] = $default_lang; 
      $userdata['user_lang'] = $default_lang; 
取代為

代碼: 選擇全部

      $userdata['user_lang'] = $default_lang; 

尋找 (約行 374)

代碼: 選擇全部

   elseif ( $board_config['default_lang'] !== $default_lang ) 
取代為

代碼: 選擇全部

   elseif ( $userdata['user_id'] === ANONYMOUS && $board_config['default_lang'] !== $default_lang ) 

尋找 (約行 384)

代碼: 選擇全部

      $board_config['default_lang'] = $default_lang; 
   } 
取代為

代碼: 選擇全部

   } 

   $board_config['default_lang'] = $default_lang; 

~Mac

發表於 : 2006-06-09 13:57
hadyhadyp6d
jwxinst 寫:哈哈,我真是粗心大意, 忘了提醒各位本次升級並不需要改用任何的語系



因此, 如果是各位是剛來的新手
不需要等竹貓發佈正式版本,只要下載2.0.21的 完整包,再下載竹貓的2.0.20中文語系便可!


phpBB2.0.21完整包
http://www.phpbb.com/files/releases/phpBB-2.0.21.zip

正體中文語系 2.0.20&2.0.21
  • UTF-8版本 點擊我下載
            ◎ 使用UTF-8的新手請下載後再解壓縮 ,將裡面的language\lang_chinese_traditional_taiwan 剪下,放在 2.0.21phpBB2\language\裡面便可
  • BIG-5版本 點擊我下載
            ◎ 使用BIG-5的新手請下載後再解壓縮 ,將language\lang_chinese_traditional_taiwan 放在 2.0.21phpBB2\language\裡面即可
這個方法只是讓那些不想等待竹貓發佈的朋友們先試用
但是我個人估計這次竹貓發佈只需要一天吧? 因為語系也沒有改....
hi~我是一個新手來的~請問一下~怎樣上傳新的版本上去呀?求求回答~@.@~

發表於 : 2006-06-09 15:28
chiouss
hadyhadyp6d 寫:hi~我是一個新手來的~請問一下~怎樣上傳新的版本上去呀?求求回答~@.@~
用 ftp...
--
你舊的版本怎麼傳上去新的版本就是怎麼傳上去 o_O

發表於 : 2006-06-09 17:54
brentsu
說不定他根本還沒開始架... :mrgreen:
這次 2.0.21 比 2.0.20 接近很多,讓人懷疑是不是 2.0.22 很快就會發表了... 我已經升級到手軟了說~ 嗚~~

啥 EasyMOD?我知道,只是還要裝 EasyMOD... 想起來一樣手軟~~ Orz

發表於 : 2006-06-09 20:08
Mac
brentsu 寫:啥 EasyMOD?我知道,只是還要裝 EasyMOD... 想起來一樣手軟~~ Orz
如果你真的有玩過,就會知道安裝 EM 有多麼的簡單了 ;-)

~Mac

發表於 : 2006-06-09 22:45
hadyhadyp6d
chiouss 寫:
hadyhadyp6d 寫:hi~我是一個新手來的~請問一下~怎樣上傳新的版本上去呀?求求回答~@.@~
用 ftp...
--
你舊的版本怎麼傳上去新的版本就是怎麼傳上去 o_O
我才是第一次用的~求求誰可以詳細教教我這新手呀? ;-) :?:

發表於 : 2006-06-10 00:55
Meowmeow
phpBB:2.0.20 -> 2.0.21
網站:http://catcollection.org

一切正常!(不是我開的,所以其它規格我不知道)