Version 2.0.0-RC6

This commit is contained in:
dmzx
2016-09-20 22:38:19 +02:00
parent aac8ce6f58
commit 233dc89a8a
73 changed files with 2722 additions and 1336 deletions

View File

@@ -1,174 +0,0 @@
parameters:
# Global settings that only the administrator is allowed to modify.
# The values are stored in the phpbb_config table and can be
# accessed using the \phpbb\config\config $config class.
dmzx.mchat.config_global:
mchat_bbcode_disallowed:
default: ''
validation:
- 'string'
- false
- 0
- 255
mchat_custom_height:
default: 350
validation:
- 'num'
- false
- 50
- 1000
mchat_custom_page:
default: 1
mchat_edit_delete_limit:
default: 0
mchat_flood_time:
default: 0
validation:
- 'num'
- false
- 0
- 60
mchat_index_height:
default: 250
validation:
- 'num'
- false
- 50
- 1000
mchat_live_updates:
default: 1
mchat_max_message_lngth:
default: 500
validation:
- 'num'
- false
- 0
- 1000
mchat_message_num_archive:
default: 25
validation:
- 'num'
- false
- 10
- 100
mchat_message_num_custom:
default: 10
validation:
- 'num'
- false
- 5
- 50
mchat_message_num_index:
default: 10
validation:
- 'num'
- false
- 5
- 50
mchat_navbar_link:
default: 1
mchat_override_min_post_chars:
default: 0
mchat_override_smilie_limit:
default: 0
mchat_posts_edit:
default: 0
mchat_posts_quote:
default: 0
mchat_posts_reply:
default: 0
mchat_posts_topic:
default: 0
mchat_prune:
default: 0
mchat_prune_num:
default: 0
mchat_refresh:
default: 10
validation:
- 'num'
- false
- 5
- 60
mchat_rules:
default: ''
validation:
- 'string'
- false
- 0
- 255
mchat_static_message:
default: ''
validation:
- 'string'
- false
- 0
- 255
mchat_timeout:
default: 0
validation:
- 'num'
- false
- 0
- -1 # This value is replaced with $config['session_length'] in the \dmzx\mchat\core\settings class
mchat_whois:
default: 1
mchat_whois_refresh:
default: 60
validation:
- 'num'
- false
- 10
- 300
# User-specific settings for which the administrator can set default
# values as well as adjust permissions to allow users to customize them.
# For each setting a new column is added to the phpbb_users table.
dmzx.mchat.config_ucp:
mchat_avatars:
default: 1
type: 'BOOL'
mchat_capital_letter:
default: 1
type: 'BOOL'
mchat_character_count:
default: 1
type: 'BOOL'
mchat_date:
default: 'D M d, Y g:i a'
type: 'VCHAR:64'
validation:
- 'string'
- false
- 0
- 64
mchat_index:
default: 1
type: 'BOOL'
mchat_input_area:
default: 1
type: 'BOOL'
mchat_location:
default: 1
type: 'BOOL'
mchat_message_top:
default: 1
type: 'BOOL'
mchat_pause_on_input:
default: 0
type: 'BOOL'
mchat_posts:
default: 1
type: 'BOOL'
mchat_relative_time:
default: 1
type: 'BOOL'
mchat_sound:
default: 1
type: 'BOOL'
mchat_stats_index:
default: 0
type: 'BOOL'
mchat_whois_index:
default: 1
type: 'BOOL'

View File

@@ -1,16 +1,37 @@
dmzx_mchat_controller:
dmzx_mchat_page_custom_controller:
path: /mchat
methods: [GET]
defaults: { _controller: dmzx.mchat.main.controller:page, page: custom }
dmzx_mchat_page_controller:
path: /mchat/{page}
defaults: { _controller: dmzx.mchat.core:page_custom }
dmzx_mchat_page_archive_controller:
path: /mchat/archive
methods: [GET]
defaults: { _controller: dmzx.mchat.main.controller:page }
requirements:
page: 'archive|rules|whois'
dmzx_mchat_action_controller:
path: /mchat/action-{action}
defaults: { _controller: dmzx.mchat.core:page_archive }
dmzx_mchat_page_rules_controller:
path: /mchat/rules
methods: [GET]
defaults: { _controller: dmzx.mchat.core:page_rules }
dmzx_mchat_page_whois_controller:
path: /mchat/whois/{ip}
methods: [GET]
defaults: { _controller: dmzx.mchat.core:page_whois }
dmzx_mchat_action_add_controller:
path: /mchat/action/add
methods: [POST]
defaults: { _controller: dmzx.mchat.main.controller:action }
requirements:
action: 'add|edit|del|refresh|whois'
defaults: { _controller: dmzx.mchat.core:action_add }
dmzx_mchat_action_edit_controller:
path: /mchat/action/edit
methods: [POST]
defaults: { _controller: dmzx.mchat.core:action_edit }
dmzx_mchat_action_del_controller:
path: /mchat/action/del
methods: [POST]
defaults: { _controller: dmzx.mchat.core:action_del }
dmzx_mchat_action_refresh_controller:
path: /mchat/action/refresh
methods: [POST]
defaults: { _controller: dmzx.mchat.core:action_refresh }
dmzx_mchat_action_whois_controller:
path: /mchat/action/whois
methods: [POST]
defaults: { _controller: dmzx.mchat.core:action_whois }

View File

@@ -1,11 +1,11 @@
imports:
- { resource: tables.yml }
- { resource: config_2_0_0.yml }
services:
dmzx.mchat.acp.controller:
class: dmzx\mchat\controller\acp_controller
arguments:
- '@dmzx.mchat.functions'
- '@template'
- '@log'
- '@user'
@@ -14,7 +14,7 @@ services:
- '@request'
- '@dmzx.mchat.settings'
- '%dmzx.mchat.table.mchat%'
- '%dmzx.mchat.table.mchat_deleted_messages%'
- '%dmzx.mchat.table.mchat_log%'
- '%core.root_path%'
- '%core.php_ext%'
dmzx.mchat.ucp.controller:
@@ -28,12 +28,6 @@ services:
- '@dmzx.mchat.settings'
- '%core.root_path%'
- '%core.php_ext%'
dmzx.mchat.main.controller:
class: dmzx\mchat\controller\main_controller
arguments:
- '@user'
- '@dmzx.mchat.core'
- '@request'
dmzx.mchat.core:
class: dmzx\mchat\core\mchat
arguments:
@@ -59,10 +53,11 @@ services:
- '@log'
- '@dbal.conn'
- '@cache.driver'
- '@dispatcher'
- '%core.root_path%'
- '%core.php_ext%'
- '%dmzx.mchat.table.mchat%'
- '%dmzx.mchat.table.mchat_deleted_messages%'
- '%dmzx.mchat.table.mchat_log%'
- '%dmzx.mchat.table.mchat_sessions%'
dmzx.mchat.settings:
class: dmzx\mchat\core\settings
@@ -70,8 +65,6 @@ services:
- '@user'
- '@config'
- '@auth'
- '%dmzx.mchat.config_global%'
- '%dmzx.mchat.config_ucp%'
dmzx.mchat.acp.listener:
class: dmzx\mchat\event\acp_listener
arguments:
@@ -89,6 +82,16 @@ services:
- '@dmzx.mchat.core'
- '@controller.helper'
- '@user'
- '@request'
- '%core.php_ext%'
tags:
- { name: event.listener }
dmzx.mchat.cron.task.mchat_prune:
class: dmzx\mchat\cron\mchat_prune
arguments:
- '@dmzx.mchat.functions'
- '@dmzx.mchat.settings'
calls:
- [set_name, [cron.task.mchat_prune]]
tags:
- { name: cron.task }

View File

@@ -1,4 +1,4 @@
parameters:
dmzx.mchat.table.mchat: %core.table_prefix%mchat
dmzx.mchat.table.mchat_deleted_messages: %core.table_prefix%mchat_deleted_messages
dmzx.mchat.table.mchat_log: %core.table_prefix%mchat_log
dmzx.mchat.table.mchat_sessions: %core.table_prefix%mchat_sessions