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.

All other Modules

Discuss all other Modules here.

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

Private Messaging Module


Reply

34 Posts   4035 Views

Avatar
jonm80

15 January 2010 at 9:08am Community Member, 10 Posts

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

Avatar
Chetan

17 January 2010 at 2:38am Community Member, 1 Post

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

18 January 2010 at 5:57am Community Member, 82 Posts

@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

24 January 2010 at 7:42am Community Member, 82 Posts

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

26 January 2010 at 11:58am Community Member, 82 Posts

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

I've built a little pre-alpha version of this module. [url=https://svn.aschmann.org/dl.php?repname=privatemessage+module&path=%2Ftrunk%2Fprivatemessage%2F&rev=0&isdir=1]Downloadable here[/url].
You can just get a glimpse at the code [url=https://svn.aschmann.org/listing.php?repname=privatemessage+module&path=%2Ftrunk%2Fprivatemessage%2F#path_trunk_privatemessage_]here[/url].
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

26 January 2010 at 5:30pm Community Member, 10 Posts

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

26 January 2010 at 10:45pm Community Member, 82 Posts

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

1 February 2010 at 10:01am Community Member, 82 Posts

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.