forked from cynial/STBlog
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMY_Loader.php
More file actions
83 lines (72 loc) · 1.68 KB
/
MY_Loader.php
File metadata and controls
83 lines (72 loc) · 1.68 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
<?php if (!defined('BASEPATH')) exit('No direct access allowed.');
/**
* STBlog Blogging System
*
* 基于Codeigniter的单用户多权限开源博客系统
*
* STBlog is an open source multi-privilege blogging System built on the
* well-known PHP framework Codeigniter.
*
* @package STBLOG
* @author Saturn <huyanggang@gmail.com>
* @copyright Copyright (c) 2009 - 2010, cnsaturn.com.
* @license GNU General Public License 2.0
* @link http://code.google.com/p/stblog/
* @version 0.1.0
*/
// ------------------------------------------------------------------------
/**
* MY_Loader
*
* Override the CI Loader library in order to make the whole system themeable.
*
* 重写CI的loader库,以支持现有架构下的博客皮肤系统
*
* @package STBLOG
* @subpackage Libraries
* @category Libraries
* @author Saturn <huyanggang@gmail.com>
* @link http://code.google.com/p/stblog/
*/
class MY_Loader extends CI_Loader
{
/**
* 系统当前皮肤
*
* @access public
* @var string
*/
public $theme = 'default';
/**
* 构造函数
*
* @access public
* @return void
*/
public function __construct()
{
parent::__construct();
}
/**
* 打开皮肤功能
*
* @access public
* @return void
*/
public function switch_theme_on()
{
$this->_ci_view_paths = array(FCPATH . ST_THEMES_DIR . DIRECTORY_SEPARATOR . $this->theme . DIRECTORY_SEPARATOR => TRUE);
}
/**
* 关闭皮肤功能
*
* @access public
* @return void
*/
public function switch_theme_off()
{
//just do nothing
}
}
/* End of file MY_Loader.php */
/* Location: ./application/libraries/MY_Loader.php */