initial themes branch commit

This commit is contained in:
Claude 2013-03-24 16:07:55 +01:00
parent 223882a7c5
commit 41420b2b01
42 changed files with 51 additions and 0 deletions

View File

@ -239,6 +239,9 @@ class Main extends CI_Controller
$this->dbforge->add_key('hits_updated'); $this->dbforge->add_key('hits_updated');
$this->dbforge->add_column('pastes', $fields); $this->dbforge->add_column('pastes', $fields);
} }
//load theme
$this->load->theme('classic');
} }
function _form_prep($lang = false, $title = '', $paste = '', $reply = false) function _form_prep($lang = false, $title = '', $paste = '', $reply = false)

View File

@ -0,0 +1,47 @@
<?php
/**
* Class and Function List:
* Function list:
* - __construct()
* - theme()
* - view()
* Classes list:
* - MY_Loader extends CI_Loader
*/
if (!defined('BASEPATH')) exit('No direct script access allowed');
class MY_Loader extends CI_Loader
{
var $template = '';
var $data = array();
var $return = FALSE;
function __construct()
{
parent::__construct();
log_message('debug', 'MY_Loader Class Initialized');
}
function theme($template = '', $data = array() , $return = FALSE)
{
if ($template == '')
{
return FALSE;
}
$this->template = $template;
$this->data = $this->_ci_object_to_array($data);
$this->return = $return;
}
function view($view, $vars = array() , $return = FALSE)
{
log_message('debug', 'Using view "themes/' . $this->template . '/views/' . $view . '.php"');
return $this->_ci_load(array(
'_ci_view' => '../themes/' . $this->template . '/views/' . $view . '.php',
'_ci_vars' => $this->_ci_object_to_array($vars) ,
'_ci_return' => $return
));
}
}

View File

Before

Width:  |  Height:  |  Size: 207 B

After

Width:  |  Height:  |  Size: 207 B

View File

Before

Width:  |  Height:  |  Size: 282 B

After

Width:  |  Height:  |  Size: 282 B

View File

@ -0,0 +1 @@
<?php echo $content;