那個就是訊息罐頭啦
![ㄏㄏㄏ :mrgreen:](./images/smilies/icon_mrgreen.gif)
phpBB 上實作訊息罐頭功能...
=============================
外掛名稱:Message Can
外掛版本:1.0.2
外掛作者:bu <buhip@yahoo.co.jp> http://kuloo.com
外掛相容phpBB的版本:2.0.6 一定沒問題,其他的沒試過
![害羞 :oops:](./images/smilies/icon_redface.gif)
=============================
DEMO: http://kuloo.com/
![ㄏㄏㄏ :mrgreen:](./images/smilies/icon_mrgreen.gif)
==============================
一、posting.php
1.打開
代碼: 選擇全部
posting.php
代碼: 選擇全部
include($phpbb_root_path . 'includes/functions_post.'.$phpEx);
代碼: 選擇全部
include($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_msgcan.' . $phpEx);
代碼: 選擇全部
'U_VIEW_FORUM' => append_sid("viewforum.$phpEx?" . POST_FORUM_URL . "=$forum_id"))
);
代碼: 選擇全部
// MsgCan by bu Begin
if(!$a) {
$template->assign_block_vars('msgcan',array(
'Msg_Title' => $lang['MsgCan_NoMsgCan'],
'Msg_Text' => '',
));
} else {
$j=count($a);
for($i = 0; $i < count($a); $i++) {
$template->assign_block_vars('msgcan',array(
'Msg_Title' => $a[$i][0],
'Msg_Text' => $a[$i][1],
));
}}
// MsgCan by bu End
代碼: 選擇全部
'L_BBCODE_F_HELP' => $lang['bbcode_f_help'],
7.在後面加入
代碼: 選擇全部
'L_MC_HELP' => $lang['MsgCan_Desc'],
代碼: 選擇全部
'L_FONT_HUGE' => $lang['font_huge'],
代碼: 選擇全部
'L_MsgCan_DESC' => $lang['MsgCan_Text'],
1.在
代碼: 選擇全部
language/你的語系/
代碼: 選擇全部
lang_msgcan.php
代碼: 選擇全部
$a[]=array(" 8-) "," :lol: ");
![耍酷 8-)](./images/smilies/icon_cool.gif)
![哈 哈 哈 :lol:](./images/smilies/icon_lol.gif)
代碼: 選擇全部
8-) 是這個訊息的名稱\r
:lol: 是這個訊息的內容
1.開
代碼: 選擇全部
lang_main.php
代碼: 選擇全部
//
// That's all Folks!
// -------------------------------------------------
代碼: 選擇全部
$lang['MsgCan_NoMsgCan']='沒有訊息';
$lang['MsgCan_Text']='訊息罐頭';
$lang['MsgCan_Desc']="常用話都在裡面喔";
1.開
代碼: 選擇全部
posting_body.tpl
代碼: 選擇全部
f_help = "{L_BBCODE_F_HELP}";
代碼: 選擇全部
mc_help = "{L_MC_HELP}"
代碼: 選擇全部
{L_FONT_SIZE}:<select name="addbbcode20" onChange="bbfontstyle('[size=' + this.form.addbbcode20.options[this.form.addbbcode20.selectedIndex].value + ']', '[/size]')" onMouseOver="helpline('f')">
<option value="7" class="genmed">{L_FONT_TINY}</option>
<option value="9" class="genmed">{L_FONT_SMALL}</option>
<option value="12" selected class="genmed">{L_FONT_NORMAL}</option>
<option value="18" class="genmed">{L_FONT_LARGE}</option>
<option value="24" class="genmed">{L_FONT_HUGE}</option>
</select>
代碼: 選擇全部
{L_MsgCan_DESC}:<select name="addbbcode22" onChange="bbfontstyle('[color%=#00aaff]' + this.form.addbbcode22.options[this.form.addbbcode22.selectedIndex].value + '[/color]', '');this.selectedIndex=0;" onMouseOver="helpline('mc')">
<<option value="" class="genmed">預設值</option>
<!-- BEGIN msgcan -->
<option value="{msgcan.Msg_Text}" class="genmed">{msgcan.Msg_Title}</option>
<!-- END msgcan -->
</select>
代碼: 選擇全部
bbfontstyle('[color%=#00aaff]' + this.form.addbbcode22.options[this.form.addbbcode22.selectedIndex].value + '[/color%]', '');this.selectedIndex=0;"
代碼: 選擇全部
color%
代碼: 選擇全部
color
==================================
Message Can Mod by bu 2003.