How to extend modUserMessage?

Hello,

I am thinking about to use the table _mod_user_messages for messaging system.
So I would like to extend table.

I found out that this is part of modx core system.

So, how could I extend without overriding core so that it is updateable?
I tried out the extra PersonalMessages, but this delivers only snippets and use core modules.

Thank you in advance.

Bye
Chris

What exactly are you trying to do? Add more fields to a user-message?


Maybe you could do something similar to the ClassExtender extra and add your own class that has a relationship to MODX\Revolution\modUserMessage.


But probably it’s easier to create your own custom solution without using MODX\Revolution\modUserMessage at all.

I want to use existing table “_mod_user_messages”.

This has the advantage, that in CMP I cant send a message to all user.
And I can use this for user messaging in front end.

So I only want to add only one field to this table.
And I thinkg about how could I extend this without overriding core?

Thank you in advance.

Bye
Chris

Like I said, you could create a custom database table with the foreign key of the related modUserMessage and your own additional custom field.

But I think there is no easy way to extend the manager page /manager/?a=security/message and you’d probably have to create a CMP to handle messages in the manager anyway.


You can replicate that. Just look at the processors in core/src/Revolution/Processors/Security/Message/. I don’t think you gain much from trying to use modUserMessage.

I wrote [MessageManager](MODX Extras | MessageManager 1.0.2-pl) a long time ago, so I’m not sure it still works. It simplifies the messaging system, lets users send and receive messages in the front end, and it supports messages to all users in a user group.