Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

All other Modules /

Discuss all other Modules here.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Private Messaging Module


Go to End


34 Posts   8035 Views

Avatar
jonm80

Community Member, 12 Posts

15 January 2010 at 9:08am

funny lol, no reply since april and within a day 3 people working on it

Avatar
Chetan

Community Member, 1 Post

17 January 2010 at 2:38am

Hi ,

I am new to silverstripe cms, I require some guideline on how to add a new module in the admin cms. If you could assist some help for me, I would be very graceful to you. If you have any help doc with respect to silverstripe cms, please provide me the same. My email address is chetank25@gmail.com.

Thanks in advance!

Regards,

Chetan

Avatar
Euphemismus

Community Member, 82 Posts

18 January 2010 at 5:57am

@Chetan:
There might be better places than this thread for your question :-)
Module installation in short words:
- copy module folder to your Silverstripe directory
- run http://yoursiteurl/dev/Build
- expirience your newly installed module

@jonm80:
First I thought "just extend the code" and now I'm in the middle of writing it completely from scratch.
Since the data had to be splitted into two tables (messages & attributes) I thought, some jQuery and Ajax might be nice, too.
Hopefully I can present a working prototype the upcoming week. At the moment most of the frontend-stuff with inbox/archive/sent folders, the Ajax handling etc. is done and I'm working on the data-stuff within the models :-)

regards,
Marc

Avatar
Euphemismus

Community Member, 82 Posts

24 January 2010 at 7:42am

As a short report:
I hab less time this week than I expected but I'm working on it atm.
implemented the delete and archive methods, the ajaxified interface and some other stuff. Hopefully I can present a (fully) working module soon :-)

greets,
Marc

Avatar
Euphemismus

Community Member, 82 Posts

26 January 2010 at 11:58am

Because I really like answering my own posts... ;-)

I've built a little pre-alpha version of this module. Downloadable here.
You can just get a glimpse at the code here.
Not the finest code and surely not the best oop, but at least I tried ;-)

What can it do?

  • you have a private message page
  • 3 folders: inbox, archive and sent
  • you can move messages from inbox to archive
  • you can delete messages (will set a "IsDeleted" flag)
  • messages are shown as a list (pagination missing)
  • message details are shown as a separate page
  • receivers can be one or more (there's some checking, needs refinement and a suggest/autocomplete-javascript)
  • optional e-mail message for receiver on new messages (switchable in admin backend)
  • optional nickname support (atm only nicknames OR real names)
  • all ajax (don't cry, I used simplest encapsulated jQuery and I really got mad sometimes with the logic -.-)

What can't it do (yet)?

  • no *final* deleting messages yet, everything is only flagged in database. I'm unsure if I should create a "cleanup" button or a check when deleting messages like "if message and all attributes have 'IsDeleted' = 1, delete all datasets".
  • the counts in the private message's menu aren't ajaxed, yet. So numbers will stay until pageload
  • lot's of things I haven't seen/thought of, yet

So if anyone's out for alphatesting... otherwise I'll continue this path ;-)
In case someone is interested in coding, I can share SVN access - but beware: I'm not so into the Silverstripe coding guidlines. I tend to use typified variable names and so on ;-)

Regards,
Marc

Avatar
jonm80

Community Member, 12 Posts

26 January 2010 at 5:30pm

ill have a look at this in a few days, a bit busy with work at the mo, plus im working on a new module

as for the final deleting, i would check to see if both have marked as deleted, so when the second mark is made it will delete, i dont see the point in cleaning up. the ajax stuff is beyond me at this point, so cant comment there.

will post back in a few :) but a quick scan looks quite nice;)

Avatar
Euphemismus

Community Member, 82 Posts

26 January 2010 at 10:45pm

Hi jonm80,

thanks for the test!
The check for "IsDeleted" might be costly, because you can send a message to several receipients at once.
Therefore a PrivateMessage dataset wil be created and for every receiver a separate PrivateMessageAttributes dataset as 1:n.
So I can make sure, every user can put his messages into folders, delete, and so on.
I'll meditate on that :-)

Regards,
Marc

Avatar
Euphemismus

Community Member, 82 Posts

1 February 2010 at 10:01am

And me again:
Had a little bit of time this weekend and began implementing the "delete everything if all message-parts are 'IsDeleted==true'" and added an jQuery autosuggest for the username. Don't know yet if it collides with the comma-separated multiple user, but we'll see.