public function __construct($data = array()) { parent::__construct($data); $this->set('comment_rights', sets::user('rights') || $this->get('cookie') == query::$cookie); $this->set('text', Transform_Text::cut_long_words($this->get('text'))); $this->set('delete_rights', sets::user('rights')); $this->set('avatar', md5(strtolower($this->get('email')))); }
public function get_short_text () { $text = $this->data['text']; $text = Transform_Text::cut_long_text(strip_tags($text,'<br><em><strong><s>'),100); $text = preg_replace('/(<br(\s[^>]*)?>\n*)+/si','<br />',$text); return Transform_Text::cut_long_words($text); }