第 1 頁 (共 1 頁)
[問題] forum何以解讀{L_HOME}或{L_FAQ}?
發表於 : 2005-01-28 17:56
由 JackyNgai
如果我要加{xxxx}之類的語言, 要如何加和要如何做呢? 在那個file中. 3Q
何如我在portal.tpl 中加一句{xxxx}, 可以令到forum解讀
發表於 : 2005-01-28 17:59
由 [ffs]hunej
哩低攻瞎?
發表於 : 2005-01-28 18:10
由 tom82612
要改 portal.php
發表於 : 2005-01-28 18:17
由 神川小羽
有點難理解,你要不要研究一下這個
這是一個現成的樣版類別\r
TemplatePower
發表於 : 2005-01-28 18:34
由 StickyKid
[ffs]hunej 寫:哩低攻瞎?

人家是香港人你跟他講閩南話啊
發表於 : 2005-01-29 14:32
由 fankun
可以直接在portal.tpl使用html語法來顯示文字
另一個是在protal.php裡面關於模板設定位置增加一個變量,在語言包裡增加此變量代表的語言內容,然後就可以在portal.tpl裡多次調用
第一個方法可能會遇到瀏覽器編碼問題
發表於 : 2005-01-29 19:49
由 baboo
給你看一個例子好了... 比較容易懂...
範例: (index.php)
代碼: 選擇全部
$template->set_filenames(array(
'body' => 'index_body.tpl')
);
$template->assign_vars(array(
'TOTAL_POSTS' => sprintf($l_total_post_s, $total_posts),
'TOTAL_USERS' => sprintf($l_total_user_s, $total_users),
{..省略...}
));
則對照 index_body.tpl 裡面的 {TOTAL_POSTS}跟{TOTAL_USERS}
這樣就夠了...
不過要記得檔案開頭要有
include($phpbb_root_path . 'common.'.$phpEx);
(或 include($phpbb_root_path . 'includes/template.'.$phpEx);)