当前位置: 首页>>代码示例>>PHP>>正文


PHP theme::load_themes方法代码示例

本文整理汇总了PHP中theme::load_themes方法的典型用法代码示例。如果您正苦于以下问题:PHP theme::load_themes方法的具体用法?PHP theme::load_themes怎么用?PHP theme::load_themes使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在theme的用法示例。


在下文中一共展示了theme::load_themes方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: __construct

 /**
  * Attempts to load a view and pre-load view data.
  *
  * @throws  Kohana_Exception  if the requested view cannot be found
  * @param   string  $name view name
  * @param   string  $page_type page type: album, photo, tags, etc
  * @param   string  $theme_name view name
  * @return  void
  */
 public function __construct($name, $page_type)
 {
     $theme_name = module::get_var("gallery", "active_site_theme");
     if (!file_exists("themes/{$theme_name}")) {
         module::set_var("gallery", "active_site_theme", "default");
         theme::load_themes();
         Kohana::log("error", "Unable to locate theme '{$theme_name}', switching to default theme.");
     }
     parent::__construct($name);
     $this->theme_name = module::get_var("gallery", "active_site_theme");
     if (user::active()->admin) {
         $this->theme_name = Input::instance()->get("theme", $this->theme_name);
     }
     $this->item = null;
     $this->tag = null;
     $this->set_global("theme", $this);
     $this->set_global("user", user::active());
     $this->set_global("page_type", $page_type);
     $this->set_global("page_title", null);
     if ($page_type == "album") {
         $this->set_global("thumb_proportion", $this->thumb_proportion());
     }
     $maintenance_mode = Kohana::config("core.maintenance_mode", false, false);
     if ($maintenance_mode) {
         message::warning(t("This site is currently in maintenance mode"));
     }
 }
开发者ID:scarygary,项目名称:gallery3,代码行数:36,代码来源:Theme_View.php

示例2: gallery_ready

 /**
  * Initialization.
  */
 static function gallery_ready()
 {
     if (!get_cfg_var("date.timezone")) {
         if (!(rand() % 4)) {
             Kohana_Log::add("error", "date.timezone setting not detected in " . get_cfg_var("cfg_file_path") . " falling back to UTC.  " . "Consult http://php.net/manual/function.get-cfg-var.php for help.");
         }
     }
     identity::load_user();
     theme::load_themes();
     locales::set_request_locale();
 }
开发者ID:HarriLu,项目名称:gallery3,代码行数:14,代码来源:gallery_event.php

示例3: __construct

 /**
  * Attempts to load a view and pre-load view data.
  *
  * @throws  Kohana_Exception  if the requested view cannot be found
  * @param   string  $name view name
  * @param   string  $theme_name view name
  * @return  void
  */
 public function __construct($name)
 {
     $theme_name = module::get_var("gallery", "active_site_theme");
     if (!file_exists("themes/{$theme_name}")) {
         module::set_var("gallery", "active_site_theme", "admin_default");
         theme::load_themes();
         Kohana::log("error", "Unable to locate theme '{$theme_name}', switching to default theme.");
     }
     parent::__construct($name);
     $this->theme_name = module::get_var("gallery", "active_admin_theme");
     if (user::active()->admin) {
         $this->theme_name = Input::instance()->get("theme", $this->theme_name);
     }
     $this->sidebar = "";
     $this->set_global("theme", $this);
     $this->set_global("user", user::active());
 }
开发者ID:xafr,项目名称:gallery3,代码行数:25,代码来源:Admin_View.php

示例4: gallery_ready

 /**
  * Initialization.
  */
 static function gallery_ready()
 {
     identity::load_user();
     theme::load_themes();
     locales::set_request_locale();
 }
开发者ID:andyst,项目名称:gallery3,代码行数:9,代码来源:gallery_event.php


注:本文中的theme::load_themes方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。