Các bạn có để ý thấy hai dòng:
Chọn VnVista làm trang chủ
Thêm VnVista vào thu mục Favorites
ở trên cùng trong diễn đàn? Đây là hai dòng mà mình thêm vào trong Board Wrapper, nhưng nếu bạn cài mod này thì bạn sẽ không cần phải vào Board Wrapper chỉnh sửa nữa, mà có thể dễ dàng tạo những message ở đầu các trang forum và có thể bật/tắt chúng tùy ý. Rất tiện lợi phải không?
Ok, bắt đầu nào:
Download file đính kèm về, giải nén & up lên host vào thư mục gốc forum, chạy file Install_GFM.php bằng browser.
Mở file lang\en\lang_global.php
Tìm:
CODE
$lang = array (
Thêm bên dưới:
CODE
// (FSY2) Global Forum Message v2.0 mod by FuSoYa
'gf_message' => "<font color='red'><b>Important Announcement: </b></font>",
Mở sources\admin\admin_pages.php
Tìm:
CODE
14 => array( 'IPB Copyright Removal' , 'act=pin&code=copy' ),
Thêm dưới:
CODE
15 => array( 'Global Forum Message' , 'act=op&code=findsetting&key='.urlencode('globalforummessage'), '', 0, 1 ),
Nếu trong file của bạn đã có dòng có số 15 từ trước rồi thì hãy đổi số 15 trên thành 16 (hoặc thành 17 nếu đã có số 16...)
Mở sources\classes\class_display.php
TÌm:
CODE
//-----------------------------------------
// Stick in TSL link?
//-----------------------------------------
if ($ibforums->vars['top_site_list_integrate'])
{
// As of TSL 1.2, the modules URL is no longer used
//$ibforums->skin['_wrapper'] = str_replace( "<!--IBF.TSLLINK-->", $ibforums->skin_global->show_tsl_link_inline(), $ibforums->skin['_wrapper'] );
}
Thêm bên dưới:
CODE
//+--------------------------------------------
// (FSY2) Global Forum Message v2.0 mod by FuSoYa
//+--------------------------------------------
if ($ibforums->member['id'] && $ibforums->vars['is_message_on'])
{
require_once( ROOT_PATH."sources/lib/post_parser.php" );
$this->parser = new post_parser(1);
$message = $this->parser->convert( array( 'TEXT' => preg_replace( "/\n/", "<br>", stripslashes($ibforums->vars['gf_message']) ),
'SMILIES' => 1,
'CODE' => 1,
'HTML' => 1 ));
$ibforums->skin['_wrapper'] = str_replace( "<!--GFMESSAGE-->", $ibforums->skin_global->show_message($message), $ibforums->skin['_wrapper'] );
}
Vào ACP --> Skin Manager --> Edit Root Skin Board Header & Footer Wrapper
TÌm:
CODE
<% MEMBER BAR %>
Thêm vào dưới:
CODE
<!--GFMESSAGE-->
Vào System Settings -> Global Forum Message để edit message
Chúc vui!