'\dmzx\mchat\acp\acp_mchat_module', 'modes' => array( 'globalsettings', 'globalusersettings', ), ), )), // Add UCP category array('module.add', array( 'ucp', 0, 'UCP_MCHAT_CONFIG', )), // Add UCP preferences module array('module.add', array( 'ucp', 'UCP_MCHAT_CONFIG', array( 'module_basename' => '\dmzx\mchat\ucp\ucp_mchat_module', 'modes' => array( 'configuration', ), ), )), ); } public function update_schema() { return array( 'add_tables' => array( $this->table_prefix . 'mchat' => array( 'COLUMNS' => array( 'message_id' => array('UINT', null, 'auto_increment'), 'user_id' => array('UINT', 0), 'user_ip' => array('VCHAR:40', ''), 'message' => array('MTEXT_UNI', ''), 'bbcode_bitfield' => array('VCHAR', ''), 'bbcode_uid' => array('VCHAR:8', ''), 'bbcode_options' => array('BOOL', '7'), 'message_time' => array('INT:11', 0), 'edit_time' => array('INT:11', 0), 'forum_id' => array('UINT', 0), 'post_id' => array('UINT', 0), ), 'PRIMARY_KEY' => 'message_id', ), $this->table_prefix . 'mchat_deleted_messages' => array( 'COLUMNS' => array( 'message_id' => array('UINT', 0), ), 'PRIMARY_KEY' => 'message_id', ), $this->table_prefix . 'mchat_sessions' => array( 'COLUMNS' => array( 'user_id' => array('UINT', 0), 'user_lastupdate' => array('TIMESTAMP', 0), 'user_ip' => array('VCHAR:40', ''), ), 'PRIMARY_KEY' => 'user_id', ), ), 'add_columns' => array( $this->table_prefix . 'users' => array( 'user_mchat_avatars' => array('BOOL', 1), 'user_mchat_capital_letter' => array('BOOL', 1), 'user_mchat_character_count' => array('BOOL', 1), 'user_mchat_date' => array('VCHAR:64', 'D M d, Y g:i a'), 'user_mchat_index' => array('BOOL', 1), 'user_mchat_input_area' => array('BOOL', 1), 'user_mchat_location' => array('BOOL', 1), 'user_mchat_message_top' => array('BOOL', 1), 'user_mchat_pause_on_input' => array('BOOL', 0), 'user_mchat_posts' => array('BOOL', 1), 'user_mchat_relative_time' => array('BOOL', 1), 'user_mchat_sound' => array('BOOL', 1), 'user_mchat_stats_index' => array('BOOL', 0), 'user_mchat_whois_index' => array('BOOL', 1), ), ), ); } public function revert_schema() { return array( 'drop_tables' => array( $this->table_prefix . 'mchat', $this->table_prefix . 'mchat_deleted_messages', $this->table_prefix . 'mchat_sessions', ), 'drop_columns' => array( $this->table_prefix . 'users' => array( 'user_mchat_avatars', 'user_mchat_capital_letter', 'user_mchat_character_count', 'user_mchat_date', 'user_mchat_index', 'user_mchat_input_area', 'user_mchat_location', 'user_mchat_message_top', 'user_mchat_pause_on_input', 'user_mchat_posts', 'user_mchat_relative_time', 'user_mchat_sound', 'user_mchat_stats_index', 'user_mchat_whois_index', ), ), ); } }