/** * Initialize properties before running the controller methods (actions), * so they are available to our action. * @param string $template view to use as template * @return void */ public function before($template = NULL) { Theme::checker(); $this->maintenance(); if ($this->auto_render === TRUE) { // Load the template $this->template = $template === NULL ? 'oc-panel/main' : $template; $this->template = View::factory($this->template); // Initialize empty values $this->template->title = __('Panel') . ' - ' . core::config('general.site_name'); $this->template->meta_keywords = ''; $this->template->meta_description = ''; $this->template->meta_copywrite = 'Open Classifieds ' . Core::version; $this->template->header = View::factory('oc-panel/header'); $this->template->content = ''; $this->template->footer = View::factory('oc-panel/footer'); $this->template->styles = array(); $this->template->scripts = array(); $this->template->user = Auth::instance()->get_user(); //other color if (Theme::get('admin_theme') != 'bootstrap' and Theme::get('admin_theme') != '') { Theme::$styles = array('http://netdna.bootstrapcdn.com/bootswatch/3.0.0/' . Theme::get('admin_theme') . '/bootstrap.min.css' => 'screen', 'http://cdn.jsdelivr.net/bootstrap/2.3.2/css/bootstrap-responsive.min.css' => 'screen', 'http://cdn.jsdelivr.net/chosen/1.0.0/chosen.css' => 'screen', 'http://cdn.jsdelivr.net/sceditor/1.4.3/themes/default.min.css' => 'screen', 'css/admin-styles.css' => 'screen'); } else { Theme::$styles = array('http://netdna.bootstrapcdn.com/bootstrap/3.0.2/css/bootstrap.min.css' => 'screen', 'http://cdn.jsdelivr.net/sceditor/1.4.3/themes/default.min.css' => 'screen', 'http://cdn.jsdelivr.net/chosen/1.0.0/chosen.css' => 'screen', 'css/admin-styles.css' => 'screen'); } Theme::$scripts['footer'] = array('http://code.jquery.com/jquery-1.10.2.min.js', 'js/jquery.sceditor.min.js', 'http://netdna.bootstrapcdn.com/bootstrap/3.0.2/js/bootstrap.min.js', 'http://cdn.jsdelivr.net/chosen/1.0.0/chosen.jquery.min.js', 'js/oc-panel/theme.init.js?v=2.1', 'js/oc-panel/sidebar.js'); } }
/** * Fill in default values for our properties before rendering the output. */ public function after() { parent::after(); if ($this->auto_render === TRUE) { // Add custom CSS if enabld and front controller if (is_subclass_of($this, 'Auth_Controller') === FALSE and ($custom_css = Theme::get_custom_css()) !== FALSE) { Theme::$styles = array_merge(Theme::$styles, array($custom_css => 'screen')); } //cookie consent if (Core::config('general.cookie_consent') == 1) { Theme::$styles = array_merge(Theme::$styles, array('css/jquery.cookiebar.css' => 'screen')); $this->template->scripts['footer'][] = 'js/jquery.cookiebar.js'; $this->template->scripts['footer'][] = Route::url('default', array('controller' => 'jslocalization', 'action' => 'cookieconsent')); } //adblock detection if (Core::config('general.adblock') == 1) { Theme::$styles = array_merge(Theme::$styles, array('css/adi.js/jquery.adi.css' => 'screen')); Theme::$scripts['footer'][] = 'js/advertisement.js'; Theme::$scripts['footer'][] = 'js/jquery.adi.js'; $this->template->scripts['footer'][] = Route::url('default', array('controller' => 'jslocalization', 'action' => 'adi')); } // Add defaults to template variables. $this->template->styles = array_merge_recursive(Theme::$styles, $this->template->styles); $this->template->scripts = array_reverse(array_merge_recursive(Theme::$scripts, $this->template->scripts)); //in case theres no description given if ($this->template->meta_description == '') { $this->template->meta_description = $this->template->title; } //title concatenate the site name if ($this->template->title != '') { $this->template->title .= ' - '; } $this->template->title .= core::config('general.site_name'); //auto generate keywords and description from content seo::$charset = Kohana::$charset; $this->template->title = seo::text($this->template->title, 70); //not meta keywords given //remember keywords are useless :( http://googlewebmastercentral.blogspot.com/2009/09/google-does-not-use-keywords-meta-tag.html if ($this->template->meta_keywords == '') { $this->template->meta_keywords = seo::keywords($this->template->meta_description); } $this->template->meta_description = seo::text($this->template->meta_description); } $this->response->body($this->template->render()); }
<!--[if gt IE 8]><!--> <html class="no-js" lang="<?php echo i18n::html_lang(); ?> "> <!--<![endif]--> <head> <?php echo View::factory('header_metas', array('title' => $title, 'meta_keywords' => $meta_keywords, 'meta_description' => $meta_description, 'meta_copyright' => $meta_copyright, 'amphtml' => $amphtml)); ?> <!-- Le HTML5 shim, for IE6-8 support of HTML elements --> <!--[if lt IE 7]><link rel="stylesheet" href="//blueimp.github.com/cdn/css/bootstrap-ie6.min.css"><![endif]--> <!--[if lt IE 9]> <script type="text/javascript" src="//cdn.jsdelivr.net/html5shiv/3.7.2/html5shiv.min.js"></script> <![endif]--> <?php echo Theme::styles($styles); ?> <?php echo Theme::scripts($scripts); ?> <?php echo core::config('general.html_head'); ?> <?php echo View::factory('analytics'); ?> <style type="text/css"> <?php if (Theme::get('upper_banner_image')) { ?>
<meta name="copyright" content="<?php echo $meta_copywrite; ?> " > <meta name="author" content="open-classifieds.com"> <meta name="viewport" content="width=device-width,initial-scale=1"> <!-- Le HTML5 shim, for IE6-8 support of HTML elements --> <!--[if lt IE 9]> <?php echo HTML::script('http://html5shim.googlecode.com/svn/trunk/html5.js'); ?> <![endif]--> <?php echo Theme::styles($styles, 'default'); ?> <?php echo Theme::scripts($scripts, 'header', 'default'); ?> <style type="text/css"> body { padding-top: 60px; padding-bottom: 40px; } .sidebar-nav { padding: 9px 0; }
/** * Initialize properties before running the controller methods (actions), * so they are available to our action. * @param string $template view to use as template * @return void */ public function before($template = NULL) { Theme::checker(); $this->maintenance(); if ($this->auto_render === TRUE) { // Load the template $this->template = $template === NULL ? 'oc-panel/main' : $template; //if its and ajx request I want only the content if (Core::get('rel') == 'ajax') { $this->template = 'oc-panel/content'; } $this->template = View::factory($this->template); // Initialize empty values $this->template->title = __('Panel') . ' - ' . core::config('general.site_name'); $this->template->meta_keywords = ''; $this->template->meta_description = ''; $this->template->meta_copyright = 'Open Classifieds ' . Core::VERSION; $this->template->header = ''; $this->template->content = ''; $this->template->footer = ''; $this->template->styles = array(); $this->template->scripts = array(); $this->template->user = Auth::instance()->get_user(); //non ajax request if (Core::get('rel') != 'ajax') { $this->template->header = View::factory('oc-panel/header'); $this->template->footer = View::factory('oc-panel/footer'); /** * custom options for the theme * @var array */ Theme::$options = Theme::get_options(); //we load earlier the theme since we need some info Theme::load(); if (Theme::get('cdn_files') == FALSE) { //other color if (Theme::get('admin_theme') != 'bootstrap' and Theme::get('admin_theme') != '') { $theme_css = array('css/' . Theme::get('admin_theme') . '-bootstrap.min.css' => 'screen'); } else { $theme_css = array('css/paper-bootstrap.min.css' => 'screen'); } $common_css = array('css/chosen.min.css' => 'screen', 'css/jquery.sceditor.default.theme.min.css' => 'screen', 'css/loadingbar.css' => 'screen', 'css/icon-picker.min.css' => 'screen', 'css/font-awesome.min.css' => 'screen', 'css/summernote.css' => 'screen', 'css/bootstrap-tour.min.css' => 'screen', 'css/sweet-alert.min.css' => 'screen', 'css/admin-styles.css?v=' . Core::VERSION => 'screen'); Theme::$styles = array_merge($theme_css, $common_css); Theme::$scripts['footer'] = array('js/jquery.min.js', 'js/jquery.cookie.min.js', 'js/iconPicker.min.js', 'js/oc-panel/sidebar.js?v=' . Core::VERSION, 'js/jquery.sceditor.bbcode.min.js', 'js/summernote.min.js', 'js/summernote-ext-video.js', 'js/bootstrap.min.js', 'js/chosen.jquery.min.js', 'js/bootstrap-tour.min.js', Route::url('jslocalization', array('controller' => 'jslocalization', 'action' => 'bstour')), 'js/oc-panel/' . (Auth::instance()->get_user()->id_role != Model_Role::ROLE_ADMIN ? 'tour-user.js' : 'tour.js'), Route::url('jslocalization', array('controller' => 'jslocalization', 'action' => 'chosen')), 'http://' . (Kohana::$environment !== Kohana::DEVELOPMENT ? 'market.' . Core::DOMAIN . '' : 'eshop.lo') . '/embed.js', 'js/sweet-alert.min.js', 'js/favico.min.js', '//maps.google.com/maps/api/js?sensor=false&libraries=geometry&v=3.7', '//cdn.jsdelivr.net/gmaps/0.4.15/gmaps.min.js', 'js/jquery.bootgrid.min.js', 'js/query.bootgrid.fa.min.js', 'js/oc-panel/theme.init.js?v=' . Core::VERSION); } else { //other color if (Theme::get('admin_theme') != 'bootstrap' and Theme::get('admin_theme') != '') { $theme_css = array('//cdn.jsdelivr.net/bootswatch/3.3.6/' . Theme::get('admin_theme') . '/bootstrap.min.css' => 'screen'); } else { $theme_css = array('//cdn.jsdelivr.net/bootswatch/3.3.6/paper/bootstrap.min.css' => 'screen'); } $common_css = array('//cdn.jsdelivr.net/chosen/1.0.0/chosen.css' => 'screen', 'css/jquery.sceditor.default.theme.min.css' => 'screen', 'css/loadingbar.css' => 'screen', 'css/icon-picker.min.css' => 'screen', '//cdn.jsdelivr.net/fontawesome/4.5.0/css/font-awesome.min.css' => 'screen', '//cdn.jsdelivr.net/summernote/0.6.16/summernote.css' => 'screen', '//cdn.jsdelivr.net/bootstrap-tour/0.10.1/css/bootstrap-tour.min.css' => 'screen', '//cdn.jsdelivr.net/sweetalert/1.1.3/sweetalert.css' => 'screen', 'css/admin-styles.css?v=' . Core::VERSION => 'screen'); Theme::$styles = array_merge($theme_css, $common_css); Theme::$scripts['footer'] = array('//cdn.jsdelivr.net/jquery/1.12.0/jquery.min.js', '//cdn.jsdelivr.net/jquery.cookie/1.4.1/jquery.cookie.min.js', 'js/iconPicker.min.js', 'js/oc-panel/sidebar.js?v=' . Core::VERSION, 'js/jquery.sceditor.bbcode.min.js', '//cdn.jsdelivr.net/summernote/0.6.16/summernote.min.js', 'js/summernote-ext-video.js', '//cdn.jsdelivr.net/bootstrap/3.3.6/js/bootstrap.min.js', '//cdn.jsdelivr.net/chosen/1.0.0/chosen.jquery.min.js', 'js/bootstrap-tour.min.js', Route::url('jslocalization', array('controller' => 'jslocalization', 'action' => 'bstour')), 'js/oc-panel/' . (Auth::instance()->get_user()->id_role != Model_Role::ROLE_ADMIN) ? 'tour-user.js' : 'tour.js', Route::url('jslocalization', array('controller' => 'jslocalization', 'action' => 'chosen')), 'js/oc-panel/sidebar.js?v=' . Core::VERSION, '//cdn.jsdelivr.net/sweetalert/1.1.3/sweetalert.min.js', 'js/favico.min.js', '//maps.google.com/maps/api/js?sensor=false&libraries=geometry&v=3.7', '//cdn.jsdelivr.net/gmaps/0.4.15/gmaps.min.js', '//' . (Kohana::$environment !== Kohana::DEVELOPMENT ? 'market.' . Core::DOMAIN . '' : 'eshop.lo') . '/embed.js', 'js/jquery.bootgrid.min.js', 'js/query.bootgrid.fa.min.js', 'js/oc-panel/theme.init.js?v=' . Core::VERSION); } } } }
* License: GPL v3 */ /** * placeholders & widgets for this theme */ Widgets::$theme_placeholders = array('header', 'sidebar', 'footer'); /** * custom options for the theme * @var array */ Theme::$options = Theme::get_options(); //we load earlier the theme since we need some info Theme::load(); //local files $theme_css = array('//cdn.jsdelivr.net/bootswatch/3.3.6/yeti/bootstrap.min.css' => 'screen', '//cdn.jsdelivr.net/fontawesome/4.5.0/css/font-awesome.min.css' => 'screen', '//cdn.jsdelivr.net/chosen/1.0.0/chosen.css' => 'screen', '//cdn.jsdelivr.net/prettyphoto/3.1.5/css/prettyPhoto.css' => 'screen', 'css/style.css?v=' . Core::VERSION => 'screen', 'css/yeti-style.css' => 'screen', 'css/slider.css' => 'screen'); if (Theme::get('rtl')) { $theme_css = array_merge($theme_css, array('css/bootstrap-rtl.min.css' => 'screen')); } Theme::$styles = $theme_css; Theme::$scripts['footer'] = array('//code.jquery.com/jquery-1.10.2.min.js', '//cdn.jsdelivr.net/bootstrap/3.3.6/js/bootstrap.min.js', '//cdn.jsdelivr.net/prettyphoto/3.1.5/js/jquery.prettyPhoto.js', '//cdn.jsdelivr.net/chosen/1.0.0/chosen.jquery.min.js', Route::url('jslocalization', array('controller' => 'jslocalization', 'action' => 'chosen')), 'js/bootstrap-slider.js', 'js/jquery.validate.min.js', Route::url('jslocalization', array('controller' => 'jslocalization', 'action' => 'validate')), 'js/theme.init.js?v=' . Core::VERSION); /** * custom error alerts */ Form::$errors_tpl = '<div class="alert alert-danger"><a class="close" data-dismiss="alert">×</a> <h4 class="alert-heading">%s</h4> <ul>%s</ul></div>'; Form::$error_tpl = '<div class="alert"><a class="close" data-dismiss="alert">×</a>%s</div>'; Alert::$tpl = '<div class="alert alert-%s"> <a class="close" data-dismiss="alert" href="#">×</a> <h4 class="alert-heading">%s</h4>%s </div>';
Widgets::$theme_placeholders = array('footer', 'sidebar'); /** * custom options for the theme * @var array */ Theme::$options = Theme::get_options(); //we load earlier the theme since we need some info Theme::load(); /** * styles and themes, loaded in this order */ Theme::$skin = Theme::get('theme'); /** * styles and themes, loaded in this order */ Theme::$styles = array('//netdna.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css' => 'screen', '//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css' => 'screen', '//cdn.jsdelivr.net/bootstrap.image-gallery/3.1.0/css/bootstrap-image-gallery.min.css' => 'screen', '//cdn.jsdelivr.net/blueimp-gallery/2.14.0/css/blueimp-gallery.min.css' => 'screen', '//cdn.jsdelivr.net/bootstrap.datepicker/0.1/css/datepicker.css' => 'screen', '//cdn.jsdelivr.net/chosen/1.0.0/chosen.css' => 'screen', 'css/styles.css?v=' . Core::VERSION => 'screen', 'css/slider.css' => 'screen'); if (Theme::$skin != 'default') { Theme::$styles = array_merge(Theme::$styles, array('css/color-' . Theme::$skin . '.css' => 'screen')); } Theme::$scripts['footer'] = array('//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js', '//netdna.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js', '//cdn.jsdelivr.net/chosen/1.0.0/chosen.jquery.min.js', Route::url('jslocalization', array('controller' => 'jslocalization', 'action' => 'chosen')), 'js/jquery.validate.min.js', Route::url('jslocalization', array('controller' => 'jslocalization', 'action' => 'validate')), '//cdn.jsdelivr.net/blueimp-gallery/2.14.0/js/jquery.blueimp-gallery.min.js', '//cdn.jsdelivr.net/bootstrap.image-gallery/3.1.0/js/bootstrap-image-gallery.min.js', '//cdn.jsdelivr.net/bootstrap.datepicker/0.1/js/bootstrap-datepicker.js', 'js/bootstrap-slider.js', 'js/favico-0.3.8.min.js', 'js/default.init.js?v=' . Core::VERSION, 'js/theme.init.js?v=' . Core::VERSION); /** * custom error alerts */ Form::$errors_tpl = '<div class="alert alert-danger"><a class="close" data-dismiss="alert">×</a> <h4 class="alert-heading">%s</h4> <ul>%s</ul></div>'; Form::$error_tpl = '<div class="alert "><a class="close" data-dismiss="alert">×</a>%s</div>'; Alert::$tpl = '<div class="alert alert-%s"> <a class="close" data-dismiss="alert" href="#">×</a> <h4 class="alert-heading">%s</h4>%s </div>';
<head> <meta charset="utf-8"> <title>Internal server error occured</title> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="description" content=""> <meta name="author" content=""> <!-- Le HTML5 shim, for IE6-8 support of HTML elements --> <!--[if lt IE 9]> <?php echo HTML::script('http://html5shim.googlecode.com/svn/trunk/html5.js'); ?> <![endif]--> <?php echo Theme::styles(array('http://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/css/bootstrap-combined.min.css' => 'screen'), 'default'); ?> </head> <body> <div class="container"> <div class="hero-unit"> <h2>Wow this seems to be an error...</h2> <p>Something went wrong while we are processing your request. You can try the following:</p> <ul>
/** * Theme Name: Ocean Free * Description: Clean free theme that includes full admin. It has publicity. Do not delete this theme, all the views depend in this theme. * Tags: HTML5, Admin, Free * Version: 2.1 * Author: Chema <*****@*****.**> , <*****@*****.**> * License: GPL v3 */ /** * placeholders for this theme */ Widgets::$theme_placeholders = array('footer', 'sidebar'); /** * styles and themes, loaded in this order */ Theme::$styles = array('http://netdna.bootstrapcdn.com/bootstrap/3.0.2/css/bootstrap.min.css' => 'screen', 'css/styles.css?v=2.1' => 'screen', 'http://cdn.jsdelivr.net/bootstrap.datepicker/0.1/css/datepicker.css' => 'screen', 'css/slider.css' => 'screen', 'http://cdn.jsdelivr.net/chosen/1.0.0/chosen.css' => 'screen', 'css/jquery.sceditor.min.css' => 'screen', 'http://blueimp.github.io/Gallery/css/blueimp-gallery.min.css' => 'screen', 'css/bootstrap-image-gallery.min.css' => 'screen'); Theme::$scripts['footer'] = array('http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js', 'http://netdna.bootstrapcdn.com/bootstrap/3.0.2/js/bootstrap.min.js', 'js/bootstrap-slider.js', 'http://cdn.jsdelivr.net/chosen/1.0.0/chosen.jquery.min.js', 'js/jquery.sceditor.min.js', 'http://blueimp.github.io/Gallery/js/jquery.blueimp-gallery.min.js', 'js/bootstrap-image-gallery.min.js', 'http://ajax.aspnetcdn.com/ajax/jquery.validate/1.11.1/jquery.validate.min.js', 'http://cdn.jsdelivr.net/bootstrap.datepicker/0.1/js/bootstrap-datepicker.js', 'js/theme.init.js?v=2.1'); /** * custom options for the theme * @var array */ Theme::$options = array(); /** * custom error alerts */ Form::$errors_tpl = '<div class="alert alert-danger"><a class="close" data-dismiss="alert">×</a> <h4 class="alert-heading">%s</h4> <ul>%s</ul></div>'; Form::$error_tpl = '<div class="alert "><a class="close" data-dismiss="alert">×</a>%s</div>'; Alert::$tpl = '<div class="alert alert-%s"> <a class="close" data-dismiss="alert" href="#">×</a>
/** * Initialize properties before running the controller methods (actions), * so they are available to our action. * @param string $template view to use as template * @return void */ public function before($template = NULL) { Theme::checker(); $this->maintenance(); //Gets a coupon if selected Model_Coupon::current(); if ($this->auto_render === TRUE) { // Load the template $this->template = $template === NULL ? 'oc-panel/main' : $template; //if its and ajx request I want only the content if (Core::get('rel') == 'ajax') { $this->template = 'oc-panel/content'; } $this->template = View::factory($this->template); // Initialize empty values $this->template->title = __('Panel') . ' - ' . core::config('general.site_name'); $this->template->meta_keywords = ''; $this->template->meta_description = ''; $this->template->meta_copyright = 'Open eShop ' . Core::VERSION; $this->template->header = ''; $this->template->content = ''; $this->template->footer = ''; $this->template->styles = array(); $this->template->scripts = array(); $this->template->user = Auth::instance()->get_user(); //non ajax request if (Core::get('rel') != 'ajax') { if (core::get('print') == 1) { $this->template->header = ''; $this->template->footer = ''; } else { $this->template->header = View::factory('oc-panel/header'); $this->template->footer = View::factory('oc-panel/footer'); } //other color if (Theme::get('admin_theme') == 'bootstrap') { Theme::$styles = array('//cdn.jsdelivr.net/bootswatch/3.3.6/paper/bootstrap.min.css' => 'screen', '//cdn.jsdelivr.net/bootstrap/3.3.6/css/bootstrap.min.css?v=print' => 'print', '//cdn.jsdelivr.net/chosen/1.0.0/chosen.css' => 'screen', '//cdn.jsdelivr.net/bootstrap.tagsinput/0.3.9/bootstrap-tagsinput.css' => 'screen', '//cdn.jsdelivr.net/sweetalert/1.1.3/sweetalert.css' => 'screen', 'css/jquery.sceditor.default.theme.min.css' => 'screen', 'css/loadingbar.css' => 'screen', 'css/icon-picker.min.css' => 'screen', 'css/font-awesome.min.css' => 'screen', 'css/summernote.css' => 'screen', 'css/admin-styles.css?v=' . Core::VERSION => 'screen'); } else { Theme::$styles = array('//cdn.jsdelivr.net/bootstrap/3.3.6/css/bootstrap.min.css' => 'screen', '//cdn.jsdelivr.net/bootstrap/3.3.6/css/bootstrap.min.css?v=print' => 'print', '//cdn.jsdelivr.net/bootswatch/3.3.6/' . Theme::get('admin_theme', 'cerulean') . '/bootstrap.min.css' => 'screen', '//cdn.jsdelivr.net/chosen/1.0.0/chosen.css' => 'screen', '//cdn.jsdelivr.net/bootstrap.tagsinput/0.3.9/bootstrap-tagsinput.css' => 'screen', '//cdn.jsdelivr.net/sweetalert/1.1.3/sweetalert.css' => 'screen', 'css/jquery.sceditor.default.theme.min.css' => 'screen', 'css/loadingbar.css' => 'screen', 'css/icon-picker.min.css' => 'screen', 'css/font-awesome.min.css' => 'screen', 'css/summernote.css' => 'screen', 'css/admin-styles.css?v=' . Core::VERSION => 'screen'); } Theme::$scripts['footer'] = array('//code.jquery.com/jquery-1.10.2.min.js', '//cdn.jsdelivr.net/bootstrap/3.3.6/js/bootstrap.min.js', '//cdn.jsdelivr.net/chosen/1.0.0/chosen.jquery.min.js', Route::url('jslocalization', array('controller' => 'jslocalization', 'action' => 'chosen')), (Kohana::$environment !== Kohana::DEVELOPMENT ? 'market.' . Core::DOMAIN . '' : 'eshop.lo') . '/embed.js', 'js/oc-panel/theme.init.js?v=' . Core::VERSION, 'js/jquery.sceditor.bbcode.min.js', 'js/summernote.min.js', 'js/summernote-ext-video.js', 'js/jquery.validate.min.js', Route::url('jslocalization', array('controller' => 'jslocalization', 'action' => 'validate')), 'js/jquery.cookie.min.js', 'js/iconPicker.min.js', 'js/oc-panel/sidebar.js?v=' . Core::VERSION, '//cdn.jsdelivr.net/bootstrap.tagsinput/0.3.9/bootstrap-tagsinput.min.js', '//cdn.jsdelivr.net/sweetalert/1.1.3/sweetalert.min.js', 'js/jquery.bootgrid.min.js', 'js/query.bootgrid.fa.min.js', 'js/form.js?v=' . Core::VERSION); } } }
/** * Initialize properties before running the controller methods (actions), * so they are available to our action. * @param string $template view to use as template * @return void */ public function before($template = NULL) { Theme::checker(); $this->maintenance(); $this->private_site(); if ($this->auto_render === TRUE) { // Load the template $this->template = $template === NULL ? 'oc-panel/main' : $template; //if its and ajx request I want only the content if (Core::get('rel') == 'ajax') { $this->template = 'oc-panel/content'; } $this->template = View::factory($this->template); // Initialize empty values $this->template->title = __('Panel') . ' - ' . core::config('general.site_name'); $this->template->meta_keywords = ''; $this->template->meta_description = ''; $this->template->meta_copyright = 'Open Classifieds ' . Core::VERSION; $this->template->header = ''; $this->template->content = ''; $this->template->footer = ''; $this->template->styles = array(); $this->template->scripts = array(); $this->template->user = Auth::instance()->get_user(); //non ajax request if (Core::get('rel') != 'ajax') { $this->template->header = View::factory('oc-panel/header'); $this->template->footer = View::factory('oc-panel/footer'); /** * custom options for the theme * @var array */ Theme::$options = Theme::get_options(); //we load earlier the theme since we need some info Theme::load(); if (Theme::get('cdn_files') == FALSE) { //other color if (Theme::get('admin_theme') != 'bootstrap' and Theme::get('admin_theme') != '') { $theme_css = array('css/style.css' => 'screen'); } else { $theme_css = array('css/style.css' => 'screen'); } $common_css = array('css/other.css' => 'screen'); Theme::$styles = array_merge($common_css, $theme_css); Theme::$scripts['footer'] = array('js/jquery.min.js', 'js/jquery.cookie.min.js', 'js/iconPicker.min.js', 'js/jquery.sceditor.bbcode.min.js', 'js/summernote.min.js', 'js/bootstrap.min.js', 'js/select2.min.js', 'js/mousetrap.min.js', 'js/bootstrap-tour.min.js', Route::url('jslocalization', array('controller' => 'jslocalization', 'action' => 'bstour')), 'js/oc-panel/tour.js', Route::url('jslocalization', array('controller' => 'jslocalization', 'action' => 'select2')), 'http://' . (Kohana::$environment !== Kohana::DEVELOPMENT ? 'market.' . Core::DOMAIN . '' : 'eshop.lo') . '/embed.js', 'js/sweet-alert.min.js', 'js/favico.min.js', 'js/bootstrap-colorpicker.min.js', 'js/jquery.bootgrid.min.js', 'js/query.bootgrid.fa.min.js', 'js/oc-panel/metismenu.min.js', 'js/oc-panel/fastclick.min.js', 'js/oc-panel/theme.init.js?v=' . Core::VERSION, 'js/oc-panel/sidebar.js?v=' . Core::VERSION); } else { //other color if (Theme::get('admin_theme') != 'bootstrap' and Theme::get('admin_theme') != '') { $theme_css = array('css/style.css' => 'screen'); } else { $theme_css = array('css/style.css?v=' . Core::VERSION => 'screen'); } $common_css = array('css/other.css?v=' . Core::VERSION => 'screen'); Theme::$styles = array_merge($theme_css, $common_css); Theme::$scripts['footer'] = array('//cdn.jsdelivr.net/jquery/1.12.3/jquery.min.js', '//cdn.jsdelivr.net/jquery.cookie/1.4.1/jquery.cookie.min.js', 'js/iconPicker.min.js', 'js/jquery.sceditor.bbcode.min.js', '//cdn.jsdelivr.net/summernote/0.8.1/summernote.min.js', '//cdn.jsdelivr.net/bootstrap/3.3.6/js/bootstrap.min.js', '//cdn.jsdelivr.net/select2/4.0.3/js/select2.min.js', '//cdn.jsdelivr.net/mousetrap/1.6.0/mousetrap.min.js', 'js/bootstrap-tour.min.js', Route::url('jslocalization', array('controller' => 'jslocalization', 'action' => 'bstour')), 'js/oc-panel/tour.js', Route::url('jslocalization', array('controller' => 'jslocalization', 'action' => 'select2')), 'http://' . (Kohana::$environment !== Kohana::DEVELOPMENT ? 'market.' . Core::DOMAIN . '' : 'eshop.lo') . '/embed.js', 'js/sweet-alert.min.js', 'js/favico.min.js', 'js/bootstrap-colorpicker.min.js', 'js/jquery.bootgrid.min.js', 'js/query.bootgrid.fa.min.js', 'js/oc-panel/metismenu.min.js', 'js/oc-panel/fastclick.min.js', 'js/oc-panel/theme.init.js?v=' . Core::VERSION, 'js/oc-panel/sidebar.js?v=' . Core::VERSION); } } } }