This seems like a great idea for a module. Thanks for sharing it!

I think that the delivery portion of this module could be improved, however, if it integrated with a different message delivery system. We have already three different ways of sending messages to site users:
http://drupal.org/project/pm_lite
http://drupal.org/project/privatemsg
http://drupal.org/project/privatenodemsg

Each of these provides similar features to this Notices module but is more robust in other ways. For example, the fact that messages from Notices are deleted as soon as they are viewed is something that should be an optional feature, IMO. If the Notices module were to use a different delivery mechanism then it would be easier to collaborate on making that optional. Did you investigate integration with one of these modules? Would you consider it in the future?

Comments

liquidcms’s picture

When i was tasked to put this functionality together for my clients site i wanted something i could put together pretty quickly. I took a quick look through all the existing mail modules and didnt see anything that fit the bill. I think i looked at all 3 modules you list here but don't think any are even close to what Notices does (??). Perhaps you have missed the purpose of this module?

The intent of this module is not to send messages to site users. It's hope was simply keep a record of emails that other modules send out using drupal_mail or mimemail (assuming the patch i submitted is applied to mimemail).

Effectively it just captures the site's emails to its users in case they missed them. I think the prv msg modules you are referring to do a non-email, internal msging system - notices does not attempt to do anything with modules of this type.

The "delete on read" feature was something i thought should be added. Will likely add that in tomorrow as it should only take a few minutes to do.

BTW - we currently use Actions module as well as simplenews (with mimemail) and also any core drupal mail outs on our system and Notices "captures" all of these.

greggles’s picture

Thanks for the response.

I very much understand the purpose of this module (and am excited about it). Let's step back a bit for a second.

In general, "private message" types of modules allow users to send messages to other users which are displayed within the site. They handle all sorts of functionality related to how those messages are shown to the user - integration into the menu system, etc.

In short - User 1 messages User 2:

User 1 -> writes arbitrary message -> displays within site to -> User 2

The Notices module follows a fairly similar flow:

Notices Module -> captures system email intended for User 2 -> displays within site to -> User 2

The only difference in these flows is the beginning two steps. Why not leverage something like a "private message" module for the last steps in the on-site delivery?

liquidcms’s picture

ok, i see now what you meant - have the modules that send internal mail, that Notices captures, simply funnel to an existing internal mail module like privatemsg.

Yes, this sounds like it "would have been" a reasonable approach - would this then have been simply added as an admin configurable option to one of these existing modules? I guess i would have to see what those modules add to my requirement - since, for example, my clients site has no use for an internal mail system.

In the end, i am not quite sure what you are looking for?? Were you looking for me to NOT create more mail modules but to use existing ones and simply expand their feature set - i like this idea; but again, any module that provides an internal mail system feature would not work for me.

In the end, this module took me less than an hour to write up and fit exactly what my client was looking for. My client has now ok'ed me to add the following 4 features:

* Delete-on-read as a configurable option for the user.
* Limiting the number of notices in the block with a more link.
* Roles selection for who gets notices
* Admin configurable Notice expiry.

Likely about another hour to add these features - so unless you are suggesting trying to tie this into an existing prv msg module is going to be quicker than that to devel??

Leeteq’s picture

Ref. "For example, the fact that messages from Notices are deleted as soon as they are viewed is something that should be an optional feature, IMO."

New feature request: "Delete viewed notices after X days"
http://drupal.org/node/267952

greggles’s picture

I'm not sure if it will be easier in the short run to do this integration. My claim is more that in the long run - across upgrades of Drupal versions, for example - that this would be the lower maintenance and more robust solution.

I disagree about "any module that provides an internal mail system feature would not work for me." You need an internal means of delivering messages - but you don't want to show that interface to site users, right? So...hopefully one of these modules has the ability to turn off that part of the UI or, if not, you could add that permission/option ;)

My goal is to share ideas about how to architect modules to make them "modular" and extensible. Nothing more.

liquidcms’s picture

this should have been added as a separate issue... but latest rel (just committing now to cvs) adds these features (and more)

liquidcms’s picture

Status: Active » Closed (won't fix)
greggles’s picture

Just to be clear by "adds these features" and then "won't fixing" this issue you mean that you added a bunch of features and don't plan to integrate with a separate message delivery mechanism.