33 require_once(
"./classes/class.ilSaxParser.php");
49 if ($a_template_id ==
"")
51 $a_template_id = $ilias->account->skin;
54 if ($a_template_id ==
"default")
76 if (is_array($this->styles))
88 return $this->template_name;
94 return $this->styles[$a_id];
100 return $this->styles[$a_id][
"name"];
106 return $this->styles[$a_id][
"image_directory"];
111 return $this->styles[$a_id][
"sound_directory"];
118 $skins[] = array(
"id" =>
"default");
119 if ($dp = @opendir(
"./Customizing/global/skin"))
121 while ((
$file = readdir($dp)) !=
false)
124 if (is_dir(
"./Customizing/global/skin/".
$file) &&
$file !=
"." &&
$file !=
".." &&
$file !=
"CVS"
127 if (is_file(
"./Customizing/global/skin/".
$file.
"/template.xml"))
161 xml_set_object($a_xml_parser,$this);
162 xml_set_element_handler($a_xml_parser,
'handlerBeginTag',
'handlerEndTag');
163 xml_set_character_data_handler($a_xml_parser,
'handlerCharacterData');
179 $this->template_name = $a_attribs[
"name"];
183 $this->styles[$a_attribs[
"id"]] =
184 array(
"id" => $a_attribs[
"id"],
185 "name" => $a_attribs[
"name"],
186 "css_file" => $a_attribs[
"id"].
".css",
187 "image_directory" => $a_attribs[
"image_directory"],
188 "sound_directory" => $a_attribs[
"sound_directory"]
191 explode(
",", $a_attribs[
"browsers"]);
192 foreach ($browsers as $val)
194 $this->styles[$a_attribs[
"id"]][
"browsers"][] = trim($val);
211 if ($skin ==
"default")
213 if (is_file(
"./templates/".$skin.
"/template.xml") &&
214 is_file(
"./templates/".$skin.
"/".$style.
".css")
222 if (is_file(
"./Customizing/global/skin/".$skin.
"/template.xml") &&
223 is_file(
"./Customizing/global/skin/".$skin.
"/".$style.
".css")
241 if ($skin ==
"default")
243 if (is_file(
"./templates/".$skin.
"/template.xml"))
250 if (is_file(
"./Customizing/global/skin/".$skin.
"/template.xml"))
268 $a_data = preg_replace(
"/\n/",
"",$a_data);
269 $a_data = preg_replace(
"/\t+/",
"",$a_data);
273 switch($this->current_tag)