New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the Community Exchange, where community members ask and answer questions about DNN. To get started, just start typing your question below and either select one of the suggested questions or ask a new question of your own.

Social Notifications

Return to previous page

  • 5/29/2015
  • 2695 Views

Question:

Team Bound 9 years ago

Hello

I need some help concerning journal notifications. I know a lot of people are looking for a way to send notifications to groups, friends/followers when a post is made to the journal. This is something that has become urgent and I think I have  short term solution and wanted to get your thoughts.

My focus is social groups at the moment.

DNN core messaging has a number of tables that get populated when a notification event occurs like when someone joins or starts a group, friend request etc.

How difficult would it be to create a sql script that looks at the journal table for a period of time (hourly, daily, Weekly, monthly) and makes entries into the appropriate core messaging tables that then DNN could handle the distribution of the notification based on the users preference set in their profile. I don't want a user to get a lot of notifications so I want to create a digest based on preference.

Because I am interested in a group notification (only members of the group would receive the notifications) the script would need to look-up all users in the group role and create an entry for each user. 

Could anyone help with this sql? I am surprised that someone has not created a module for this :)

Thanks for your thoughts/advice

Top Answer:

cathal connolly 9 years ago

Note: DNN already supports digest emails -

http://www.dnnsoftware.com/wiki/message-dispatch-scheduler

As to your question, please don't use sql, you'll likely break something -you should use an API such as the subscription API to build this -

http://www.dnnsoftware.com/wiki/subscription-api

Team Bound
Team Bound 9 years ago
Hi Cathal

Thanks for the response. Unfortunately most of the modules that I am working with do not utilize the subscription api and I need a way to digest journal notifications. I thought a sql script would be easier. If I were a programmer, I would write an amazing journal notification module using the api. I am surprised that the developer community has not come up with a module to do this.

thoughts?

Carl
cathal connolly
cathal connolly 9 years ago
@carl norloff I'd still suggest you don't do direct sql as a single mistake could cause a referential integrity issue and break platform function.

If you cant use the subscription API then a simpler approach is to just add messages via that API i.e. generate a list of relevant users and roles and then your text and do something like:

var message = new DotNetNuke.Services.Social.Messaging.Message { Subject = "your subject", Body = "some body text") };
MessagingController.Instance.SendMessage(message, roles, users, null);
Team Bound
Team Bound 9 years ago
@cathal connolly Thanks Cathal. I agree. I can't afford to have anything break the platform. I'll have to find a DNN programmer that can help.

Thanks!
Sign In to Participate
Or register to become a member