ซึ่งได้ทำการสร้าง module เพิ่มเข้ามาในส่วนของระบบ แล้วแต่โดยปกติ ก้จะขึ้นไปที่แถบเมนูได้เลย เมื่อเราทำการ กดที่ ทำให้ใช้ได้
แต่ในส่วนที่ผมนั้น แสดงแค่ในส่วนของระบบ แต่ไม่แสดงในส่วนของแถบเมนู ดังรูป
จึงอยากทราบว่าจะแก้ไข้ได้อย่างไงบางครับ
โดยโคดที่ใช้นั้นมีส่วนส่วนคื่อ ไฟล์ m_mtb_news_info.php
โค้ด: เลือกทั้งหมด
<?php
namespace mindphp\sample1\acp;
if(!defined('IN_PHPBB'))
{
exit();
}
class m_mtb_news_info
{
function module(){
return array(
'filename' => '\mindphp\sample1\acp\m_mtb_news_module',
'title' => 'ACP_MTB_NEWS_TITLE',
'version' => '1.0.0',
'modes' => array(
'm_topic_portal' => array('title' => 'ACP_MTB_TITLE' ,'auth' => 'ext_minphp/sample1' , 'cat' =>array('SAMPLE1_MOD')),
),
);
}
}
ไฟล์ m_mtb_news_module.php
โค้ด: เลือกทั้งหมด
<?php
namespace mindphp\sample1\acp;
class m_mtb_news_module{
var $u_action;
function main($id,$mode)
{
global $db ,$user , $auth,$template,$cache , $request;
global $config,$phpbb_root_path ,$phpbb_admin_path, $phpEx;
$this->config = $config;
$this->request = $request;
$this->tbl_name = 'acp_m_mtb_news';
}
}