4 require_once(
"./Services/COPage/classes/class.ilPageContent.php");
33 "quot" =>
"Quotation",
51 return self::$bb_tags;
61 return array_flip(self::$bb_tags);
73 parent::setNode($a_node);
75 $childs = $a_node->child_nodes();
76 for ($i=0; $i<count($childs); $i++)
78 if ($childs[$i]->node_name() ==
"Paragraph")
80 $this->par_node = $childs[$i];
94 $this->par_node = $this->dom->create_element(
"Paragraph");
95 $this->par_node = $this->node->append_child($this->par_node);
96 $this->par_node->set_attribute(
"Language",
"");
97 $node->append_child ($this->node);
108 $this->par_node = $this->dom->create_element(
"Paragraph");
109 $this->par_node = $this->node->append_child($this->par_node);
110 $this->par_node->set_attribute(
"Language",
"");
123 if($succ_node =
$node->next_sibling())
125 $this->node = $succ_node->insert_before($this->node, $succ_node);
129 $parent_node =
$node->parent_node();
130 $this->node = $parent_node->append_child($this->node);
132 $this->par_node = $this->dom->create_element(
"Paragraph");
133 $this->par_node = $this->node->append_child($this->par_node);
134 $this->par_node->set_attribute(
"Language",
"");
144 function create(&$a_pg_obj, $a_hier_id, $a_pc_id =
"")
148 $this->node = $this->dom->create_element(
"PageContent");
151 $a_pg_obj->insertContent($this, $a_hier_id,
IL_INSERT_AFTER, $a_pc_id);
153 $this->par_node = $this->dom->create_element(
"Paragraph");
154 $this->par_node = $this->node->append_child($this->par_node);
155 $this->par_node->set_attribute(
"Language",
"");
164 function setText($a_text, $a_auto_split =
false)
166 if (!is_array($a_text))
184 $check.=
"<Paragraph>".$t[
"text"].
"</Paragraph>";
188 $temp_dom =
domxml_open_mem(
'<?xml version="1.0" encoding="UTF-8"?><Paragraph>'.$check.
'</Paragraph>',
189 DOMXML_LOAD_PARSING,
$error);
195 $temp_dom =
domxml_open_mem(
'<?xml version="1.0" encoding="UTF-8"?><Paragraph>'.
$text[0][
"text"].
'</Paragraph>',
196 DOMXML_LOAD_PARSING,
$error);
199 $children = $this->par_node->child_nodes();
200 for($i=0; $i<count($children); $i++)
202 $this->par_node->remove_child($children[$i]);
207 $path =
"//Paragraph";
209 if (count(
$res->nodeset) == 1)
211 $new_par_node =
$res->nodeset[0];
212 $new_childs = $new_par_node->child_nodes();
214 for($i=0; $i<count($new_childs); $i++)
216 $cloned_child = $new_childs[$i]->clone_node(
true);
217 $this->par_node->append_child($cloned_child);
223 if ((count(
$text) > 1) && (substr($orig_characteristic, 0, 8) ==
"Headline"))
225 $orig_characteristic =
"";
227 if (
$text[0][
"level"] > 0)
229 $this->par_node->set_attribute(
"Characteristic",
'Headline'.
$text[0][
"level"]);
237 for ($i=1; $i<count(
$text); $i++)
242 $next_par->createAfter($c_node);
244 if (
$text[$i][
"level"] > 0)
246 $next_par->setCharacteristic(
"Headline".
$text[$i][
"level"]);
250 $next_par->setCharacteristic($orig_characteristic);
252 $ok = $next_par->setText(
$text[$i][
"text"],
false);
253 $c_node = $next_par->node;
262 $text = str_replace(
"<br>",
"\n", $check);
265 $text = str_replace(
"</SimpleListItem>",
"</SimpleListItem>\n",
$text);
266 $text = str_replace(
"<SimpleBulletList>",
"\n<SimpleBulletList>",
$text);
267 $text = str_replace(
"<SimpleNumberedList>",
"\n<SimpleNumberedList>",
$text);
268 $text = str_replace(
"<Paragraph>\n",
"<Paragraph>",
$text);
269 $text = str_replace(
"</Paragraph>",
"</Paragraph>\n",
$text);
270 include_once(
"./Services/Dom/classes/class.ilDomDocument.php");
271 $doc =
new ilDOMDocument();
272 $text =
'<?xml version="1.0" encoding="UTF-8"?><Paragraph>'.$text.
'</Paragraph>';
274 $this->success = $doc->loadXML(
$text);
279 $e = str_replace(
" in Entity",
"", $e);
284 $estr.=
"<br />".$text;
298 if (is_object($this->par_node))
301 $childs = $this->par_node->child_nodes();
302 for($i=0; $i<count($childs); $i++)
304 $content .= $this->dom->dump_node($childs[$i]);
319 $childs = $this->par_node->parent_node()->parent_node()->child_nodes();
325 for($i=0; $i<count($childs); $i++)
327 $pchilds = $childs[$i]->child_nodes();
328 if ($pchilds[0]->node_name() ==
"Paragraph" &&
329 $pchilds[0]->get_attribute(
"Characteristic") !=
"Code")
331 $cur_seq[] = $childs[$i];
334 if ($childs[$i]->get_attribute(
"PCID") == $pc_id &&
335 $childs[$i]->get_attribute(
"HierId") ==
$hier_id)
357 foreach ($seq as $p_node)
359 $ids.= $id_sep.$p_node->get_attribute(
"HierId").
":".$p_node->get_attribute(
"PCID");
360 $po = $a_pg_obj->getContentObject($p_node->get_attribute(
"HierId"),
361 $p_node->get_attribute(
"PCID"));
362 $s_text = $po->getText();
363 $s_text = $po->xml2output($s_text,
true,
false);
364 $char = $po->getCharacteristic();
375 return $ids.$content;
387 $this->par_node->set_attribute(
"Characteristic", $a_char);
391 if ($this->par_node->has_attribute(
"Characteristic"))
393 $this->par_node->remove_attribute(
"Characteristic");
405 if (is_object($this->par_node))
407 return $this->par_node->get_attribute(
"Characteristic");
419 $this->par_node->set_attribute(
"SubCharacteristic", $a_char);
423 if ($this->par_node->has_attribute(
"SubCharacteristic"))
425 $this->par_node->remove_attribute(
"SubCharacteristic");
437 return $this->par_node->get_attribute(
"AutoIndent");
444 $this->par_node->set_attribute(
"AutoIndent", $a_char);
448 if ($this->par_node->has_attribute(
"AutoIndent"))
450 $this->par_node->remove_attribute(
"AutoIndent");
460 return $this->par_node->get_attribute(
"SubCharacteristic");
471 $this->par_node->set_attribute(
"DownloadTitle", $a_char);
475 if ($this->par_node->has_attribute(
"DownloadTitle"))
477 $this->par_node->remove_attribute(
"DownloadTitle");
487 return $this->par_node->get_attribute(
"DownloadTitle");
496 $a_char = empty($a_char)?
"n":$a_char;
498 $this->par_node->set_attribute(
"ShowLineNumbers", $a_char);
507 return $this->par_node->get_attribute(
"ShowLineNumbers");
515 $this->par_node->set_attribute(
"Language", $a_lang);
523 return $this->par_node->get_attribute(
"Language");
526 function input2xml($a_text, $a_wysiwyg = 0, $a_handle_lists =
true)
541 $a_text = preg_replace(
'/\['.$a_bb.
'\]/i',
"<".$a_tag.
">",$a_text);
542 $a_text = preg_replace(
'/\[\/'.$a_bb.
'\]/i',
"</".$a_tag.
">",$a_text);
550 static function _input2xml($a_text, $a_lang, $a_wysiwyg = 0, $a_handle_lists =
true)
559 $a_text = str_replace(
"<br />", chr(10), $a_text);
564 $a_text = trim($a_text);
571 $a_text = str_replace(
"&",
"&",$a_text);
573 $a_text = str_replace(
"<",
"<",$a_text);
574 $a_text = str_replace(
">",
">",$a_text);
577 $a_text = preg_replace(
'/<([\s\/]*?PageTurn.*?)>/i',
"<$1>",$a_text);
578 $a_text = preg_replace(
'/<([\s\/]*?BibItemIdentifier.*?)>/i',
"<$1>",$a_text);
589 $a_text = str_replace(chr(13).chr(10),
"<br />",$a_text);
590 $a_text = str_replace(chr(13),
"<br />", $a_text);
591 $a_text = str_replace(chr(10),
"<br />", $a_text);
598 foreach (self::getBBMap() as $bb => $tag)
601 $a_text = str_replace(
"[".$bb.
"][/".$bb.
"]",
"", $a_text);
604 $a_text = self::replaceBBCode($a_text, $bb, $tag);
607 $a_text = self::intLinks2xml($a_text);
610 $ws=
"[ \t\r\f\v\n]*";
612 while (preg_match(
"~\[(xln$ws(url$ws=$ws\"([^\"])*\")$ws(target$ws=$ws(\"(Glossary|FAQ|Media)\"))?$ws)\]\[\/xln\]~i", $a_text, $found))
614 $a_text = str_replace($found[0],
"",$a_text);
616 while (preg_match(
'~\[(xln$ws(url$ws=$ws(([^]])*)))$ws\]\[\/xln\]~i', $a_text, $found))
618 $a_text = str_replace($found[0],
"",$a_text);
621 while (preg_match(
"~\[(xln$ws(url$ws=$ws\"([^\"])*\")$ws(target$ws=$ws(\"(Glossary|FAQ|Media)\"))?$ws)\]~i", $a_text, $found))
624 if (isset($attribs[
"url"]))
628 if (in_array($a2[
"target"],
array(
"FAQ",
"Glossary",
"Media")))
630 $tstr =
' TargetFrame="'.$a2[
"target"].
'"';
632 $a_text = str_replace(
"[".$found[1].
"]",
"<ExtLink Href=\"".$attribs[
"url"].
"\"$tstr>", $a_text);
636 $a_text = str_replace(
"[".$found[1].
"]",
"[error: xln".$found[1].
"]",$a_text);
641 while (preg_match(
'~\[(xln$ws(url$ws=$ws(([^]])*)))$ws\]~i', $a_text, $found))
645 $a_text = str_replace(
"[".$found[1].
"]",
"<ExtLink Href=\"".$found[3].
"\">", $a_text);
649 $a_text = str_replace(
"[".$found[1].
"]",
"[error: xln".$found[1].
"]",$a_text);
652 $a_text = preg_replace(
'~\[\/xln\]~i',
"</ExtLink>",$a_text);
655 $ws=
"[ \t\r\f\v\n]*";
656 while (preg_match(
"~\[(anc$ws(name$ws=$ws\"([^\"])*\")$ws)\]~i", $a_text, $found))
659 $a_text = str_replace(
"[".$found[1].
"]",
"<Anchor Name=\"".$attribs[
"name"].
"\">", $a_text);
661 $a_text = preg_replace(
"~\[\/anc\]~i",
"</Anchor>",$a_text);
664 while (preg_match(
"~\[(marked$ws(class$ws=$ws\"([^\"])*\")$ws)\]~i", $a_text, $found))
667 if (isset($attribs[
"class"]))
669 $a_text = str_replace(
"[".$found[1].
"]",
"<Marked Class=\"".$attribs[
"class"].
"\">", $a_text);
673 $a_text = str_replace(
"[".$found[1].
"]",
"[error:marked".$found[1].
"]",$a_text);
676 $a_text = preg_replace(
'~\[\/marked\]~i',
"</Marked>",$a_text);
691 global $objDefinition;
693 $rtypes = $objDefinition->getAllRepositoryTypes();
697 $ws=
"[ \t\r\f\v\n]*";
698 $ltypes =
"page|chap|term|media|obj|dfile|sess|wpage|".implode($rtypes,
"|");
700 while (preg_match(
'~\[(iln'.$ws.
'((inst'.$ws.
'='.$ws.
'([\"0-9])*)?'.$ws.
701 "((".$ltypes.
")$ws=$ws([\"0-9])*)$ws".
702 "(target$ws=$ws(\"(New|FAQ|Media)\"))?$ws(anchor$ws=$ws(\"([^\"])*\"))?$ws))\]\[\/iln\]~i", $a_text, $found))
704 $a_text = str_replace($found[0],
"",$a_text);
706 while (preg_match(
'~\[(iln'.$ws.
'((inst'.$ws.
'='.$ws.
'([\"0-9])*)?'.$ws.
707 "((".$ltypes.
")$ws=$ws([\"0-9])*)$ws".
708 "(target$ws=$ws(\"(New|FAQ|Media)\"))?$ws(anchor$ws=$ws(\"([^\"])*\"))?$ws))\]~i", $a_text, $found))
711 $inst_str = $attribs[
"inst"];
713 if (isset($attribs[
"page"]))
716 if (!empty($found[10]))
718 $tframestr =
" TargetFrame=\"".$found[10].
"\" ";
721 if ($attribs[
"anchor"] !=
"")
723 $ancstr =
' Anchor="'.$attribs[
"anchor"].
'" ';
725 $a_text = preg_replace(
'/\['.$found[1].
'\]/i',
726 "<IntLink Target=\"il_".$inst_str.
"_pg_".$attribs[page].
"\" Type=\"PageObject\"".$tframestr.$ancstr.
">", $a_text);
729 else if (isset($attribs[
"chap"]))
731 if (!empty($found[10]))
733 $tframestr =
" TargetFrame=\"".$found[10].
"\" ";
739 $a_text = preg_replace(
'/\['.$found[1].
'\]/i',
740 "<IntLink Target=\"il_".$inst_str.
"_st_".$attribs[chap].
"\" Type=\"StructureObject\"".$tframestr.
">", $a_text);
743 else if (isset($attribs[
"term"]))
748 $tframestr =
" TargetFrame=\"New\" ";
752 $tframestr =
" TargetFrame=\"Glossary\" ";
755 $a_text = preg_replace(
'/\['.$found[1].
'\]/i',
756 "<IntLink Target=\"il_".$inst_str.
"_git_".$attribs[term].
"\" Type=\"GlossaryItem\" $tframestr>", $a_text);
759 else if (isset($attribs[
"wpage"]))
772 $a_text = preg_replace(
'/\['.$found[1].
'\]/i',
773 "<IntLink Target=\"il_".$inst_str.
"_wpage_".$attribs[wpage].
"\" Type=\"WikiPage\" $tframestr>", $a_text);
776 else if (isset($attribs[
"media"]))
778 if (!empty($found[10]))
780 $tframestr =
" TargetFrame=\"".$found[10].
"\" ";
781 $a_text = preg_replace(
'/\['.$found[1].
'\]/i',
782 "<IntLink Target=\"il_".$inst_str.
"_mob_".$attribs[media].
"\" Type=\"MediaObject\"".$tframestr.
">", $a_text);
786 $a_text = preg_replace(
'/\['.$found[1].
'\]/i',
787 "<IntLink Target=\"il_".$inst_str.
"_mob_".$attribs[media].
"\" Type=\"MediaObject\"/>", $a_text);
791 else if (isset($attribs[
"dfile"]))
793 $a_text = preg_replace(
'/\['.$found[1].
'\]/i',
794 "<IntLink Target=\"il_".$inst_str.
"_dfile_".$attribs[dfile].
"\" Type=\"File\">", $a_text);
800 foreach ($objDefinition->getAllRepositoryTypes() as
$t)
802 if (isset($attribs[
$t]))
804 $obj_id = $attribs[
$t];
807 if (isset($attribs[
"obj"]))
809 $obj_id = $attribs[
"obj"];
816 $a_text = preg_replace(
'/\['.$found[1].
'\]/i',
817 "<IntLink Target=\"il_".$inst_str.
"_obj_".$obj_id.
"\" Type=\"RepositoryItem\">", $a_text);
821 $a_text = preg_replace(
'/\['.$found[1].
'\]/i',
822 "<IntLink Target=\"il_".$inst_str.
"_".$found[6].
"_".$obj_id.
"\" Type=\"RepositoryItem\">", $a_text);
827 $a_text = preg_replace(
'/\['.$found[1].
'\]/i',
"[error: iln".$found[1].
"]",$a_text);
832 while (preg_match(
"~\[(iln$ws((inst$ws=$ws([\"0-9])*)?".$ws.
"media$ws=$ws([\"0-9])*)$ws)/\]~i", $a_text, $found))
835 $inst_str = $attribs[
"inst"];
836 $a_text = preg_replace(
'~\['.$found[1].
'/\]~i',
837 "<IntLink Target=\"il_".$inst_str.
"_mob_".$attribs[media].
"\" Type=\"MediaObject\"/>", $a_text);
841 while (preg_match(
"~\[(iln$ws((inst$ws=$ws([\"0-9])*)?".$ws.
"user$ws=$ws(\"([^\"])*)\")$ws)/\]~i", $a_text, $found))
844 $inst_str = $attribs[
"inst"];
845 include_once(
"./Services/User/classes/class.ilObjUser.php");
847 $a_text = preg_replace(
'~\['.$found[1].
'/\]~i',
848 "<IntLink Target=\"il_".$inst_str.
"_user_".$user_id.
"\" Type=\"User\"/>", $a_text);
851 $a_text = preg_replace(
'~\[\/iln\]~i',
"</IntLink>",$a_text);
865 $rows = explode(
"<br />", $a_text.
"<br />");
872 foreach ($rows as
$row)
875 if (str_replace(
"#",
"*", substr($row, 0, 3)) ==
"***")
879 else if (str_replace(
"#",
"*", substr($row, 0, 2)) ==
"**")
883 else if (str_replace(
"#",
"*", substr($row, 0, 1)) ==
"*")
889 if ($level < $old_level)
891 for ($i = $old_level; $i > $level; $i--)
893 $text.=
"</SimpleListItem></".$clist[$i].
">";
897 $text.=
"</SimpleListItem>";
900 else if ($old_level > 0 && $level > 0 && ($level == $old_level))
902 $text.=
"</SimpleListItem>";
904 else if (($level == $old_level) &&
$text !=
"")
910 if ($level > $old_level)
912 for($i = $old_level + 1; $i <= $level; $i++)
914 if (substr($row, $i - 1, 1) ==
"*")
916 $clist[$i] =
"SimpleBulletList";
920 $clist[$i] =
"SimpleNumberedList";
922 $text.=
"<".$clist[$i].
"><SimpleListItem>";
925 else if ($old_level > 0 && $level > 0)
927 $text.=
"<SimpleListItem>";
929 $text.= substr($row, $level);
935 if (substr(
$text, strlen(
$text) - 6) ==
"<br />")
953 "</SimpleListItem>",
"<SimpleListItem>",
"<SimpleListItem/>",
"<SimpleNumberedList>",
"</SimpleNumberedList>"));
955 $current_list =
array();
957 for ($i=0; $i<= count($segments); $i++)
959 if ($segments[$i] ==
"<SimpleBulletList>")
961 if (count($current_list) == 0)
965 array_push($current_list,
"*");
968 else if ($segments[$i] ==
"<SimpleNumberedList>")
970 if (count($current_list) == 0)
974 array_push($current_list,
"#");
977 else if ($segments[$i] ==
"</SimpleBulletList>")
979 array_pop($current_list);
982 else if ($segments[$i] ==
"</SimpleNumberedList>")
984 array_pop($current_list);
987 else if ($segments[$i] ==
"<SimpleListItem>")
991 else if ($segments[$i] ==
"</SimpleListItem>")
995 else if ($segments[$i] ==
"<SimpleListItem/>")
1000 $list_start =
false;
1002 foreach($current_list as $list)
1016 $list_start =
false;
1018 foreach($current_list as $list)
1023 $text.= $segments[$i];
1033 if ($segments[count($segments) - 1] ==
"</SimpleBulletList>" ||
1034 $segments[count($segments) - 1] ==
"</SimpleNumberedList>" &&
1035 substr(
$text, strlen(
$text) - 6) ==
"<br />")
1048 $segments =
array();
1050 $nothing_found =
false;
1051 while (!$nothing_found)
1053 $nothing_found =
true;
1055 foreach($a_needles as $needle)
1057 $pos = stripos($a_haystack, $needle);
1058 if (is_int($pos) && ($pos < $found || $found == -1))
1061 $found_needle = $needle;
1062 $nothing_found =
false;
1067 $segments[] = substr($a_haystack, 0, $found);
1068 $a_haystack = substr($a_haystack, $found);
1072 $segments[] = substr($a_haystack, 0, strlen($found_needle));
1073 $a_haystack = substr($a_haystack, strlen($found_needle));
1076 if ($a_haystack !=
"")
1078 $segments[] = $a_haystack;
1091 static function xml2output($a_text, $a_wysiwyg =
false, $a_replace_lists =
true)
1099 foreach (self::getBBMap() as $bb => $tag)
1101 $a_text = preg_replace(
'~<'.$tag.
'[^>]*>~i',
"[".$bb.
"]", $a_text);
1102 $a_text = preg_replace(
'~</'.$tag.
'>~i',
"[/".$bb.
"]", $a_text);
1103 $a_text = preg_replace(
'~<'.$tag.
'/>~i',
"[".$bb.
"][/".$bb.
"]", $a_text);
1107 if ($a_replace_lists)
1115 while (preg_match(
'~<IntLink('.$any.
')>~i', $a_text, $found))
1119 $target = explode(
"_", $attribs[
"Target"]);
1121 $inst_str = (!is_int(strpos($attribs[
"Target"],
"__")))
1122 ? $inst_str =
"inst=\"".
$target[1].
"\" " 1124 switch($attribs[
"Type"])
1127 $tframestr = (!empty($attribs[
"TargetFrame"]))
1128 ?
" target=\"".$attribs[
"TargetFrame"].
"\"" 1130 $ancstr = (!empty($attribs[
"Anchor"]))
1131 ?
' anchor="'.$attribs[
"Anchor"].
'"' 1133 $a_text = preg_replace(
'~<IntLink'.$found[1].
'>~i',
"[iln ".$inst_str.
"page=\"".
$target_id.
"\"$tframestr$ancstr]",$a_text);
1136 case "StructureObject":
1137 $tframestr = (!empty($attribs[
"TargetFrame"]))
1138 ?
" target=\"".$attribs[
"TargetFrame"].
"\"" 1140 $a_text = preg_replace(
'~<IntLink'.$found[1].
'>~i',
"[iln ".$inst_str.
"chap=\"".
$target_id.
"\"$tframestr]",$a_text);
1143 case "GlossaryItem":
1144 $tframestr = (empty($attribs[
"TargetFrame"]) || $attribs[
"TargetFrame"] ==
"Glossary")
1146 :
" target=\"".$attribs[
"TargetFrame"].
"\"";
1147 $a_text = preg_replace(
'~<IntLink'.$found[1].
'>~i',
"[iln ".$inst_str.
"term=\"".
$target_id.
"\"".$tframestr.
"]",$a_text);
1155 $a_text = preg_replace(
'~<IntLink'.$found[1].
'>~i',
"[iln ".$inst_str.
"wpage=\"".
$target_id.
"\"".$tframestr.
"]",$a_text);
1159 if (empty($attribs[
"TargetFrame"]))
1161 $a_text = preg_replace(
'~<IntLink'.$found[1].
'>~i',
"[iln ".$inst_str.
"media=\"".
$target_id.
"\"/]",$a_text);
1165 $a_text = preg_replace(
'~<IntLink'.$found[1].
'>~i',
"[iln media=\"".
$target_id.
"\"".
1166 " target=\"".$attribs[
"TargetFrame"].
"\"]",$a_text);
1171 case "RepositoryItem":
1172 if ($inst_str ==
"")
1181 $a_text = preg_replace(
'~<IntLink'.$found[1].
'>~i',
"[iln ".$inst_str.
"$target_type=\"".
$target_id.
"\"".$tframestr.
"]",$a_text);
1186 $a_text = preg_replace(
'~<IntLink'.$found[1].
'>~i',
"[iln ".$inst_str.
"dfile=\"".
$target_id.
"\"".$tframestr.
"]",$a_text);
1191 include_once(
"./Services/User/classes/class.ilObjUser.php");
1196 $a_text = preg_replace(
'~<IntLink'.$found[1].
'>~i',
"[iln]",$a_text);
1200 $a_text = str_replace(
"</IntLink>",
"[/iln]",$a_text);
1203 while (preg_match(
'~<ExtLink('.$any.
')>~i', $a_text, $found))
1209 if (in_array($attribs[
"TargetFrame"],
array(
"FAQ",
"Glossary",
"Media")))
1211 $tstr =
' target="'.$attribs[
"TargetFrame"].
'"';
1213 $a_text = str_replace(
"<ExtLink".$found[1].
">",
"[xln url=\"".$attribs[
"Href"].
"\"$tstr]",$a_text);
1215 $a_text = str_replace(
"</ExtLink>",
"[/xln]",$a_text);
1218 while (preg_match(
'~<Anchor('.$any.
'/)>~i', $a_text, $found))
1222 $a_text = str_replace(
"<Anchor".$found[1].
">",
"[anc name=\"".$attribs[
"Name"].
"\"][/anc]",$a_text);
1224 while (preg_match(
'~<Anchor('.$any.
')>~i', $a_text, $found))
1228 $a_text = str_replace(
"<Anchor".$found[1].
">",
"[anc name=\"".$attribs[
"Name"].
"\"]",$a_text);
1230 $a_text = str_replace(
"</Anchor>",
"[/anc]",$a_text);
1233 while (preg_match(
'~<Marked('.$any.
')>~i', $a_text, $found))
1237 $a_text = str_replace(
"<Marked".$found[1].
">",
"[marked class=\"".$attribs[
"Class"].
"\"]",$a_text);
1239 $a_text = str_replace(
"</Marked>",
"[/marked]",$a_text);
1244 $a_text = str_replace(
"<br />",
"\n", $a_text);
1245 $a_text = str_replace(
"<br/>",
"\n", $a_text);
1251 $a_text = str_replace(
"{",
"{", $a_text);
1252 $a_text = str_replace(
"}",
"}", $a_text);
1255 $a_text = str_replace(
"<",
"<", $a_text);
1256 $a_text = str_replace(
">",
">",$a_text);
1259 $a_text = str_replace(
""",
"\"", $a_text);
1263 $a_text = str_replace(
"&",
"&", $a_text);
1266 $a_text = str_replace(
"<",
"&lt;", $a_text);
1267 $a_text = str_replace(
">",
"&gt;", $a_text);
1281 $a_text = str_replace (
"=<SimpleBulletList>",
"=<br /><SimpleBulletList>", $a_text);
1282 $a_text = str_replace (
"=<SimpleNumberedList>",
"=<br /><SimpleNumberedList>", $a_text);
1283 $a_text = str_replace (
"</SimpleBulletList>=",
"</SimpleBulletList><br />=", $a_text);
1284 $a_text = str_replace (
"</SimpleNumberedList>=",
"</SimpleNumberedList><br />=", $a_text);
1285 $a_text =
"<br />".$a_text.
"<br />";
1290 while ($c_text !=
"")
1294 $s1 = strpos($c_text,
"<br />=");
1298 $s2 = strpos($c_text,
"<br />==");
1299 if (is_int($s2) && $s2 <= $s1)
1302 $s3 = strpos($c_text,
"<br />===");
1303 if (is_int($s3) && $s3 <= $s2)
1306 $n = strpos($c_text,
"<br />", $s3 + 1);
1307 if (
$n > ($s3+9) && substr($c_text,
$n-3, 9) ==
"===<br />")
1311 if ($s3 > 0 || $head !=
"")
1314 $chunks[] =
array(
"level" => 0,
1318 $chunks[] =
array(
"level" => 3,
1319 "text" => trim(substr($c_text, $s3+9,
$n-$s3-12)));
1325 $head.= substr($c_text, 0,
$n);
1326 $c_text = substr($c_text,
$n);
1332 $n = strpos($c_text,
"<br />", $s2 + 1);
1333 if (
$n > ($s2+8) && substr($c_text,
$n-2, 8) ==
"==<br />")
1337 if ($s2 > 0 || $head !=
"")
1340 $chunks[] =
array(
"level" => 0,
1344 $chunks[] =
array(
"level" => 2,
"text" => trim(substr($c_text, $s2+8,
$n-$s2-10)));
1350 $head.= substr($c_text, 0,
$n);
1351 $c_text = substr($c_text,
$n);
1358 $n = strpos($c_text,
"<br />", $s1 + 1);
1359 if (
$n > ($s1+7) && substr($c_text,
$n-1, 7) ==
"=<br />")
1363 if ($s1 > 0 || $head !=
"")
1366 $chunks[] =
array(
"level" => 0,
1370 $chunks[] =
array(
"level" => 1,
"text" => trim(substr($c_text, $s1+7,
$n-$s1-8)));
1376 $head.= substr($c_text, 0,
$n);
1377 $c_text = substr($c_text,
$n);
1385 $chunks[] =
array(
"level" => 0,
"text" => $head.$c_text);
1390 if (count($chunks) == 0)
1392 $chunks[] =
array(
"level" => 0,
"text" =>
"");
1397 if (substr($chunks[0][
"text"], 0, 6) ==
"<br />")
1399 $chunks[0][
"text"] = substr($chunks[0][
"text"], 6);
1403 if (substr($chunks[count($chunks) - 1][
"text"],
1404 strlen($chunks[count($chunks) - 1][
"text"]) - 6, 6) ==
"<br />")
1406 $chunks[count($chunks) - 1][
"text"] =
1407 substr($chunks[count($chunks) - 1][
"text"], 0, strlen($chunks[count($chunks) - 1][
"text"]) - 6);
1408 if ($chunks[count($chunks) - 1][
"text"] ==
"")
1410 unset($chunks[count($chunks) - 1]);
1423 if (substr($a_str, 0, 6) ==
"<br />" && substr($a_str, 6, 1) !=
"=")
1425 $a_str = substr($a_str, 6);
1431 if (substr($a_str, 0, 1) ==
"=")
1433 $a_str =
"<br />".$a_str;
1444 if (substr($a_str, strlen($a_str) - 6) ==
"<br />")
1446 $a_str = substr($a_str, 0, strlen($a_str) - 6);
1473 $this->log->debug(
"step 1: ".substr(
$a_content, 0, 1000));
1475 $this->log->debug(
"step 2: ".substr(
$t[
"text"], 0, 1000));
1481 $pc_id = explode(
":", $a_pc_id);
1482 $insert_at = explode(
":", $a_insert_at);
1483 $t_id = explode(
":",
$t[
"id"]);
1486 if ($a_insert_at !=
"")
1489 $par->create($a_pg_obj, $insert_at[0], $insert_at[1]);
1493 $par = $a_pg_obj->getContentObject($pc_id[0], $pc_id[1]);
1496 if ($a_insert_at !=
"")
1498 $pc_id = $a_pg_obj->generatePCId();
1499 $par->writePCId($pc_id);
1500 $this->inserted_pc_id = $pc_id;
1504 $this->inserted_pc_id = $pc_id[1];
1507 $par->setLanguage($ilUser->getLanguage());
1508 $par->setCharacteristic(
$t[
"class"]);
1510 $t2 = $par->input2xml(
$t[
"text"],
true,
false);
1511 $this->log->debug(
"step 3: ".substr($t2, 0, 1000));
1514 $this->log->debug(
"step 4: ".substr($t2, 0, 1000));
1516 $updated = $par->setText($t2,
true);
1518 if ($updated !==
true)
1523 $updated = $par->updatePage($a_pg_obj);
1538 $a_pg_obj->stripHierIDs();
1539 $a_pg_obj->addHierIds();
1542 $combined = $a_pg_obj->getHierIdsForPCIds(
1543 array($this->inserted_pc_id));
1544 foreach ($combined as $pc_id =>
$hier_id)
1547 $ids.= $sep.$hier_id.
":".$pc_id;
1554 return $this->inserted_pc_id;
1563 $a_content =
"<dummy>".$a_content.
"</dummy>";
1572 $res = $doc->loadXML($content);
1580 $xpath =
new DOMXpath($doc);
1582 $tags = self::getXMLTagMap();
1584 $elements = $xpath->query(
"//span");
1585 include_once(
"./Services/Utilities/classes/class.ilDOM2Util.php");
1586 while (!is_null($elements) && !is_null($element = $elements->item(0)))
1589 $class = $element->getAttribute(
"class");
1590 if (substr($class, 0, 16) ==
"ilc_text_inline_")
1592 $class_arr = explode(
" ", $class);
1593 $tag = substr($class_arr[0], 16);
1594 if (isset($tags[$tag]))
1601 $cnode->setAttribute(
"Class", substr($class_arr[0], 16));
1603 for ($i = 1; $i < count($class_arr); $i++)
1605 $tag = substr($class_arr[$i], 16);
1606 if (isset($tags[$tag]))
1613 $cnode->setAttribute(
"Class", substr($class_arr[$i], 16));
1622 $elements = $xpath->query(
"//span");
1626 $xpath =
new DOMXpath($doc);
1627 $elements = $xpath->query(
"/dummy/div");
1630 if (!is_null($elements))
1632 foreach ($elements as $element)
1634 $id = $element->getAttribute(
"id");
1635 $class = $element->getAttribute(
"class");
1636 $class = substr($class, 15);
1637 if (trim($class) ==
"")
1639 $class =
"Standard";
1642 $text = $doc->saveXML($element);
1646 $pos = strpos(
$text,
">");
1648 $pos = strrpos(
$text,
"<");
1656 if (!in_array($bb,
array(
"code",
"tex",
"fn",
"xln")))
1658 $text = str_replace(
"<il".$cl.
">",
1659 "[".$bb.
"]",
$text);
1660 $text = str_replace(
"</il".$cl.
">",
1661 "[/".$bb.
"]",
$text);
1662 $text = str_replace(
"<il".$cl.
"/>",
"",
$text);
1665 $text = str_replace(
array(
"<code>",
"</code>"),
1667 $text = str_replace(
array(
'<sup class="ilc_sup_Sup">',
"</sup>"),
1669 $text = str_replace(
array(
'<sub class="ilc_sub_Sub">',
"</sub>"),
1673 $text = str_replace(
'<ul class="ilc_list_u_BulletedList"/>',
"",
$text);
1674 $text = str_replace(
'<ul class="ilc_list_o_NumberedList"/>',
"",
$text);
1679 while (preg_match(
'~<ilMarked('.$any.
')>~i',
$text, $found))
1683 $text = str_replace(
"<ilMarked".$found[1].
">",
"[marked class=\"".$attribs[
"Class"].
"\"]",
$text);
1685 $text = str_replace(
"</ilMarked>",
"[/marked]",
$text);
1701 $text = str_replace(
array(
"<ul>",
"</ul>"),
1702 array(
"<SimpleBulletList>",
"</SimpleBulletList>"),
$text);
1703 $text = str_replace(
array(
"<ul class='ilc_list_u_BulletedList'>",
"</ul>"),
1704 array(
"<SimpleBulletList>",
"</SimpleBulletList>"),
$text);
1705 $text = str_replace(
array(
"<ul class=\"ilc_list_u_BulletedList\">",
"</ul>"),
1706 array(
"<SimpleBulletList>",
"</SimpleBulletList>"),
$text);
1707 $text = str_replace(
array(
"<ol>",
"</ol>"),
1708 array(
"<SimpleNumberedList>",
"</SimpleNumberedList>"),
$text);
1709 $text = str_replace(
array(
"<ol class='ilc_list_o_NumberedList'>",
"</ol>"),
1710 array(
"<SimpleNumberedList>",
"</SimpleNumberedList>"),
$text);
1711 $text = str_replace(
array(
"<ol class=\"ilc_list_o_NumberedList\">",
"</ol>"),
1712 array(
"<SimpleNumberedList>",
"</SimpleNumberedList>"),
$text);
1713 $text = str_replace(
array(
"<li>",
"</li>"),
1714 array(
"<SimpleListItem>",
"</SimpleListItem>"),
$text);
1715 $text = str_replace(
array(
"<li class='ilc_list_item_StandardListItem'>",
"</li>"),
1716 array(
"<SimpleListItem>",
"</SimpleListItem>"),
$text);
1717 $text = str_replace(
array(
"<li class=\"ilc_list_item_StandardListItem\">",
"</li>"),
1718 array(
"<SimpleListItem>",
"</SimpleListItem>"),
$text);
1720 $text = str_replace(
array(
"<li class=\"ilc_list_item_StandardListItem\"/>"),
1721 array(
"<SimpleListItem></SimpleListItem>"),
$text);
1723 $text = str_replace(
"<SimpleBulletList><br />",
"<SimpleBulletList>",
$text);
1724 $text = str_replace(
"<SimpleNumberedList><br />",
"<SimpleNumberedList>",
$text);
1725 $text = str_replace(
"<br /><SimpleBulletList>",
"<SimpleBulletList>",
$text);
1726 $text = str_replace(
"<br /><SimpleNumberedList>",
"<SimpleNumberedList>",
$text);
1727 $text = str_replace(
"</SimpleBulletList><br />",
"</SimpleBulletList>",
$text);
1728 $text = str_replace(
"</SimpleNumberedList><br />",
"</SimpleNumberedList>",
$text);
1729 $text = str_replace(
"</SimpleListItem><br />",
"</SimpleListItem>",
$text);
1743 $a_page->beforePageContentUpdate($this);
1745 $ret = $a_page->update();
1757 if (is_array($a_glos) && count($a_glos) > 0)
1759 include_once(
"./Modules/Glossary/classes/class.ilGlossaryTerm.php");
1766 $found_terms =
array();
1767 foreach ($a_glos as $glo)
1772 foreach ($terms as
$t)
1774 if (is_int(stripos(
$text, $t[
"term"])))
1776 $found_terms[$t[
"id"]] =
$t;
1783 if (count($found_terms) > 0)
1785 self::linkTermsInDom($this->dom, $found_terms, $this->par_node);
1800 foreach ($a_terms as $k =>
$t)
1802 $a_terms[$k][
"termlength"] = strlen(
$t[
"term"]);
1809 $a_dom = $a_dom->myDOMDocument;
1813 $a_par_node = $a_par_node->myDOMNode;
1816 $xpath =
new DOMXPath($a_dom);
1818 if ($a_par_node == null)
1820 $parnodes = $xpath->query(
"//Paragraph[@Characteristic != 'Code']");
1824 $parnodes = $xpath->query(
".//Paragraph[@Characteristic != 'Code']", $a_par_node->parentNode);
1827 include_once(
"./Services/Utilities/classes/class.ilStr.php");
1829 foreach ($parnodes as $parnode)
1831 $textnodes = $xpath->query(
'.//text()', $parnode);
1832 foreach ($textnodes as
$node)
1834 $p = $node->getNodePath();
1837 if (!is_int(strpos($p,
"/IntLink")) &&
1838 !is_int(strpos($p,
"/ExtLink")))
1840 $node_val = $node->nodeValue;
1843 foreach ($a_terms as
$t)
1848 while (is_int($pos))
1853 if ($tex_bpos > 0 && $tex_epos > 0 && $tex_bpos < $pos && $tex_epos > $pos)
1862 $valid_limiters =
array(
"",
" ",
" ",
".",
",",
":",
";",
"!",
"?",
"\"",
"'",
"(",
")");
1867 if ((in_array($b, $valid_limiters) || htmlentities($b, null,
'utf-8') ==
" ") && in_array($a, $valid_limiters))
1869 $mid =
'[iln term="' . $t[
"id"] .
'"]' .
1889 $node->nodeValue = $node_val;
1898 $text = $a_dom->saveXML($parnode);
1906 $temp_dom =
domxml_open_mem(
'<?xml version="1.0" encoding="UTF-8"?><Paragraph>'.
$text.
'</Paragraph>',
1907 DOMXML_LOAD_PARSING,
$error);
1908 $temp_dom = $temp_dom->myDOMDocument;
1913 $children = $parnode->childNodes;
1914 while ($parnode->hasChildNodes())
1916 $parnode->removeChild($parnode->firstChild);
1920 $xpath_temp =
new DOMXPath($temp_dom);
1921 $temp_pars = $xpath_temp->query(
"//Paragraph");
1923 foreach ($temp_pars as $new_par_node)
1925 $new_childs = $new_par_node->childNodes;
1927 foreach($new_childs as $new_child)
1930 $cloned_child = $a_dom->importNode($new_child,
true);
1931 $parnode->appendChild($cloned_child);
1948 $a_page->buildDom();
1949 $a_dom = $a_page->getDom();
1951 self::linkTermsInDom($a_dom, $a_terms);
1967 self::saveMetaKeywords($a_page, $a_domdoc);
1968 self::saveAnchors($a_page, $a_domdoc);
1979 self::_deleteAnchors($a_page->getParentType(), $a_page->getId(), $a_page->getLanguage());
2001 self::_deleteAnchors($a_page->getParentType(), $a_page->getId(), $a_page->getLanguage());
2004 $xpath =
new DOMXPath($a_domdoc);
2005 $nodes = $xpath->query(
'//Anchor');
2007 foreach ($nodes as
$node)
2009 $name = $node->getAttribute(
"Name");
2010 if (trim($name) !=
"" && !in_array($name, $saved))
2012 self::_saveAnchor($a_page->getParentType(), $a_page->getId(), $a_page->getLanguage(), $name);
2026 $ilDB->manipulate(
"DELETE FROM page_anchor WHERE ".
2027 " page_parent_type = ".$ilDB->quote($a_parent_type,
"text").
2028 " AND page_id = ".$ilDB->quote($a_page_id,
"integer").
2029 " AND page_lang = ".$ilDB->quote($a_page_lang,
"text")
2036 static function _saveAnchor($a_parent_type, $a_page_id, $a_page_lang, $a_anchor_name)
2040 $ilDB->manipulate(
"INSERT INTO page_anchor ".
2041 "(page_parent_type, page_id, page_lang, anchor_name) VALUES (".
2042 $ilDB->quote($a_parent_type,
"text").
",".
2043 $ilDB->quote($a_page_id,
"integer").
",".
2044 $ilDB->quote($a_page_lang,
"text").
",".
2045 $ilDB->quote($a_anchor_name,
"text").
2052 static function _readAnchors($a_parent_type, $a_page_id, $a_page_lang =
"-")
2056 $and_lang = ($a_page_lang !=
"")
2057 ?
" AND page_lang = ".$ilDB->quote($a_page_lang,
"text")
2060 $set = $ilDB->query(
"SELECT * FROM page_anchor ".
2061 " WHERE page_parent_type = ".$ilDB->quote($a_parent_type,
"text").
2062 " AND page_id = ".$ilDB->quote($a_page_id,
"integer").
2066 while ($rec = $ilDB->fetchAssoc($set))
2068 $anchors[] = $rec[
"anchor_name"];
2082 if ($a_page->getParentType() ==
"gdf" ||
2083 $a_page->getParentType() ==
"lm")
2086 $keywords =
array();
2089 $xpath =
new DOMXPath($a_domdoc);
2090 $nodes = $xpath->query(
'//Keyw');
2091 foreach($nodes as
$node)
2093 $k = trim(strip_tags($node->nodeValue));
2094 if (!in_array($k, $keywords))
2100 $meta_type = ($a_page->getParentType() ==
"gdf")
2103 $meta_rep_id = $a_page->getParentId();
2104 $meta_id = $a_page->getId();
2106 include_once(
"./Services/MetaData/classes/class.ilMD.php");
2107 $md_obj =
new ilMD($meta_rep_id, $meta_id, $meta_type);
2108 $mkeywords =
array();
2110 if(is_object($md_section = $md_obj->getGeneral()))
2112 foreach($ids = $md_section->getKeywordIds() as $id)
2114 $md_key = $md_section->getKeyword($id);
2115 $mkeywords[] = strtolower($md_key->getKeyword());
2118 $lang = $md_key->getKeywordLanguageCode();
2123 foreach($ids = $md_section->getLanguageIds() as $id)
2125 $md_lang = $md_section->getLanguage($id);
2128 $lang = $md_lang->getLanguageCode();
2132 foreach ($keywords as $k)
2134 if (!in_array(strtolower($k), $mkeywords))
2136 if (trim($k) !=
"" &&
$lang !=
"")
2138 $md_key = $md_section->addKeyword();
2143 $mkeywords[] = strtolower($k);
2157 if ($a_mode !=
"edit" && $adve_settings->get(
"auto_url_linking"))
2159 include_once(
"./Services/Link/classes/class.ilLinkifyUtil.php");
2176 if ($a_mode !=
"edit" && $adve_settings->get(
"auto_url_linking"))
2178 return array(
"il.ExtLink.autolink('.ilc_Paragraph','ilc_link_ExtLink');");
static _lookupLogin($a_user_id)
lookup login
getLastSavedPCId($a_pg_obj, $a_as_ajax_str=false)
Get last inserted pc ids.
static strrPos($a_haystack, $a_needle, $a_offset=NULL)
createAfter($node)
Create paragraph node (incl.
static attribsToArray($a_str)
converts a string of format var1 = "val1" var2 = "val2" ...
static xml2outputJS($s_text, $char, $a_pc_id)
Prepare content for js output.
static getBBMap()
Get bb to xml tag map.
static xml2outputReplaceLists($a_text)
Replaces with *.
getSubCharacteristic()
get attribute subcharacteristic
xpath_new_context($dom_document)
static beforePageDelete($a_page)
Before page is being deleted.
getDownloadTitle()
get attribute download title
setShowLineNumbers($a_char)
set attribute showlinenumbers
removeTrailingBr($a_str)
Remove trailing
static segmentString($a_haystack, $a_needles)
Segments a string into an array at each position of a substring.
static handleAjaxContentPost($text)
Post input2xml handling of ajax content.
static getLocalJsPaths()
Get paths of necessary js files.
input2xml($a_text, $a_wysiwyg=0, $a_handle_lists=true)
static strPos($a_haystack, $a_needle, $a_offset=NULL)
xpath_eval($xpath_context, $eval_str, $contextnode=null)
setDownloadTitle($a_char)
set attribute download title
setText($a_text, $a_auto_split=false)
Set (xml) content of text paragraph.
static _lookupId($a_user_str)
Lookup id by login.
static replaceByChilds($node)
Replace a node by its child.
setNode($a_node)
Set Page Content Node.
setType($a_type)
Set Type.
create(&$a_pg_obj, $a_hier_id, $a_pc_id="")
Create paragraph node (incl.
saveJS($a_pg_obj, $a_content, $a_char, $a_pc_id, $a_insert_at="")
Save input coming from ajax.
static getXMLTagMap()
Get tag to bb map.
getLanguage()
get language
static sortArray($array, $a_array_sortby, $a_array_sortorder=0, $a_numeric=false, $a_keep_keys=false)
sortArray
getParagraphSequenceContent($a_pg_obj)
Get paragraph sequenc of current paragraph.
setLanguage($a_lang)
set language
getAutoIndent()
Get AutoIndent (Code Paragraphs)
init()
Init page content component.
static autoLinkGlossariesPage($a_page, $a_terms)
Auto link glossary of whole page.
getType()
Need to override getType from ilPageContent to distinguish between Pararagraph and Source...
setSubCharacteristic($a_char)
set attribute subcharacteristic
createBeforeNode(&$node)
Create new page content (incl.
static afterPageHistoryEntry($a_page, DOMDocument $a_old_domdoc, $a_old_xml, $a_old_nr)
After page history entry has been created.
static xml2output($a_text, $a_wysiwyg=false, $a_replace_lists=true)
Converts xml from DB to output in edit textarea.
static input2xmlReplaceLists($a_text)
Converts xml from DB to output in edit textarea.
static handleAjaxContent($a_content)
Handle ajax content.
static linkTermsInDom($a_dom, $a_terms, $a_par_node=null)
Link terms in a dom page object in bb style.
updatePage($a_page)
Update page object (it would be better to have this centralized and to change the constructors and pa...
createAtNode(&$node)
Create new page content (incl.
setCharacteristic($a_char)
Set Characteristic of paragraph.
getText($a_short_mode=false)
Get (xml) content of paragraph.
autoLinkGlossaries($a_glos)
Auto link glossaries.
static getTermList($a_glo_id, $searchterm="", $a_first_letter="", $a_def="", $a_tax_node=0, $a_add_amet_fields=false, array $a_amet_filter=null, $a_include_references=false)
Get all terms for given set of glossary ids.
static changeName($node, $name, $keep_attributes=true)
Change name of a node.
getCharacteristic()
Get characteristic of paragraph.
static replaceBBCode($a_text, $a_bb, $a_tag)
Replace bb code.
static saveAnchors($a_page, $a_domdoc)
Save anchors.
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
Create styles array
The data for the language used.
static _lookupType($a_id, $a_reference=false)
lookup object type
static _readAnchors($a_parent_type, $a_page_id, $a_page_lang="-")
Read anchors of a page.
autoSplit($a_text)
This function splits a paragraph text that has been already processed with input2xml at each header p...
static _saveAnchor($a_parent_type, $a_page_id, $a_page_lang, $a_anchor_name)
Save an anchor.
static _deleteAnchors($a_parent_type, $a_page_id, $a_page_lang)
Delete anchors of a page.
static addParent($node, $name)
Add parent.
static _input2xml($a_text, $a_lang, $a_wysiwyg=0, $a_handle_lists=true)
converts user input to xml
createPageContentNode($a_set_this_node=true)
Create page content node (always use this method first when adding a new element) ...
static strIPos($a_haystack, $a_needle, $a_offset=NULL)
static _getCommonBBButtons()
Get common bb buttons.
for($i=1; $i<=count($kw_cases_sel); $i+=1) $lang
static afterPageUpdate($a_page, DOMDocument $a_domdoc, $a_xml, $a_creation)
After page has been updated (or created)
domxml_open_mem($str, $mode=0, &$error=NULL)
getOnloadCode($a_mode)
Get onload code.
handleNextBr($a_str)
Remove preceding
static saveMetaKeywords($a_page, $a_domdoc)
save all keywords
static subStr($a_str, $a_start, $a_length=NULL)
getJavascriptFiles($a_mode)
Get Javascript files.
static intLinks2xml($a_text)
internal links to xml
getShowLineNumbers()
get attribute showlinenumbers