1 頁 (共 1 頁)

[問題] 主題類型by hentaibbc 3.3.1 可否自動更改語系

發表於 : 2006-08-13 10:32
zivtw
問題外掛:主題類型by hentaibbc
參考連結:http://phpbb-tw.net/phpbb/viewtopic.php?t=39648
使用版本:phpBB 2.0.21
網站位置:http://jamuze.net/
狀況描述:

我將外掛中 lang_topictypes.php 的內容翻譯成英文,然後複製到 language/lang_english 底下,並且將網站的語系改成英文,但是後台和前台的主題類型控制和還是繁體中文。

我在 admin_topictypes.php 找到這段程式碼:

代碼: 選擇全部

include($phpbb_root_path . 'language/lang_chinese_traditional_taiwan/lang_topictypes.' . $phpEx);
應該是讀取語言檔案的地方吧,路徑被固定在 lang_chinese_traditional_taiwan 了,請問有辦法自動依照會員的語系設定而更改嗎?謝謝。

發表於 : 2006-08-13 11:10
hentaibbc
打開
admin/admin_topictypes.php

modcp_topictypes.php

找到

代碼: 選擇全部

include($phpbb_root_path . 'language/lang_chinese_traditional_taiwan/lang_topictypes.'.$phpEx);
取代為

代碼: 選擇全部

include($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_topictypes.'.$phpEx);
這樣應該就可以了...

發表於 : 2006-08-13 11:28
zivtw
在 admin_topictypes.php 修改後已經正常顯示,但在 modcp_topictypes.php 修改後卻出現:

代碼: 選擇全部

Warning: in_array(): Wrong datatype for second argument in /home/httpd/vhosts/jamuze.net/httpdocs/modcp_topictypes.php on line 358

Warning: Cannot modify header information - headers already sent by (output started at /home/httpd/vhosts/jamuze.net/httpdocs/modcp_topictypes.php:358) in /home/httpd/vhosts/jamuze.net/httpdocs/includes/page_header.php on line 510

Warning: Cannot modify header information - headers already sent by (output started at /home/httpd/vhosts/jamuze.net/httpdocs/modcp_topictypes.php:358) in /home/httpd/vhosts/jamuze.net/httpdocs/includes/page_header.php on line 516

Warning: Cannot modify header information - headers already sent by (output started at /home/httpd/vhosts/jamuze.net/httpdocs/modcp_topictypes.php:358) in /home/httpd/vhosts/jamuze.net/httpdocs/includes/page_header.php on line 517

發表於 : 2006-08-13 14:42
hentaibbc
zivtw 寫:在 admin_topictypes.php 修改後已經正常顯示,但在 modcp_topictypes.php 修改後卻出現:

代碼: 選擇全部

Warning: in_array(): Wrong datatype for second argument in /home/httpd/vhosts/jamuze.net/httpdocs/modcp_topictypes.php on line 358

Warning: Cannot modify header information - headers already sent by (output started at /home/httpd/vhosts/jamuze.net/httpdocs/modcp_topictypes.php:358) in /home/httpd/vhosts/jamuze.net/httpdocs/includes/page_header.php on line 510

Warning: Cannot modify header information - headers already sent by (output started at /home/httpd/vhosts/jamuze.net/httpdocs/modcp_topictypes.php:358) in /home/httpd/vhosts/jamuze.net/httpdocs/includes/page_header.php on line 516

Warning: Cannot modify header information - headers already sent by (output started at /home/httpd/vhosts/jamuze.net/httpdocs/modcp_topictypes.php:358) in /home/httpd/vhosts/jamuze.net/httpdocs/includes/page_header.php on line 517
基本上應該不致於出現這個問題的說... :-?
恩~~
這個問題必須要了解$types_forum_row到底變成什麼樣子了...
不然的話...我也不知道怎麼解決... :-?

同樣的...你到主題類型的後台....選擇一個版面進去看看
是不是有同樣的問題產生...

發表於 : 2006-08-13 15:30
zivtw
錯誤訊息已經解決了...
但是 modcp_topictypes.php 的語言還是繁體中文
(論壇預設語系:繁體中文/使用者語系:English)
只有把論壇預設語系設成 English,
modcp_topictypes.php 才會變成英文。

發表於 : 2006-08-14 01:24
hentaibbc
zivtw 寫:錯誤訊息已經解決了...
但是 modcp_topictypes.php 的語言還是繁體中文
(論壇預設語系:繁體中文/使用者語系:English)
只有把論壇預設語系設成 English,
modcp_topictypes.php 才會變成英文。
那你在

代碼: 選擇全部

include($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_topictypes.'.$phpEx);
之前再加上

代碼: 選擇全部

if ( !empty($userdata['user_lang']))
{
	$board_config['default_lang'] = $userdata['user_lang'];
}

Re: [問題] 主題類型by hentaibbc 3.3.1 可否自動更改語系

發表於 : 2007-02-24 15:29
minotaur
關於這點不才的小弟我也想要有英文語系的耶
(包括lang_admin.php,lang_main.php)
請問大大們有誰能夠提供阿