本文整理汇总了PHP中p_master::get_page_title方法的典型用法代码示例。如果您正苦于以下问题:PHP p_master::get_page_title方法的具体用法?PHP p_master::get_page_title怎么用?PHP p_master::get_page_title使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类p_master
的用法示例。
在下文中一共展示了p_master::get_page_title方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: while
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result)) {
$which = time() - $update_time < $row['online_time'] && ($row['viewonline'] || $auth->acl_get('u_viewonline')) ? 'online' : 'offline';
$template->assign_block_vars("friends_{$which}", array('USER_ID' => $row['user_id'], 'U_PROFILE' => get_username_string('profile', $row['user_id'], $row['username'], $row['user_colour']), 'USER_COLOUR' => get_username_string('colour', $row['user_id'], $row['username'], $row['user_colour']), 'USERNAME' => get_username_string('username', $row['user_id'], $row['username'], $row['user_colour']), 'USERNAME_FULL' => get_username_string('full', $row['user_id'], $row['username'], $row['user_colour'])));
}
$db->sql_freeresult($result);
}
// Do not display subscribed topics/forums if not allowed
if (!$config['allow_topic_notify'] && !$config['allow_forum_notify']) {
$module->set_display('main', 'subscribed', false);
}
/**
* Use this event to enable and disable additional UCP modules
*
* @event core.ucp_display_module_before
* @var p_master module Object holding all modules and their status
* @var mixed id Active module category (can be the int or string)
* @var string mode Active module
* @since 3.1.0-a1
*/
$vars = array('module', 'id', 'mode');
extract($phpbb_dispatcher->trigger_event('core.ucp_display_module_before', compact($vars)));
// Select the active module
$module->set_active($id, $mode);
// Load and execute the relevant module
$module->load_active();
// Assign data to the template engine for the list of modules
$module->assign_tpl_vars(append_sid("{$phpbb_root_path}ucp.{$phpEx}"));
// Generate the page, do not display/query online list
$module->display($module->get_page_title());
示例2: _module_zebra
$which = time() - $update_time < $row['online_time'] && ($row['viewonline'] || $auth->acl_get('u_viewonline')) ? 'online' : 'offline';
$template->assign_block_vars("friends_{$which}", array('USER_ID' => $row['user_id'], 'U_PROFILE' => get_username_string('profile', $row['user_id'], $row['username'], $row['user_colour']), 'USER_COLOUR' => get_username_string('colour', $row['user_id'], $row['username'], $row['user_colour']), 'USERNAME' => get_username_string('username', $row['user_id'], $row['username'], $row['user_colour']), 'USERNAME_FULL' => get_username_string('full', $row['user_id'], $row['username'], $row['user_colour'])));
}
$db->sql_freeresult($result);
}
// Do not display subscribed topics/forums if not allowed
if (!$config['allow_topic_notify'] && !$config['allow_forum_notify']) {
$module->set_display('main', 'subscribed', false);
}
// Select the active module
$module->set_active($id, $mode);
// Load and execute the relevant module
$module->load_active();
// Assign data to the template engine for the list of modules
$module->assign_tpl_vars(append_sid("{$phpbb_root_path}ucp.{$phpEx}"));
// Generate the page, do not display/query online list
$module->display($module->get_page_title(), false);
/**
* Function for assigning a template var if the zebra module got included
*/
function _module_zebra($mode, &$module_row)
{
global $template;
$template->assign_var('S_ZEBRA_ENABLED', true);
if ($mode == 'friends') {
$template->assign_var('S_ZEBRA_FRIENDS_ENABLED', true);
}
if ($mode == 'foes') {
$template->assign_var('S_ZEBRA_FOES_ENABLED', true);
}
}
示例3: adm_page_header
$template->assign_var('T_TEMPLATE_PATH', $phpbb_admin_path . 'style');
// 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']) {