moreText = $moreText; $this->lessText = $lessText; $this->charNum = $chars; parent::__construct($name, $title, $value); } function Field() { $valforInput = $this->value ? Convert::raw2att($this->value) : ""; $rawInput = Convert::html2raw($valforInput); if ($this->charNum) $reducedVal = substr($rawInput,0,$this->charNum); else $reducedVal = ereg_replace('([^\.]\.)[[:space:]].*','\\1',$rawInput); if (strlen($reducedVal) < strlen($rawInput)) { return <<$reducedVal $this->moreText
HTML; } else { $this->dontEscape = true; return parent::Field(); } } function setMoreText($moreText) { $this->moreText = $moreText; } function setLessText($lessText) { $this->lessText = $lessText; } } ?>