本文整理匯總了PHP中p_master::get_tpl_name方法的典型用法代碼示例。如果您正苦於以下問題:PHP p_master::get_tpl_name方法的具體用法?PHP p_master::get_tpl_name怎麽用?PHP p_master::get_tpl_name使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類p_master
的用法示例。
在下文中一共展示了p_master::get_tpl_name方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: adm_page_header
// the acp template is never stored in the database
$user->theme['template_storedb'] = false;
// Instantiate new module
$module = new p_master();
// Instantiate module system and generate list of available modules
$module->list_modules('acp');
// Select the active module
$module->set_active($module_id, $mode);
// Assign data to the template engine for the list of modules
// We do this before loading the active module for correct menu display in trigger_error
$module->assign_tpl_vars(append_sid("{$phpbb_admin_path}index.{$phpEx}"));
// Load and execute the relevant module
$module->load_active();
// Generate the page
adm_page_header($module->get_page_title());
$template->set_filenames(array('body' => $module->get_tpl_name()));
adm_page_footer();
/**
* Header for acp pages
*/
function adm_page_header($page_title)
{
global $config, $db, $user, $template;
global $phpbb_root_path, $phpbb_admin_path, $phpEx, $SID, $_SID;
if (defined('HEADER_INC')) {
return;
}
define('HEADER_INC', true);
// gzip_compression
if ($config['gzip_compress']) {
if (@extension_loaded('zlib') && !headers_sent()) {
示例2: adm_page_header
// Select the active module
$module->set_active($module_id, $mode);
// Assign data to the template engine for the list of modules
// We do this before loading the active module for correct menu display in trigger_error
$module->assign_tpl_vars(append_sid("{$phpbb_admin_path}index.$phpEx"));
// Load and execute the relevant module
$module->load_active();
// Generate the page
adm_page_header($module->get_page_title());
$template->set_filenames(array(
'body' => $module->get_tpl_name(),
));
adm_page_footer();
/**
* Header for acp pages
*/
function adm_page_header($page_title)
{
global $config, $db, $user, $template;
global $phpbb_root_path, $phpbb_admin_path, $phpEx, $SID, $_SID;
if (defined('HEADER_INC'))
{
return;