7 private $codeMessage =
"";
8 private $quoteOpened = 0;
9 private $quoteClosed = 0;
10 private $quoteError = 0;
11 private $quoteTableClass =
"";
12 private $quoteHeadClass =
"";
13 private $quoteBodyClass =
"";
14 private $linkClass =
"";
15 private $linkTarget =
"_self";
16 private $codeTableClass =
"";
17 private $codeHeadClass =
"";
18 private $codeBodyClass =
"";
19 private $codeTextClass =
"";
23 $this->codeMessage = $codeMessage;
28 $text = is_array($match)? $match[2]: $match;
33 $text = preg_replace(
"#^(.*?)$#",
" \\1",
$text);
35 $s1 =
"--------------- ".$this->codeMessage.
" -------------------";
36 $s2 = str_repeat(
"-", mb_strlen($s1));
37 $text =
"\n\n>".$s1.
"\n".
$text.
"\n>".$s2.
"\n\n";
44 return (($this->quoteOpened == $this->quoteClosed) && ($this->quoteError == 0));
49 $this->quoteTableClass = $tableClass;
50 $this->quoteHeadClass = $headClass;
51 $this->quoteBodyClass = $bodyClass;
57 return "<table class='".$this->quoteTableClass.
"' width='95%' border='0' cellpadding='3' cellspacing='1'><tr><td class='".$this->quoteHeadClass.
"'>".
GetMessage(
"CONV_MAIN_QUOTE").
"</td></tr><tr><td class='".$this->quoteBodyClass.
"'>";
62 if ($this->quoteOpened == 0)
68 return "</td></tr></table>";
73 $this->quoteOpened = 0;
74 $this->quoteClosed = 0;
75 $this->quoteError = 0;
78 $str = preg_replace_callback(
"#\\[quote\\]#i",
array($this,
"convertOpenQuoteTag"),
$str);
79 $str = preg_replace_callback(
"#\\[/quote\\]#i",
array($this,
"convertCloseQuoteTag"),
$str);
89 return extract_url(str_replace(
'@', chr(11), $match[1]));
94 $this->linkClass = $linkClass;
99 $this->linkTarget = $linkTarget;
108 public function setEvents($event1=
"", $event2=
"", $event3=
"")
131 $target = $this->linkTarget ==
'_self'?
'':
' target="'.$this->linkTarget.
'"';
138 public function setCodeClasses($tableClass, $headClass, $bodyClass, $textAreaClass)
140 $this->codeTableClass = $tableClass;
141 $this->codeHeadClass = $headClass;
142 $this->codeBodyClass = $bodyClass;
143 $this->codeTextClass = $textAreaClass;
159 $text = str_replace(
"https",
"!https!",
$text);
165 $return =
"[code]".$text.
"[/code]";
179 $text = str_replace(
"!https!",
"https",
$text);
183 $return =
"<table class='".$this->codeTableClass.
"'><tr><td class='".$this->codeHeadClass.
"'>$code_mess</td></tr><tr><td class='".$this->codeBodyClass.
"'><textarea class='".$this->codeTextClass.
"' contentEditable=false cols=60 rows=15 wrap=virtual>$text</textarea></td></tr></table>";
convertCodeTagForHtmlBefore($text="")
setLinkTarget($linkTarget)
convertCodeTagForHtmlAfter($text="")
convertOpenQuoteTag($match)
static extractUrl($match)
convertCodeTagForEmail($match)
setEvents($event1="", $event2="", $event3="")
__construct($codeMessage="")
setQuoteClasses($tableClass, $headClass, $bodyClass)
setCodeClasses($tableClass, $headClass, $bodyClass, $textAreaClass)
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
delete_special_symbols($text, $replace="")
IncludeModuleLangFile($filepath, $lang=false, $bReturnArray=false)
GetMessage($name, $aReplace=null)