コード例 #1
0
ファイル: titania.php プロジェクト: kairion/customisation-db
 /**
  * Titania page_header
  *
  * @param string $page_title
  * @param bool $display_online_list
  */
 public static function page_header($page_title = '')
 {
     if (!empty(titania::$hook) && titania::$hook->call_hook(array(__CLASS__, __FUNCTION__), $page_title)) {
         if (titania::$hook->hook_return(array(__CLASS__, __FUNCTION__))) {
             return titania::$hook->hook_return_result(array(__CLASS__, __FUNCTION__));
         }
     }
     if (defined('HEADER_INC')) {
         return;
     }
     define('HEADER_INC', true);
     // Do the phpBB page header stuff first
     phpbb::page_header($page_title);
     phpbb::$template->assign_vars(array('PHPBB_ROOT_PATH' => self::$absolute_board, 'TITANIA_ROOT_PATH' => self::$absolute_path, 'U_BASE_URL' => self::$absolute_path, 'U_SITE_ROOT' => self::$absolute_board, 'U_MANAGE' => sizeof(titania_types::find_authed()) || phpbb::$auth->acl_get('u_titania_mod_contrib_mod') || phpbb::$auth->acl_get('u_titania_mod_post_mod') ? titania_url::build_url('manage') : '', 'U_ALL_CONTRIBUTIONS' => titania_url::build_url('contributions/all'), 'U_ALL_SUPPORT' => titania::$config->support_in_titania ? titania_url::build_url('support/all') : false, 'U_MY_CONTRIBUTIONS' => phpbb::$user->data['is_registered'] && !phpbb::$user->data['is_bot'] ? titania_url::build_url('author/' . htmlspecialchars_decode(phpbb::$user->data['username_clean']) . '/contributions/') : '', 'U_SEARCH' => titania_url::build_url('search'), 'U_FIND_CONTRIBUTION' => titania_url::build_url('find-contribution'), 'U_FAQ' => titania_url::build_url('faq'), 'U_TITANIA_SEARCH_SELF' => titania::$config->support_in_titania && !phpbb::$user->data['is_bot'] && phpbb::$user->data['is_registered'] ? titania_url::build_url('search', array('u' => phpbb::$user->data['user_id'], 'type' => TITANIA_SUPPORT)) : '', 'S_DISPLAY_SEARCH' => true, 'T_TITANIA_TEMPLATE_PATH' => self::$template_path, 'T_TITANIA_THEME_PATH' => self::$theme_path, 'T_TITANIA_IMAGES_PATH' => self::$images_path, 'T_TITANIA_STYLESHEET' => self::$absolute_path . 'style.' . PHP_EXT . '?style=' . self::$config->style, 'T_STYLESHEET_LINK' => !phpbb::$user->theme['theme_storedb'] ? self::$absolute_board . '/styles/' . phpbb::$user->theme['theme_path'] . '/theme/stylesheet.css' : self::$absolute_board . 'style.' . PHP_EXT . '?sid=' . phpbb::$user->session_id . '&id=' . phpbb::$user->theme['style_id'] . '&lang=' . phpbb::$user->data['user_lang'], 'T_STYLESHEET_NAME' => phpbb::$user->theme['theme_name']));
     // Header hook
     self::$hook->call_hook('titania_page_header', $page_title);
 }