/** * Constructor * * @return void */ public function __construct() { parent::__construct(); $this->load->library('template'); $this->load->library('assets'); $this->load->config('docs'); $this->lang->load('docs'); $this->docsGroup = $this->uri->segment(2); // Is displaying docs permitted for this environment? if (config_item('docs.permitted_environments') && !in_array(ENVIRONMENT, config_item('docs.permitted_environments'))) { Template::set_message(lang('docs_env_disabled'), 'error'); redirect(); } // Was a doc group provided? if (!$this->docsGroup) { redirect('docs/' . config_item('docs.default_group')); } $this->showAppDocs = config_item('docs.show_app_docs'); $this->showDevDocs = config_item('docs.show_dev_docs'); $this->tocFile = config_item('docs.toc_file') ?: '_toc.ini'; // Make sure we can still get to the search method. if ($this->docsGroup == 'search') { $this->docsGroup = false; } elseif ($this->docsGroup == 'developer' && !$this->showDevDocs && ENVIRONMENT != 'development') { if ($this->showAppDocs) { Template::set_message(lang('docs_not_allowed_dev'), 'warning'); redirect('docs/application'); } show_error(lang('docs_not_allowed')); } Template::set_theme(config_item('docs.theme'), 'docs'); $this->load->helper('form'); }
/** * Class constructor - setup paging and keyboard shortcuts as well as * load various libraries * */ public function __construct() { parent::__construct(); $this->load->library('template'); $this->load->library('assets'); $this->load->library('ui/contexts'); // Pagination config $this->pager = array('full_tag_open' => '<div class="pagination pagination-right"><ul>', 'full_tag_close' => '</ul></div>', 'next_link' => '→', 'prev_link' => '←', 'next_tag_open' => '<li>', 'next_tag_close' => '</li>', 'prev_tag_open' => '<li>', 'prev_tag_close' => '</li>', 'first_tag_open' => '<li>', 'first_tag_close' => '</li>', 'last_tag_open' => '<li>', 'last_tag_close' => '</li>', 'cur_tag_open' => '<li class="active"><a href="#">', 'cur_tag_close' => '</a></li>', 'num_tag_open' => '<li>', 'num_tag_close' => '</li>'); $this->limit = $this->settings_lib->item('site.list_limit'); // load the keyboard shortcut keys $shortcut_data = array('shortcuts' => config_item('ui.current_shortcuts'), 'shortcut_keys' => $this->settings_lib->find_all_by('module', 'core.ui')); Template::set('shortcut_data', $shortcut_data); // Profiler Bar? if (ENVIRONMENT == 'development') { if ($this->settings_lib->item('site.show_profiler') and has_permission('Bonfire.Profiler.View')) { // Profiler bar? if (!$this->input->is_cli_request() and !$this->input->is_ajax_request()) { $this->load->library('Console'); $this->output->enable_profiler(TRUE); } } } // Basic setup Template::set_theme($this->config->item('template.admin_theme'), 'junk'); }
public function __construct() { parent::__construct(); $this->load->library('template'); $this->load->library('assets'); $this->load->config('docs'); $this->lang->load('docs'); Template::set_theme(config_item('docs.theme'), 'docs'); }
/** * Displays the homepage of the Bonfire app * * @return void */ public function index() { //$this->load->library('users/auth'); //$this->set_current_user(); $embedData = $this->embedcontent_model->getAllEmbeds(); Template::set_theme('my_theme', 'embeds'); Template::set("embeds", $embedData); Template::set_view('/home/embeds'); Template::render(); }
/** * Class constructor setup login restriction and load various libraries * * @return void */ public function __construct() { $this->autoload['helpers'][] = 'form'; $this->autoload['libraries'][] = 'Template'; parent::__construct(); $this->load->library('form_validation'); //$this->form_validation->CI =& $this; $this->form_validation->set_error_delimiters('', ''); Template::set_theme('backend'); }
public function __construct() { parent::__construct(); if (!class_exists('Assets')) { require APP_DIR . 'libraries/Assets.php'; } if (!class_exists('Assets')) { require APP_DIR . 'libraries/Template.php'; } Template::set_theme('admin'); }
/** * Setup the required libraries etc. * * @retun void */ public function __construct() { parent::__construct(); $this->load->helper('form'); $this->load->library('form_validation'); $this->load->model('users/user_model'); $this->load->library('users/auth'); $this->lang->load('users'); $this->siteSettings = $this->settings_lib->find_all(); Template::set_theme('admin'); }
public function test_lex_parser_in_themes() { Template::parse_views(true); Template::set_theme('default'); $file = FCPATH . 'themes/default/bf_parser_test.php'; // Create a simple file file_put_contents($file, '<span>{{ title }}</span>'); Template::set('title', 'Lex Is Working'); Template::load_view('bf_parser_test', null, '', true, $output); $this->assertTrue(class_exists('MY_Parser')); $this->assertEqual($output, '<span>Lex Is Working</span>'); // Remove the temp file unlink($file); }
/** * Setup the required libraries etc. * * @return void */ public function __construct() { parent::__construct(); $this->load->helper('form'); $this->load->library('form_validation'); // $this->load->model('users/user_model'); $this->load->library('securinator/Auth'); Template::set_theme('backend'); //$this->lang->load('users'); $this->siteSettings = $this->settings->find_all(); // if ($this->siteSettings['auth.password_show_labels'] == 1) { //js('users', 'password_strength.js'); //js('users', 'jquery.strength.js'); // } }
/** * Class constructor - setup paging and keyboard shortcuts as well as * load various libraries * */ public function __construct() { $this->autoload['libraries'][] = 'ui/contexts'; parent::__construct(); // Pagination config $this->pager = array('full_tag_open' => '<div class="pagination pagination-right"><ul>', 'full_tag_close' => '</ul></div>', 'next_link' => '→', 'prev_link' => '←', 'next_tag_open' => '<li>', 'next_tag_close' => '</li>', 'prev_tag_open' => '<li>', 'prev_tag_close' => '</li>', 'first_tag_open' => '<li>', 'first_tag_close' => '</li>', 'last_tag_open' => '<li>', 'last_tag_close' => '</li>', 'cur_tag_open' => '<li class="active"><a href="#">', 'cur_tag_close' => '</a></li>', 'num_tag_open' => '<li>', 'num_tag_close' => '</li>'); $this->limit = $this->settings_lib->item('site.list_limit'); // load the keyboard shortcut keys $shortcut_data = array('shortcuts' => config_item('ui.current_shortcuts'), 'shortcut_keys' => $this->settings_lib->find_all_by('module', 'core.ui')); Template::set('shortcut_data', $shortcut_data); // Profiler Bar? if (ENVIRONMENT == 'development') { if ($this->settings_lib->item('site.show_profiler') && $this->auth->has_permission('Bonfire.Profiler.View')) { // Profiler bar? $this->showProfiler(false); } } // Basic setup Template::set_theme($this->config->item('template.admin_theme'), $this->config->item('template.default_theme')); }
/** * Class constructor * */ public function __construct() { $this->autoload['libraries'][] = 'ui/contexts'; parent::__construct(); // Pagination config $this->pager = array('full_tag_open' => '<div class="pagination pagination-right"><ul>', 'full_tag_close' => '</ul></div>', 'next_link' => '→', 'prev_link' => '←', 'next_tag_open' => '<li>', 'next_tag_close' => '</li>', 'prev_tag_open' => '<li>', 'prev_tag_close' => '</li>', 'first_tag_open' => '<li>', 'first_tag_close' => '</li>', 'last_tag_open' => '<li>', 'last_tag_close' => '</li>', 'cur_tag_open' => '<li class="active"><a href="#">', 'cur_tag_close' => '</a></li>', 'num_tag_open' => '<li>', 'num_tag_close' => '</li>'); $this->limit = $this->settings_lib->item('site.list_limit'); /* // load the keyboard shortcut keys $shortcut_data = array( 'shortcuts' => config_item('ui.current_shortcuts'), 'shortcut_keys' => $this->settings_lib->find_all_by('module', 'core.ui'), ); Template::set('shortcut_data', $shortcut_data);*/ Events::trigger('before_front_controller'); $this->load->library('template'); $this->load->library('assets'); $this->set_current_user(); Events::trigger('after_front_controller'); // Basic setup Template::set_theme($this->config->item('template.default_theme')); }
public function __construct() { parent::__construct(); $this->lang->load('application'); $this->load->helper('application'); $this->load->library('pagination'); // Pagination config $this->pager = array(); $this->pager['full_tag_open'] = '<div class="pagination">'; $this->pager['full_tag_close'] = '</div>'; $this->pager['next_link'] = 'Next »'; $this->pager['prev_link'] = '« Previous'; $this->limit = $this->settings_lib->item('site.list_limit'); // load the keyboard shortcut keys $shortcut_data = array('shortcuts' => config_item('ui.current_shortcuts'), 'shortcut_keys' => unserialize($this->settings_lib->item('ui.shortcut_keys'))); Template::set('shortcut_data', $shortcut_data); // Profiler Bar? if (ENVIRONMENT == 'development') { $this->load->library('Console'); if (!$this->input->is_cli_request() && $this->settings_lib->item('site.show_profiler')) { $this->output->enable_profiler(true); } } // Basic setup Template::set_theme('admin'); Assets::add_css(array('ui.css', 'notifications.css', 'buttons.css')); }
public function __construct() { parent::__construct(); $this->lang->load('application'); $this->load->helper('application'); $this->load->library('pagination'); // Pagination config $this->pager = array(); $this->pager['full_tag_open'] = '<div class="pagination">'; $this->pager['full_tag_close'] = '</div>'; $this->pager['next_link'] = 'Next »'; $this->pager['prev_link'] = '« Previous'; $this->limit = $this->config->item('site.list_limit'); // Basic setup Template::set_theme('admin'); Assets::add_css(array('ui.css', 'notifications.css', 'buttons.css')); }