/**
  * Returns the path of the css-File.
  *
  * @param string $a_filename
  *
  * @return string
  */
 protected static function getTemplatePath($a_filename)
 {
     $module_path = "Customizing/global/plugins/Services/Repository/RepositoryObject/RoomSharing/";
     if (ilStyleDefinition::getCurrentSkin() != "default") {
         $fname = "./Customizing/global/skin/" . ilStyleDefinition::getCurrentSkin() . "/" . $module_path . basename($a_filename);
     }
     if ($fname == "" || !file_exists($fname)) {
         $fname = "./" . $module_path . "templates/default/" . basename($a_filename);
     }
     return $fname;
 }
 protected static function getTemplatePath($a_filename)
 {
     $module_path = "Modules/Test/";
     // use ilStyleDefinition instead of account to get the current skin
     include_once "Services/Style/classes/class.ilStyleDefinition.php";
     if (ilStyleDefinition::getCurrentSkin() != "default") {
         $fname = "./Customizing/global/skin/" . ilStyleDefinition::getCurrentSkin() . "/" . $module_path . basename($a_filename);
     }
     if ($fname == "" || !file_exists($fname)) {
         $fname = "./" . $module_path . "templates/default/" . basename($a_filename);
     }
     return $fname;
 }
示例#3
0
 /**
  * builds a full template path with template and module name
  *
  * @param	string		$a_tplname		template name
  * @param	boolean		$in_module		should be set to true, if template file is in module subdirectory
  *
  * @return	string		full template path
  */
 function getTemplatePath($a_tplname, $a_in_module = false, $a_plugin = false)
 {
     global $ilias, $ilCtrl;
     $fname = "";
     // if baseClass functionality is used (ilias.php):
     // get template directory from ilCtrl
     if (!empty($_GET["baseClass"]) && $a_in_module === true) {
         $a_in_module = $ilCtrl->getModuleDir();
     }
     if (strpos($a_tplname, "/") === false) {
         $module_path = "";
         //$fname = $ilias->tplPath;
         if ($a_in_module) {
             if ($a_in_module === true) {
                 $module_path = ILIAS_MODULE . "/";
             } else {
                 $module_path = $a_in_module . "/";
             }
         }
         // use ilStyleDefinition instead of account to get the current skin
         include_once "Services/Style/classes/class.ilStyleDefinition.php";
         if (ilStyleDefinition::getCurrentSkin() != "default") {
             $fname = "./Customizing/global/skin/" . ilStyleDefinition::getCurrentSkin() . "/" . $module_path . basename($a_tplname);
         }
         if ($fname == "" || !file_exists($fname)) {
             $fname = "./" . $module_path . "templates/default/" . basename($a_tplname);
         }
     } else {
         $fname = $a_tplname;
     }
     return $fname;
 }
 /**
  * get full style sheet file name (path inclusive) of current user
  *
  * @access	public
  * @static
  * 
  */
 public static function getNewContentStyleSheetLocation($mode = "output")
 {
     global $ilias;
     // add version as parameter to force reload for new releases
     if ($mode != "filesystem") {
         $vers = str_replace(" ", "-", $ilias->getSetting("ilias_version"));
         $vers = "?vers=" . str_replace(".", "-", $vers);
     }
     // use ilStyleDefinition instead of account to get the current skin and style
     require_once "./Services/Style/classes/class.ilStyleDefinition.php";
     if (ilStyleDefinition::getCurrentSkin() == "default") {
         $in_style = "./templates/" . ilStyleDefinition::getCurrentSkin() . "/" . ilStyleDefinition::getCurrentStyle() . "_cont.css";
     } else {
         $in_style = "./Customizing/global/skin/" . ilStyleDefinition::getCurrentSkin() . "/" . ilStyleDefinition::getCurrentStyle() . "_cont.css";
     }
     if (is_file("./" . $in_style)) {
         return $in_style . $vers;
     } else {
         return "templates/default/delos_cont.css" . $vers;
     }
 }