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');
176 if (!isset($a_attribs[
"sound_directory"]))
178 $a_attribs[
"sound_directory"] =
"";
181 if (!isset($a_attribs[
"browsers"]))
183 $a_attribs[
"browsers"] =
"";
189 $this->template_name = $a_attribs[
"name"];
193 $this->styles[$a_attribs[
"id"]] =
194 array(
"id" => $a_attribs[
"id"],
195 "name" => $a_attribs[
"name"],
196 "css_file" => $a_attribs[
"id"].
".css",
197 "image_directory" => $a_attribs[
"image_directory"],
198 "sound_directory" => $a_attribs[
"sound_directory"]
201 explode(
",", $a_attribs[
"browsers"]);
202 foreach ($browsers as $val)
204 $this->styles[$a_attribs[
"id"]][
"browsers"][] = trim($val);
221 if ($skin ==
"default")
223 if (is_file(
"./templates/".$skin.
"/template.xml") &&
224 is_file(
"./templates/".$skin.
"/".$style.
".css")
232 if (is_file(
"./Customizing/global/skin/".$skin.
"/template.xml") &&
233 is_file(
"./Customizing/global/skin/".$skin.
"/".$style.
".css")
251 if ($skin ==
"default")
253 if (is_file(
"./templates/".$skin.
"/template.xml"))
260 if (is_file(
"./Customizing/global/skin/".$skin.
"/template.xml"))
278 $a_data = preg_replace(
"/\n/",
"",$a_data);
279 $a_data = preg_replace(
"/\t+/",
"",$a_data);
283 switch($this->current_tag)