diff --git a/README.md b/README.md index dbc1e24..52837a8 100755 --- a/README.md +++ b/README.md @@ -28,6 +28,7 @@ DEPENDENCIES ------------ The message_private module requires the following modules: * Message (https://drupal.org/project/message) + * Message Notify (https://drupal.org/project/message_notify) * Message UI (https://drupal.org/project/message_ui) @@ -86,11 +87,7 @@ E.G: DEVELOPMENT AND TEST -------------------- - * Threads / Conversations will be created: https://www.drupal.org/node/2504863. - An admin setting can be used to enable or disable threads to turn on/off - replies on all private messages (Reply, Reply All). Perhaps a css file will - need to be added for indentation / presentation. Integrate with MessageJS, - nodeJS or socket.io. + * Integrate with Message FOS (FOSMessage) bridge module. * Flag module on user entity to block/unblock users from messaging them * Flag module on message entity to show/hide (delete) messages from users own display diff --git a/config/install/core.entity_form_display.message.private_message.default.yml b/config/install/core.entity_form_display.message.private_message.default.yml new file mode 100644 index 0000000..cd72325 --- /dev/null +++ b/config/install/core.entity_form_display.message.private_message.default.yml @@ -0,0 +1,37 @@ +uuid: c29de1ec-0ac1-4ba9-8b8a-39a0168e226b +langcode: en +status: true +dependencies: + config: + - field.field.message.private_message.field_message_private_body + - field.field.message.private_message.field_message_private_subject + - field.field.message.private_message.field_message_private_to_user + - message.type.private_message +id: message.private_message.default +targetEntityType: message +bundle: private_message +mode: default +content: + field_message_private_body: + type: string_textarea + weight: 0 + settings: + rows: 5 + placeholder: '' + third_party_settings: { } + field_message_private_subject: + type: string_textfield + weight: 0 + settings: + size: 60 + placeholder: '' + third_party_settings: { } + field_message_private_to_user: + type: entity_reference_autocomplete + weight: 0 + settings: + match_operator: CONTAINS + size: 60 + placeholder: '' + third_party_settings: { } +hidden: { } diff --git a/config/install/core.entity_view_display.message.private_message.default.yml b/config/install/core.entity_view_display.message.private_message.default.yml new file mode 100644 index 0000000..c4f9ca5 --- /dev/null +++ b/config/install/core.entity_view_display.message.private_message.default.yml @@ -0,0 +1,39 @@ +uuid: d1c2b0f2-5dc9-43f4-ad7c-6f48b3a3cff4 +langcode: en +status: true +dependencies: + config: + - field.field.message.private_message.field_message_private_body + - field.field.message.private_message.field_message_private_subject + - field.field.message.private_message.field_message_private_to_user + - message.type.private_message +id: message.private_message.default +targetEntityType: message +bundle: private_message +mode: default +content: + field_message_private_body: + type: basic_string + weight: 0 + label: above + settings: { } + third_party_settings: { } + field_message_private_subject: + type: string + weight: 0 + label: inline + settings: + link_to_entity: false + third_party_settings: { } + field_message_private_to_user: + type: entity_reference_label + weight: 0 + label: inline + settings: + link: true + third_party_settings: { } + partial_0: + weight: 0 + settings: { } + third_party_settings: { } +hidden: { } diff --git a/config/install/core.entity_view_display.message.private_message.mail_body.yml b/config/install/core.entity_view_display.message.private_message.mail_body.yml new file mode 100644 index 0000000..64a13cd --- /dev/null +++ b/config/install/core.entity_view_display.message.private_message.mail_body.yml @@ -0,0 +1,22 @@ +uuid: 30904996-e2ce-4102-9299-09a7a6573bd0 +langcode: en +status: true +dependencies: + config: + - core.entity_view_mode.message.mail_body + - field.field.message.private_message.field_message_private_body + - field.field.message.private_message.field_message_private_subject + - field.field.message.private_message.field_message_private_to_user + - message.type.private_message +id: message.private_message.mail_body +targetEntityType: message +bundle: private_message +mode: mail_body +content: + partial_1: + weight: 0 +hidden: + field_message_private_body: true + field_message_private_subject: true + field_message_private_to_user: true + partial_0: true diff --git a/config/install/core.entity_view_display.message.private_message.mail_subject.yml b/config/install/core.entity_view_display.message.private_message.mail_subject.yml new file mode 100644 index 0000000..1622845 --- /dev/null +++ b/config/install/core.entity_view_display.message.private_message.mail_subject.yml @@ -0,0 +1,22 @@ +uuid: e6d9fdf0-63fb-4518-a2ff-31f9dc3079d8 +langcode: en +status: true +dependencies: + config: + - core.entity_view_mode.message.mail_subject + - field.field.message.private_message.field_message_private_body + - field.field.message.private_message.field_message_private_subject + - field.field.message.private_message.field_message_private_to_user + - message.type.private_message +id: message.private_message.mail_subject +targetEntityType: message +bundle: private_message +mode: mail_subject +content: + partial_0: + weight: 0 +hidden: + field_message_private_body: true + field_message_private_subject: true + field_message_private_to_user: true + partial_1: true diff --git a/config/install/field.field.message.private_message.field_message_private_body.yml b/config/install/field.field.message.private_message.field_message_private_body.yml new file mode 100644 index 0000000..962b086 --- /dev/null +++ b/config/install/field.field.message.private_message.field_message_private_body.yml @@ -0,0 +1,21 @@ +uuid: 94a69bc5-0e6f-40d9-ac64-b534facaae95 +langcode: en +status: true +dependencies: + config: + - field.storage.message.field_message_private_body + - message.type.private_message +_core: + default_config_hash: pJ31I7cSY8uoEz0deyB78BXJdE7gjs-jnfmHFW_FpAQ +id: message.private_message.field_message_private_body +field_name: field_message_private_body +entity_type: message +bundle: private_message +label: Body +description: 'Enter message text.' +required: true +translatable: false +default_value: { } +default_value_callback: '' +settings: { } +field_type: string_long diff --git a/config/install/field.field.message.private_message.field_message_private_subject.yml b/config/install/field.field.message.private_message.field_message_private_subject.yml new file mode 100644 index 0000000..245293a --- /dev/null +++ b/config/install/field.field.message.private_message.field_message_private_subject.yml @@ -0,0 +1,23 @@ +uuid: cf292e80-c1b8-4bf8-8cb0-a7c5e6e26806 +langcode: en +status: true +dependencies: + config: + - field.storage.message.field_message_private_subject + - message.type.private_message +_core: + default_config_hash: qbIzNtN7amEbCO0VrcDJtqc_T18qsnHpV8DakClDBrc +id: message.private_message.field_message_private_subject +field_name: field_message_private_subject +entity_type: message +bundle: private_message +label: Subject +description: 'Enter message subject.' +required: false +translatable: false +default_value: + - + value: 'Private Message' +default_value_callback: '' +settings: { } +field_type: string diff --git a/config/install/field.field.message.private_message.field_message_private_to_user.yml b/config/install/field.field.message.private_message.field_message_private_to_user.yml new file mode 100644 index 0000000..06ae395 --- /dev/null +++ b/config/install/field.field.message.private_message.field_message_private_to_user.yml @@ -0,0 +1,30 @@ +uuid: 594945a2-0182-4acb-9649-28648e1c2694 +langcode: en +status: true +dependencies: + config: + - field.storage.message.field_message_private_to_user + - message.type.private_message +_core: + default_config_hash: t64WDBnlclOIEL1--tV8MkrvOrIGJ121lW3NJa9Xpsk +id: message.private_message.field_message_private_to_user +field_name: field_message_private_to_user +entity_type: message +bundle: private_message +label: 'To User' +description: 'Select user accounts to receive message.' +required: true +translatable: false +default_value: { } +default_value_callback: '' +settings: + handler: 'default:user' + handler_settings: + include_anonymous: false + filter: + type: _none + target_bundles: null + sort: + field: _none + auto_create: false +field_type: entity_reference diff --git a/config/install/field.field.user.user.field_message_private_usr_notify.yml b/config/install/field.field.user.user.field_message_private_usr_notify.yml new file mode 100644 index 0000000..20a87a5 --- /dev/null +++ b/config/install/field.field.user.user.field_message_private_usr_notify.yml @@ -0,0 +1,24 @@ +uuid: 4fc087c4-d646-4c4f-a467-d2234eaf5fb3 +langcode: en +status: true +dependencies: + config: + - field.storage.user.field_message_private_usr_notify + module: + - user +id: user.user.field_message_private_usr_notify +field_name: field_message_private_usr_notify +entity_type: user +bundle: user +label: 'Message Private Notifications' +description: 'Receive email notifications for new Private Messages.' +required: false +translatable: false +default_value: + - + value: 1 +default_value_callback: '' +settings: + on_label: 'On' + off_label: 'Off' +field_type: boolean diff --git a/config/install/field.storage.message.field_message_private_body.yml b/config/install/field.storage.message.field_message_private_body.yml new file mode 100644 index 0000000..4cb2d2e --- /dev/null +++ b/config/install/field.storage.message.field_message_private_body.yml @@ -0,0 +1,21 @@ +uuid: 6bd4e142-13ee-4ec4-8947-0e489a6f7c11 +langcode: en +status: true +dependencies: + module: + - message +_core: + default_config_hash: V_kmURMHj2yWYO-7UprE0_sw1J8EDHZBhNIfE0HQqF4 +id: message.field_message_private_body +field_name: field_message_private_body +entity_type: message +type: string_long +settings: + case_sensitive: false +module: core +locked: false +cardinality: 1 +translatable: true +indexes: { } +persist_with_no_fields: false +custom_storage: false diff --git a/config/install/field.storage.message.field_message_private_subject.yml b/config/install/field.storage.message.field_message_private_subject.yml new file mode 100644 index 0000000..d9e0c3f --- /dev/null +++ b/config/install/field.storage.message.field_message_private_subject.yml @@ -0,0 +1,23 @@ +uuid: cf3443df-beaf-4e94-95d4-e6461577d4d6 +langcode: en +status: true +dependencies: + module: + - message +_core: + default_config_hash: Dg9x90SguN-2BDkT9idSDAia9BL8rYexkKItNl7u1AQ +id: message.field_message_private_subject +field_name: field_message_private_subject +entity_type: message +type: string +settings: + max_length: 255 + is_ascii: false + case_sensitive: false +module: core +locked: false +cardinality: 1 +translatable: true +indexes: { } +persist_with_no_fields: false +custom_storage: false diff --git a/config/install/field.storage.message.field_message_private_to_user.yml b/config/install/field.storage.message.field_message_private_to_user.yml new file mode 100644 index 0000000..9397b28 --- /dev/null +++ b/config/install/field.storage.message.field_message_private_to_user.yml @@ -0,0 +1,22 @@ +uuid: fdd970ed-47c0-4e2a-9a0a-2385ee3fba4d +langcode: en +status: true +dependencies: + module: + - message + - user +_core: + default_config_hash: bwE2oENG8iTdi12WvMTPoxJo9qQs_g0fe4sxM6sfVQk +id: message.field_message_private_to_user +field_name: field_message_private_to_user +entity_type: message +type: entity_reference +settings: + target_type: user +module: core +locked: false +cardinality: -1 +translatable: true +indexes: { } +persist_with_no_fields: false +custom_storage: false diff --git a/config/install/field.storage.user.field_message_private_usr_notify.yml b/config/install/field.storage.user.field_message_private_usr_notify.yml new file mode 100644 index 0000000..4c24220 --- /dev/null +++ b/config/install/field.storage.user.field_message_private_usr_notify.yml @@ -0,0 +1,20 @@ +uuid: 8475d5d9-a759-4aff-b802-fcfbb5260a16 +langcode: en +status: true +dependencies: + module: + - user +_core: + default_config_hash: 1-4VSfI1AMKOOtKVsXTs11O1fgTNaJiUzXZMlsuCrAI +id: user.field_message_private_usr_notify +field_name: field_message_private_usr_notify +entity_type: user +type: boolean +settings: { } +module: core +locked: false +cardinality: 1 +translatable: true +indexes: { } +persist_with_no_fields: false +custom_storage: false diff --git a/config/install/message.private_message.field_message_private_body.yml b/config/install/message.private_message.field_message_private_body.yml index 8ab9365..c263e3a 100644 --- a/config/install/message.private_message.field_message_private_body.yml +++ b/config/install/message.private_message.field_message_private_body.yml @@ -3,7 +3,6 @@ langcode: en status: true dependencies: config: - - field.storage.message.field_message_private_body - message.type.private_message id: message.private_message.field_message_private_body field_name: field_message_private_body @@ -16,4 +15,6 @@ translatable: false default_value: { } default_value_callback: '' settings: { } -field_type: string_long \ No newline at end of file +field_type: string_long +_core: + default_config_hash: Ze5EYRjtg_OHAghu9WOvFaqj1RIxv52N_jKbg8SKAC4 diff --git a/config/install/message.private_message.field_message_private_subject.yml b/config/install/message.private_message.field_message_private_subject.yml index c012fb0..c52be7d 100644 --- a/config/install/message.private_message.field_message_private_subject.yml +++ b/config/install/message.private_message.field_message_private_subject.yml @@ -3,7 +3,6 @@ langcode: en status: true dependencies: config: - - field.storage.message.field_message_private_subject - message.type.private_message id: message.private_message.field_message_private_subject field_name: field_message_private_subject @@ -16,4 +15,6 @@ translatable: false default_value: { } default_value_callback: '' settings: { } -field_type: string \ No newline at end of file +field_type: string +_core: + default_config_hash: ZM87thEjr57CK0evK_aPxuqUKwjukd81fFr1TEyBeZc diff --git a/config/install/message.private_message.field_message_private_to_user.yml b/config/install/message.private_message.field_message_private_to_user.yml index 603f959..6e9e78d 100644 --- a/config/install/message.private_message.field_message_private_to_user.yml +++ b/config/install/message.private_message.field_message_private_to_user.yml @@ -3,7 +3,6 @@ langcode: en status: true dependencies: config: - - field.storage.message.field_message_private_to_user - message.type.private_message id: message.private_message.field_message_private_to_user field_name: field_message_private_to_user @@ -26,3 +25,5 @@ settings: field: _none auto_create: false field_type: entity_reference +_core: + default_config_hash: Duu4JwPBEZvoywiYVIZC2xj0RlqLq2wdIxLVdRf9geI diff --git a/config/install/message.type.private_message.yml b/config/install/message.type.private_message.yml index 7b3f533..9beaf3f 100644 --- a/config/install/message.type.private_message.yml +++ b/config/install/message.type.private_message.yml @@ -2,16 +2,11 @@ uuid: 178850ae-df19-4efa-9d00-e5a5bff20e0f langcode: en status: true dependencies: { } +_core: + default_config_hash: QzVUBM8GTfka1Gk4FkMXtpB__vi9CQkfSbyBeEScCN8 type: private_message label: 'Private Message' description: 'Private Message message type.' text: - "

Private Message -

\r\n" -data: - 'token options': - clear: true - purge: - override: true - enabled: false - quota: null - days: null \ No newline at end of file +settings: { } diff --git a/config/install/user.user.field_message_private_usr_notify.yml b/config/install/user.user.field_message_private_usr_notify.yml index 14e5581..d74f96d 100644 --- a/config/install/user.user.field_message_private_usr_notify.yml +++ b/config/install/user.user.field_message_private_usr_notify.yml @@ -2,8 +2,6 @@ uuid: 39b154d5-bd3c-4b78-bc5d-12784718cb45 langcode: en status: true dependencies: - config: - - field.storage.user.field_message_private_usr_notify module: - user id: user.user.field_message_private_usr_notify @@ -21,4 +19,6 @@ default_value_callback: '' settings: on_label: 'On' off_label: 'Off' -field_type: boolean \ No newline at end of file +field_type: boolean +_core: + default_config_hash: FQ7l9yUuUlcG3NohBfN8XefQm5j3yWwzomCHLLlL_D8