Disini kita akan belajarcara membuat fungsi yang sama seperti $welcomeblock yuk ketutor
1.Buka File global.php lalu cari code ini
Kode PHP: (Select All)
// Load appropriate welcome block for the current logged in userif($mybb->user['uid'] != 0)
{
// User can access the admin cp and we're not hiding admin cp links, fetch it
if($mybb->usergroup['cancp'] == 1 && $mybb->config['hide_admin_links'] != 1)
{
$admin_dir = $config['admin_dir'];
eval("\$admincplink = \"".$templates->get("header_welcomeblock_member_admin")."\";");
}
if($mybb->usergroup['canmodcp'] == 1)
{
eval("\$modcplink = \"".$templates->get("header_welcomeblock_member_moderator")."\";");
}
// Format the welcome back message
$lang->welcome_back = $lang->sprintf($lang->welcome_back, build_profile_link($mybb->user['username'], $mybb->user['uid']), $lastvisit);
// Tell the user their PM usage
$lang->welcome_pms_usage = $lang->sprintf($lang->welcome_pms_usage, my_number_format($mybb->user['pms_unread']), my_number_format($mybb->user['pms_total']));
eval("\$welcomeblock = \"".$templates->get("header_welcomeblock_member")."\";");
}
Kode PHP: (Select All)
// Otherwise, we have a guestelse
{
eval("\$welcomeblock = \"".$templates->get("header_welcomeblock_guest")."\";");
}
Kode PHP: (Select All)
{
eval("\$sidebar = \"".$templates->get("header_welcomeblock_sidebarq")."\";");
}
Anda harus membuat template didalam ACP dengan nama header_welcomeblock_sidebarq code php tersebut harus di taruh dibawah
Kode PHP: (Select All)
// Otherwise, we have a guestelse
0 komentar:
Post a Comment