当前位置: 首页>>代码示例>>PHP>>正文


PHP titania::absolute_path方法代码示例

本文整理汇总了PHP中titania::absolute_path方法的典型用法代码示例。如果您正苦于以下问题:PHP titania::absolute_path方法的具体用法?PHP titania::absolute_path怎么用?PHP titania::absolute_path使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在titania的用法示例。


在下文中一共展示了titania::absolute_path方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: initialise

    /**
     * Initialise titania:
     *	Session management, Cache, Language ...
     *
     * @return void
     */
    public static function initialise()
    {
        global $starttime;
        self::$page = htmlspecialchars(phpbb::$user->page['script_path'] . phpbb::$user->page['page_name']);
        self::$time = (int) $starttime;
        // Instantiate cache
        if (!class_exists('titania_cache')) {
            include TITANIA_ROOT . 'includes/core/cache.' . PHP_EXT;
        }
        self::$cache = new titania_cache();
        // Set the absolute titania/board path
        self::$absolute_path = generate_board_url(true) . '/' . self::$config->titania_script_path;
        self::$absolute_board = generate_board_url(true) . '/' . self::$config->phpbb_script_path;
        // Set the style path, template path, and template name
        if (!defined('IN_TITANIA_INSTALL') && !defined('USE_PHPBB_TEMPLATE')) {
            self::$images_path = self::$absolute_path . 'images/';
            self::$style_path = self::$absolute_path . 'styles/' . self::$config->style . '/';
            self::$template_path = self::$style_path . 'template';
            self::$theme_path = self::$style_path . 'theme';
            // Set the paths for phpBB
            self::set_custom_template();
        }
        // Setup the Access Level
        self::$access_level = TITANIA_ACCESS_PUBLIC;
        // The user might be in a group with team access even if it's not his default group.
        $group_ids = implode(', ', self::$config->team_groups);
        $sql = 'SELECT group_id, user_id, user_pending FROM ' . USER_GROUP_TABLE . '
				WHERE user_id = ' . phpbb::$user->data['user_id'] . '
				AND user_pending = 0
				AND group_id IN (' . $group_ids . ')';
        $result = phpbb::$db->sql_query_limit($sql, 1);
        if ($group_id = phpbb::$db->sql_fetchfield('group_id')) {
            self::$access_level = TITANIA_ACCESS_TEAMS;
        }
        phpbb::$db->sql_freeresult($result);
        // Add common titania language file
        self::add_lang('common');
        // Load the contrib types
        self::_include('types/base');
        titania_types::load_types();
        // Initialise the URL class
        titania_url::$root_url = self::$absolute_path;
        titania_url::decode_url(self::$config->titania_script_path);
        // Generate the root breadcrumb that displays on every page
        self::generate_breadcrumbs(array('CUSTOMISATION_DATABASE' => titania_url::build_url('')));
        // Load hooks
        self::load_hooks();
    }
开发者ID:kairion,项目名称:customisation-db,代码行数:54,代码来源:titania.php


注:本文中的titania::absolute_path方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。