. if (!defined('EG')) die('Direct access not allowed!'); class TalkModel extends Model_Tree { public function __construct() { $this->_tables = 'talk'; $this->_idFields = 'id_talk'; $this->_where=array( 'id_hard' => 'talk' ); $this->orderBy = 'talk.id_talk desc'; $this->strongConditions['insert'] = array( "checkLength|99" => 'title', "+checkNotEmpty" => 'message', "++checkLength|5000" => 'message', ); parent::__construct(); } public $formStruct = array( 'entries' => array( 'title' => array(), 'message' => array('type'=>'Textarea'), 'id_talk' => array( 'type' => 'Hidden' ) ), ); }