- 代碼: 選擇全部
########################################################
## 外掛名稱: 主題類型分區劃 (資料庫版 by Martinet) 2.0.3 升級檔
## 外掛版本: 2.0.3 升級檔
## 外掛原作者: 炎之虛空(御津闇慈)
## 外掛強化者: 炎之虛空(御津闇慈) <http://imoml.phpbb-tw.com/>
## 外掛資料庫化 : Martinet Oaf <oafwork@hotmail.com>
##
## 外掛描述: 這個外掛可以讓管理員在控制台中指定各個討論版發表主題的主題類型 ,
## 讓會員不會在版面上使用到錯誤的主題類型
## 並且新增加"主題分類功能"
## 2005/12/29新增加預設主題功能(感謝吉川拓也建議)
## 2006/01/03新增加禁止自訂主題以及強制主題功能(感謝依夢兒跟倉木麻衣提供修改)
## 額外設定:JS視窗彈出功能
## 2006/01/04新增加對Hide subject field on reply外掛支援
##
## 升級難度: 簡單
## 升級時間: 5 分鐘
##
## 需要編輯的檔案: 2
## posting.php
## posting_body.tpl
##
## 附加的檔案: n/a
##
## 附加的圖示: n/a
##
##############################################################
## 在增加此外掛前, 請務必備份所有需要修改的檔案
##############################################################
#
#-----[ OPEN ]------------------------------------------
#
posting.php
#
#-----[ FIND ]------------------------------------------
#
//Topic type mod
if($post_info['forum_topictypes'] == '' && $board_config['budget_types'] != '')
{
$topictypes = explode(",",$board_config['budget_types']);
}else{
$topictypes = explode(",",$post_info['forum_topictypes']);
}
$ttopions = '';
foreach ($topictypes as $topictype)
{
$ttoptions .= '<option value="' . $topictype . ' ">' . $topictype . "</option>\n";
}
$template->assign_vars(array(
'L_TOPIC_TYPES_EXPLAIN' => $lang['topic_types_explain'],
'TOPIC_TYPES' => $ttoptions)
);
if(($mode == 'newtopic' && $post_info['forum_topictypes'] != '')||($mode == 'newtopic' && $board_config['budget_types'] != ''))
{
$template->assign_block_vars('switch_topictypes', array());
}
#
#-----[ REPLACE ]------------------------------------------
#
//Topic type mod
if($post_info['forum_topictypes'] == '' && $board_config['budget_types'] != '')
{
$topictypes = explode(",",$board_config['budget_types']);
}else{
$topictypes = explode(",",$post_info['forum_topictypes']);
}
$ttopions = '';
if(($mode == 'newtopic' && $post_info['forum_topictypes'] != '')||($mode == 'newtopic' && $board_config['budget_types'] != ''))
{
$ttoptions .='<select onchange="document.post.subject.focus(); document.post.subject.value = this.options[this.selectedIndex].value + document.post.subject.value;"><option selected value="">'.$lang['topic_types_explain'].'</option>';
foreach ($topictypes as $topictype)
{
$ttoptions .= '<option value="' . $topictype . ' ">' . $topictype . "</option>\n";
}
$ttoptions .='</select>';
$template->assign_vars(array(
'TOPIC_TYPES' => $ttoptions)
);
}
#
#-----[ OPEN ]------------------------------------------
#
posting_body.tpl
#
#-----[ FIND ]------------------------------------------
#
<!-- BEGIN switch_topictypes -->
<select onchange="document.post.subject.focus(); document.post.subject.value = this.options[this.selectedIndex].value + document.post.subject.value;">
<option selected value="">{L_TOPIC_TYPES_EXPLAIN}</option>
{TOPIC_TYPES}
</select>
<!-- END switch_topictypes -->
#
#-----[ REPLACE ]------------------------------------------
#
{TOPIC_TYPES}
--------------------[有使用額外設定部份]-----------------------
- 代碼: 選擇全部
########################################################
## 外掛名稱: 主題類型分區劃 (資料庫版 by Martinet) 2.0.3升級檔(有加裝額外設定)
## 外掛版本: 2.0.3升級檔(有加裝額外設定)
## 外掛原作者: 炎之虛空(御津闇慈)
## 外掛強化者: 炎之虛空(御津闇慈) <http://imoml.phpbb-tw.com/>
## 外掛資料庫化 : Martinet Oaf <oafwork@hotmail.com>
##
## 外掛描述: 這個外掛可以讓管理員在控制台中指定各個討論版發表主題的主題類型 ,
## 讓會員不會在版面上使用到錯誤的主題類型
## 並且新增加"主題分類功能"
## 2005/12/29新增加預設主題功能(感謝吉川拓也建議)
## 2006/01/03新增加禁止自訂主題以及強制主題功能(感謝依夢兒跟倉木麻衣提供修改)
## 額外設定:JS視窗彈出功能
## 2006/01/04新增加對Hide subject field on reply外掛支援
##
## 升級難度: 簡單
## 升級時間: 5 分鐘
##
## 需要編輯的檔案: 2
## posting.php
## posting_body.tpl
##
## 附加的檔案: n/a
##
## 附加的圖示: n/a
##
##############################################################
## 在增加此外掛前, 請務必備份所有需要修改的檔案
##############################################################
#
#-----[ OPEN ]------------------------------------------
#
posting.php
#
#-----[ FIND ]------------------------------------------
#
//Topic type mod
if($post_info['forum_topictypes'] == '' && $board_config['budget_types'] != '')
{
$topictypes = explode(",",$board_config['budget_types']);
}else{
$topictypes = explode(",",$post_info['forum_topictypes']);
}
$ttopions = '';
foreach ($topictypes as $topictype)
{
$ttoptions .= '<option value="' . $topictype . ' ">' . $topictype . "</option>\n";
}
$template->assign_vars(array(
'L_TOPIC_TYPES_EXPLAIN' => $lang['topic_types_explain'],
'TOPIC_TYPES' => $ttoptions)
);
if(($mode == 'newtopic' && $post_info['forum_topictypes'] != '')||($mode == 'newtopic' && $board_config['budget_types'] != ''))
{
$template->assign_block_vars('switch_topictypes', array());
}
#
#-----[ REPLACE ]------------------------------------------
#
//Topic type mod
if($post_info['forum_topictypes'] == '' && $board_config['budget_types'] != '')
{
$topictypes = explode(",",$board_config['budget_types']);
}else{
$topictypes = explode(",",$post_info['forum_topictypes']);
}
$ttopions = '';
if(($mode == 'newtopic' && $post_info['forum_topictypes'] != '')||($mode == 'newtopic' && $board_config['budget_types'] != ''))
{
$ttoptions .='<select onchange="document.post.subject.focus(); document.post.subject.value = this.options[this.selectedIndex].value + document.post.subject.value;"><option selected value="">'.$lang['topic_types_explain'].'</option>';
foreach ($topictypes as $topictype)
{
$ttoptions .= '<option value="' . $topictype . ' ">' . $topictype . "</option>\n";
}
$ttoptions .='</select>';
$template->assign_vars(array(
'TOPIC_TYPES' => $ttoptions)
);
$typeserror = $lang['Types_Error'];
}else{
$typeserror = "false";
}
#
#-----[ OPEN ]------------------------------------------
#
posting_body.tpl
#
#-----[ FIND ]------------------------------------------
#
<!-- BEGIN switch_topictypes -->
<select onchange="document.post.subject.focus(); document.post.subject.value = this.options[this.selectedIndex].value + document.post.subject.value;">
<option selected value="">{L_TOPIC_TYPES_EXPLAIN}</option>
{TOPIC_TYPES}
</select>
<!-- END switch_topictypes -->
#
#-----[ REPLACE ]------------------------------------------
#
{TOPIC_TYPES}