本文整理汇总了PHP中Theme::options方法的典型用法代码示例。如果您正苦于以下问题:PHP Theme::options方法的具体用法?PHP Theme::options怎么用?PHP Theme::options使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Theme
的用法示例。
在下文中一共展示了Theme::options方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: before
/**
* 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/' . Theme::get('admin_theme') . '-bootstrap.min.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/chosen.jquery.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' => '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/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('//cdn.jsdelivr.net/bootswatch/3.3.6/' . Theme::get('admin_theme') . '/bootstrap.min.css' => 'screen');
} else {
$theme_css = array('css/style.css' => 'screen');
}
$common_css = array('css/other.css' => '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/chosen/1.0.0/chosen.jquery.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' => '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', '//cdn.jsdelivr.net/gmaps/0.4.15/gmaps.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);
}
}
}
}
示例2: array
* Theme Name: Kamaleon Free
* Description: Free theme, HTML5. Default base, link on footer.
* Tags: HTML5, Advanced Confiuration, prettyPhoto, Slider.
* Version: 2.2.0
* Author: Chema <chema@open-classifieds.com>
* 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>';
示例3: action_license
/**
* theme selector
* @return [view]
*/
public function action_license()
{
$theme = $this->request->param('id', Theme::$theme);
// save only changed values
if (core::request('license')) {
if (Theme::license(core::request('license'), $theme) == TRUE) {
//activating a mobile theme
if (in_array($theme, array_keys(Theme::get_installed_themes(TRUE)))) {
Theme::set_mobile_theme($theme);
} else {
Theme::set_theme($theme);
}
Theme::$options = Theme::get_options($theme);
Theme::load($theme);
Theme::$data['license'] = core::request('license');
Theme::$data['license_date'] = time() + 7 * 24 * 60 * 60;
Theme::save($theme);
Alert::set(Alert::SUCCESS, __('Theme activated, thanks.'));
$this->redirect(Route::url('oc-panel', array('controller' => 'theme', 'action' => 'options')));
} else {
Alert::set(Alert::INFO, __('There was an error activating your license.'));
}
}
Breadcrumbs::add(Breadcrumb::factory()->set_title(__('Theme License')));
$this->template->title = __('Theme License');
$this->template->scripts['footer'][] = 'js/oc-panel/license.js';
$this->template->content = View::factory('oc-panel/pages/themes/license', array('theme' => Theme::$theme));
}
示例4: array
* PHP Based Content Management System and Framework
*
* @package GeniXCMS
* @since 0.0.1 build date 20150312
* @version 0.0.6
* @link https://github.com/semplon/GeniXCMS
* @link http://genixcms.org
* @author Puguh Wijayanto (www.metalgenix.com)
* @copyright 2014-2015 Puguh Wijayanto
* @license http://www.opensource.org/licenses/mit-license.php MIT
*
*/
if (isset($_GET['view']) && $_GET['view'] == 'options') {
$data['sitetitle'] = THEMES;
Theme::admin('header', $data);
Theme::options(Options::get('themes'));
Theme::admin('footer');
} else {
if (isset($_POST['upload'])) {
if (!Token::isExist($_POST['token'])) {
$alertred[] = TOKEN_NOT_EXIST;
}
if (!isset($_FILES['theme']['name']) || $_FILES['theme']['name'] == "") {
$alertred[] = NOFILE_UPLOADED;
}
if (!isset($alertred)) {
//Mod::activate($_GET['themes']);
$path = "/inc/themes/";
$allowed = array('zip');
$theme = Upload::go('theme', $path, $allowed);
//print_r($theme);
示例5: array
* 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>
<h4 class="alert-heading">%s</h4>%s
</div>';
/**
* Theme Functions
*
*/