1 頁 (共 1 頁)

[問題] MX_Portal index編輯問題

發表於 : 2005-11-23 03:34
ccw058
問題外掛: MX_portal 2.7.6
參考連結: http://www.mx-system.com/
使用版本: phpBB 2.0.18
網站位置: http://www.mylovelypet.net/
狀況描述:

在首頁 http://www.mylovelypet.net/ 中的 "LOG IN" 跟 "WHO IS ONLINE" 還有最上方的 "Portal Home Forum Profile FAQ Search Memberlist Private Messages Log in Register" 都是英文, 沒辦法像 http://www.mylovelypet.net/phpBB2/index.php 中都是中文, 我猜應該是 MX_portal index.php 的問題, 可是不知道從何改起, 還請大家幫忙看一下, 或者有其他的解決辦法呢?

以下是 MX_Portal/index.php 的內容
define('IN_PORTAL', 1);

$mx_root_path = './';

include_once($mx_root_path . 'extension.inc');
include_once($mx_root_path . 'common.'.$phpEx);

//
// Start session management
//
$userdata = session_pagestart($user_ip, PAGE_INDEX);
mx_init_userprefs($userdata);

//
//
//
$cache_dir = $mx_root_path . 'cache/';

if ( $HTTP_SESSION_VARS['cache_read'] != TRUE && file_exists($cache_dir . 'block_config.xml') )
{
include_once($mx_root_path . "cache/mx_cache.php"); // file of easy_parser class
read_cache_config();
}

//
// End session management
//

$view_page = FALSE;

//
// Load default header
//

$page_id = $mx_request_vars->request('page', MX_TYPE_INT, 1);

$page_row = get_info(PAGE_TABLE, "page_id", $page_id);
$page_title .= $page_row['page_name'];

include($mx_root_path . 'includes/page_header.'.$phpEx);

$is_auth_ary = array();
$is_auth_ary = page_auth(AUTH_VIEW, $userdata, $page_row['auth_view'], $page_row['auth_view_group'] );

if ( ! $is_auth_ary['auth_view'] )
{
$message = empty($lang['Page_Not_Authorised']) ? "Sorry, but you don't have privilege to access this page." : $lang['Page_Not_Authorised'];
mx_message_die(GENERAL_MESSAGE, $message, "", __LINE__, __FILE__, "");
}

if ( !empty($HTTP_SESSION_VARS['page_column_' . $page_id]) )
{
$column_rows = $HTTP_SESSION_VARS['page_column_' . $page_id];
$total_column = count($HTTP_SESSION_VARS['page_column_' . $page_id]);
}
else
{
$sql = "SELECT col.column_id, col.column_title, col.column_order, col.column_size
FROM " . COLUMN_TABLE . " col
WHERE page_id = $page_id
ORDER BY column_order";
if( !$q_column = $db->sql_query($sql) )
{
mx_message_die(GENERAL_ERROR, "Could not query column list", "", __LINE__, __FILE__, $sql);
}

if( $total_column = $db->sql_numrows($q_column) )
{
$column_rows = $db->sql_fetchrowset($q_column);
}
$HTTP_SESSION_VARS['page_column_' . $page_id] = $column_rows;
}

if ( !empty($HTTP_SESSION_VARS['page_block_' . $page_id]) )
{
$block_rows = $HTTP_SESSION_VARS['page_block_' . $page_id];
$total_block = count( $HTTP_SESSION_VARS['page_block_' . $page_id] );
}
else
{
$sql = "SELECT blk.block_id, blk.auth_view_group, blk.auth_edit_group, bct.column_id, module_path, function_file, auth_view
FROM " . COLUMN_BLOCK_TABLE . " bct,
" . BLOCK_TABLE . " blk,
" . FUNCTION_TABLE . " fnc,
" . MODULE_TABLE . " modu
WHERE blk.function_id = fnc.function_id
AND blk.block_id = bct.block_id
AND fnc.module_id = modu.module_id
ORDER BY column_id, block_order";
// AND bct.column_id = " . $column_rows[$column]['column_id'] . "
if( !$q_modules = $db->sql_query($sql) )
{
mx_message_die(GENERAL_ERROR, "Could not query modules information", "", __LINE__, __FILE__, $sql);
}

if( $total_block = $db->sql_numrows($q_modules) )
{
$block_rows = $db->sql_fetchrowset($q_modules);
$HTTP_SESSION_VARS['page_block_' . $page_id] = $block_rows;
}
}

ECHO '<table border="0" cellspacing="4" cellpadding="0" width="100%"><tr valign="top">';
for($column = 0; $column < $total_column; $column++)
{
$block_size = $column_rows[$column]['column_size'];

ECHO '<td width="' . $block_size . '" >';

for($block = 0; $block < $total_block; $block++)
{
if ( $column_rows[$column]['column_id'] == $block_rows[$block]['column_id'] )
{
//
// Find which blocks are visible for this user
//
$block_id = $block_rows[$block]['block_id'];
$block_row = get_info(BLOCK_TABLE, "block_id", $block_id);

$is_auth_ary = array();
$is_auth_ary = block_auth(AUTH_VIEW, $block_id, $userdata, $block_rows[$block], $block_row['auth_view_group']);

if ( $is_auth_ary['auth_view'] )
{
$template = new Template($template->root, $board_config, $db);

$module_root_path = $block_rows[$block]['module_path'];
$block_file = $block_rows[$block]['function_file'];

include( $module_root_path . $block_file );
}
}

} // for ... modules

ECHO '</td>';

} // for ... column

ECHO '</tr></table>';

//
//
//
include($mx_root_path . 'includes/page_tail.'.$phpEx);
exit;

發表於 : 2005-11-23 12:59
依夢兒
MX_portal 有自己的語系檔吧?如果有的話,去改語系檔就可以了。

發表於 : 2005-11-23 23:13
ccw058
感謝 依夢兒 指導方向
現在已經完全OK!
http://www.mylovelypet.net/

因為 MX_portal 會去抓預設的phpBB2 / language / lang_english / 的檔案
所以即使 phpbb後台設定已經把語系改為中文, 最後顯示出來的結果還是英文介面\r

一個簡單的解決辦法就是把
/phpBB2/language/lang_english/lang_main.php
用\r
language/lang_chinese_traditional_taiwan/lang_main.php
覆蓋掉就OK了!