Jump to:

10854 Posts in 2518 Topics by 1794 members

All other Modules

SilverStripe Forums » All other Modules » Private Messaging Module

Discuss all other Modules here.

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

Page: 1 2 3 4 5
Go to End
Author Topic: 3775 Views
  • jonm80
    Avatar
    Community Member
    10 Posts

    Re: Private Messaging Module Link to this post

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

  • Chetan
    Avatar
    Community Member
    1 Post

    Re: Private Messaging Module Link to this 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

  • Euphemismus
    Avatar
    Community Member
    82 Posts

    Re: Private Messaging Module Link to this post

    @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

  • Euphemismus
    Avatar
    Community Member
    82 Posts

    Re: Private Messaging Module Link to this post

    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

  • Euphemismus
    Avatar
    Community Member
    82 Posts

    Re: Private Messaging Module Link to this post

    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

  • jonm80
    Avatar
    Community Member
    10 Posts

    Re: Private Messaging Module Link to this post

    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;)

  • Euphemismus
    Avatar
    Community Member
    82 Posts

    Re: Private Messaging Module Link to this post

    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

  • Euphemismus
    Avatar
    Community Member
    82 Posts

    Re: Private Messaging Module Link to this post

    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.

    3775 Views
Page: 1 2 3 4 5
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.