當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。