News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Notify for all replies on boards?

Started by elr0y, February 08, 2009, 11:43:07 PM

Previous topic - Next topic

phaeth

I was just thinking about this topic and it would be easy to create a mod to do this (I believe.. I'd have to look at the code).   We would need to intercept the process when a thread/reply is created to start a new process that simply grabs all users on the "mailing list" and in addition to creating the new thread/reply, the process would mail out a copy of same to each on the "mailing list". 

An additional option would need to be added to the admin panel to manually add people to the mailing list.  Or better yet, by default users would not be able to turn on mailing list mode unless given prior permission by an admin or moderator.   This would then give the board admins the ability to control how many people at one time are using the feature.

Perhaps, for this feature, a requirement would be to use the board admin's SMTP server?  Not sure if this would make any difference... it just jumped in my mind and I haven't thought about it all really... i'm just blabbing and that's the signal that I should stop typing.

Enjoy.

metal450

Quote from: phaeth on June 17, 2009, 12:42:12 AM
Don't know why this doesn't receive more support from the creators of SMF.

I couldn't agree more.  I tried to make my case, which seemed pretty sound to me, but it became apparent that it's not a high priority so I gave up on it as an option :P

青山 素子

No matter how much support this gets, it won't be in 2.0 as that is feature-locked. If we start adding yet more features, you'll be looking at a much longer time before 2.0 sees the light.
Motoko-chan
Director, Simple Machines

Note: Unless otherwise stated, my posts are not representative of any official position or opinion of Simple Machines.


phaeth

#23
I went through the code to find the section responsible for the email notifications.  The area responsible is part of the post.php:


// Notify members of a new post.
function notifyMembersBoard()
{
global $board, $topic, $txt, $scripturl, $db_prefix, $language, $user_info;
global $ID_MEMBER, $modSettings, $sourcedir;

// Can't do it if there's no board. (won't happen but let's check for safety and not sending a zillion email's sake.)
if (empty($board))
trigger_error('notifyMembersBoard(): Can\'t send a notification without a board id!', E_USER_NOTICE);

require_once($sourcedir . '/Subs-Post.php');

$message = stripslashes($_POST['message']);

// Censor the subject and body...
censorText($_POST['subject']);
censorText($message);

$_POST['subject'] = un_htmlspecialchars($_POST['subject']);
$message = trim(un_htmlspecialchars(strip_tags(strtr(parse_bbc($message, false), array('<br />' => "\n", '</div>' => "\n", '</li>' => "\n", '&#91;' => '[', '&#93;' => ']')))));

// Find the members with notification on for this board.
$members = db_query("
SELECT
mem.ID_MEMBER, mem.emailAddress, mem.notifyOnce, mem.notifySendBody, mem.lngfile,
ln.sent, mem.ID_GROUP, mem.additionalGroups, b.memberGroups, mem.ID_POST_GROUP
FROM ({$db_prefix}log_notify AS ln, {$db_prefix}members AS mem, {$db_prefix}boards AS b)
WHERE ln.ID_BOARD = $board
AND b.ID_BOARD = $board
AND mem.ID_MEMBER != $ID_MEMBER
AND mem.is_activated = 1
AND mem.notifyTypes != 4
AND ln.ID_MEMBER = mem.ID_MEMBER
GROUP BY mem.ID_MEMBER
ORDER BY mem.lngfile", __FILE__, __LINE__);
while ($rowmember = mysql_fetch_assoc($members))
{
if ($rowmember['ID_GROUP'] != 1)
{
$allowed = explode(',', $rowmember['memberGroups']);
$rowmember['additionalGroups'] = explode(',', $rowmember['additionalGroups']);
$rowmember['additionalGroups'][] = $rowmember['ID_GROUP'];
$rowmember['additionalGroups'][] = $rowmember['ID_POST_GROUP'];

if (count(array_intersect($allowed, $rowmember['additionalGroups'])) == 0)
continue;
}

loadLanguage('Post', empty($rowmember['lngfile']) || empty($modSettings['userLanguage']) ? $language : $rowmember['lngfile'], false);

// Setup the string for adding the body to the message, if a user wants it.
$body_text = empty($modSettings['disallow_sendBody']) ? $txt['notification_new_topic_body'] . "\n\n" . $message . "\n\n" : '';

$send_subject = sprintf($txt['notify_boards_subject'], $_POST['subject']);

// Send only if once is off or it's on and it hasn't been sent.
if (!empty($rowmember['notifyOnce']) && empty($rowmember['sent']))
sendmail($rowmember['emailAddress'], $send_subject,
sprintf($txt['notify_boards'], $_POST['subject'], $scripturl . '?topic=' . $topic . '.new#new', un_htmlspecialchars($user_info['name'])) .
$txt['notify_boards_once'] . "\n\n" .
(!empty($rowmember['notifySendBody']) ? $body_text : '') .
$txt['notify_boardsUnsubscribe'] . ': ' . $scripturl . '?action=notifyboard;board=' . $board . ".0\n\n" .
$txt[130], null, 't' . $topic);
elseif (empty($rowmember['notifyOnce']))
sendmail($rowmember['emailAddress'], $send_subject,
sprintf($txt['notify_boards'], $_POST['subject'], $scripturl . '?topic=' . $topic . '.new#new', un_htmlspecialchars($user_info['name'])) .
(!empty($rowmember['notifySendBody']) ? $body_text : '') .
$txt['notify_boardsUnsubscribe'] . ': ' . $scripturl . '?action=notifyboard;board=' . $board . ".0\n\n" .
$txt[130], null, 't' . $topic);
}
mysql_free_result($members);

// Sent!
db_query("
UPDATE {$db_prefix}log_notify
SET sent = 1
WHERE ID_BOARD = $board
AND ID_MEMBER != $ID_MEMBER", __FILE__, __LINE__);
}


I'll go through this section when I have more time to create a suitable structure that does the following:


  • checks a new table "MailingList" for users and the boards they are subscribed to.
  • selects users from the table where the board id is equal to the current board id
  • makes sure that the user that created the post is not sent a notification on his own topic

*we would not have to use a switch to turn on/off notifications of each topic until they visit the topic, because the idea is to have each reply delivered directly to the member's email address.  The whole goal is to not have to go to the forum to check a post, we want it to come to us as a user automatically.
**it is also of concern that when a user is added to a mailing list for a board that he receives an email letting the user know of their new status and to give them the ability to cancel it.  Additionally, this notice should also inform the user to not turn on the other original notification feature of the SMF forum or they potentially will receive multiple notifications on the same board.  Perhaps, after it is complete, adding in code that will check the current notification subscribers and remove them as they are added to the mailing list as to pre-empt this conflict.
***additionally, perhaps code needs to be modified so that it actually sends the contents of the post and by whom with date time stamp (mirroring the post) contrary to the current method where you get a link and it sends you to the forum.  I'm not sure about this, as it makes more sense (I believe) to send the user directly to the forum.  Perhaps a hybrid of both is best, because, not all users have mobile devices that can view websites with ease, but if they can get anything on their mobile device...it's email. I think a hybrid is best... and I'm thinking while I type again.  Time to move on.


A separate section will then need to be added to the Admin CP to add users by board.  Users will not have the option to add themselves to the list.  This is to make sure that admins know who they are potentially sending spam too.

Additionally, once added, members will be able to remove themselves from the mailing.  Although it requires an admin to add them, they don't need an admin to remove them.  Perhaps creating a link in the email for those on this list to be able to remove themselves directly from the email would also be good...

So, this mod would require a modification to the post.php and the control panel.  And an additional table to be created to manage the users of the mailing list.

If anyone has any suggestions on improvements to what I suggested, then please add them before I begin the work.

Aleksi "Lex" Kilpinen

I'm thinking, should this / could this be moved over to mod requests?
Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

jallinder

I would love to see this made into a mod. Several users in a couple of the SMFs I run are switching over from a mailing list and seem to be having a hard time with the transition. The ability to subscribe to all replies would be a great option for these people as well as moderators.
Jan A. Allinder
Digital Imaging Group
[url]http://www.digllc.net[\url]

Aleksi "Lex" Kilpinen

Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

witchypaws

I too would like to see this feature, I also have some clients swapping over from mailing lists to forums and the members have a hard time with the conceptual differences. They want the functionality of a forum, threads, information that is saved and stored for later viewing, etc but they don't want to have to bother with going to th epage or logging in all the time. In other words, they want it all in one package. Very hard to deliver. Other that this feature not being available smf would be our preferred choice of software

djphelan

I absolutely agree this is a must have feature.  I just recently finished setting up a forum and was sorely disappointed SMF did not support.

witchypaws

I agree it's a real drag but my clients don't

They want it, which means I had to install another program phpbb as they have a mod that allows you to do this

Their mod allows the feature to be turned off for users that request it by the admin and that is enough for the client but they absolutely insisted it be installed for their members

Which meant using a different forums software

Cheers

witchypaws

boardhead

I too support adding this feature.

For me, simply adding checkboxes for all boards and a "Subscribe" button to the "Notifications and Email" section of your profile would be great -- then I could subscribe to multiple boards at once or all of them very easily.

Please consider adding this feature.

Thanks.

- Phil

mdschulte

For what it is worth, I would also like to see a feature to send email notifications on all posts, including replies.

I run a very small forum and would like an easy way to get notifications to my users of new posts.  They are all non-techie and can barely figure out how to log on, so if I could have an option to turn on a "Notify All" feature for every user that would be ideal.

青山 素子

Due to major concerns over mail abuse, this probably won't be in the core for quite some time.

As a workaround, use an RSS to Mail service:

FeedMyInbox
FeedMailer

There are also several others, these are just the first two no-cost ones I could find.
Motoko-chan
Director, Simple Machines

Note: Unless otherwise stated, my posts are not representative of any official position or opinion of Simple Machines.


jeb54321

#33
Not to beat a dead horse, but this feature is important to me as well, and I thought my experience might be of some value to the developers.

I've used forum (and newsgroup) software since the early 80s.  I have forums I use on a daily basis.  I fully embrace forum technology as the ultimate form of collaboration. 

When I started a new job a while back at a major university, I was surprised to find that forums were not used here.  Listservers are the order of the day here.  There are dozens of listservers, and perhaps a thousand or more distribution lists.  Keeping up with what is going on is a registration nightmare and means your mailbox is full constantly of useless chatter you can't control except with arcane, complex filters.

About a year ago I was asked to help start a special interest group within the university.  It seemed like the perfect opportunity to introduce the members to the *wonders* of forum software!  I installed SMF, configured everything, and sat back to see the posts pour in.

Its been a year, and after making hundreds of posts of my own, I have yet to see the community post more than a dozen times.  There are a number of problems here.  Everyone since Ollie North knows that email is just as easily accessible as anything done online, but there is a culture here that seems fearful of the things they post being "carved in stone" of the forum.  Also, they've been using email literally for decades, and the habits here die very, very hard.  I could see the stats.  People were READING the forum.  But no one would reply.

My co-organizer decided while I was on leave to put up a mailing list instead.  VOILA!  Dozens of posts a day!  Wild, romping discussions!  constant jibber-jabber so intense I had to turn off my email notification.  I was shocked.  Shocked I tell you.  It was like a magic switch was thrown.  Email?  Good.  Forum?  Bad.  And there was no cajoling or encouragement I could find to convince people otherwise.

More recently, I convinced my group to try a better collaboration tool than Wiki software, the other main standby here after listservers.  Someone decided to put up a Google Groups list.  Gah!  I *hated* it.  Its like newsgroups - only worse and with less functionality.  But guess what?  My group LOVED it!  Why?  Well, as I found out to my embarrassment one afternoon while sitting at home and posting dozens of test messages - everyone had email notification turned on, and rather than actually read the groups, they were responding to posts through email.

Duh.  What's the point of a group if you do everything in email?  Well, *I* know there are LOTS of reasons, but getting the group to drink the koolaid is going to be another matter.

Sure, I could throw in the towel, start a freaking listserver (well, I don't even have to do that - we've had a group listserver since before I came on board) and say the heck with it.  But I used to work for Digital Equipment Corporation, at one time the second largest computer company in the world, and a company that had over 1000 "forums" (called Notesfiles) back in the eighties before anyone had discovered the internet.  The notesfiles ran the company.  They were more powerful than any collaboration tool I've seen since.  They could leverage a corporate knowledge base in ways the creators never fathomed.

I KNOW how potent forums can be.  I know their value, and its worth the effort to bring people on board with them (lo these many years later when one would THINK they would be the norm).

But here, now, in this place, if I can't provide email notifications, this will never happen.  The culture is just too ingrained.

Me, I could care LESS about this feature.  I read the forum directly as God intended.  But without it, I'll never get the groundswell needed to get it going.

I see it won't be in 2.0, but still, thanks for listening.

[P.S. I totally agree that if email or a listserver is more appropriate, then that is what should be used.  I'm not trying to subvert the product to do something it wasn't intended.  But having the ability to perhaps let the board feed a listserver (not sure how the round trip would work) might let the forum provide the best of both worlds]

Norv

Thank you very much for the feedback and the detailed explanations. Yes, at the end of the day, I'd say that if a tool is more appropriate for a community, and/or closer to what they feel they want from that community themselves, they should just have that one. Everyone will be happy and the community productive, whatever it's about.

However, I do see the point of making a forum easier to operate with other web applications types, even with other styles of using it. After all, to be fair, software is generally used for more purposes than it was intended. Sometimes that seems the wrong thing to do, yes (and you should use the appropriate tool for the job), but sometimes is the way to progress, to extend functionality so that it can be adapted to better respond to people needs. (which I thought it exactly why software is around, for? :) )

I will make sure we take this feature into account, please do note it's not a promise it will indeed be approved and implemented, but it won't be forgotten.
To-do lists are for deferral. The more things you write down the later they're done... until you have 100s of lists of things you don't do.

File a security report | Developers' Blog | Bug Tracker


Also known as Norv on D* | Norv N. on G+ | Norv on Github

davidmcc3

I'd like to add my voice to what metal450 and others have been saying.

I chose SMF after looking at and trying several others (both paid and OS). We use it for the writers group WOW, to post useful information, news, competitions etc. As we all contribute, it would be very cumbersome to use any other method of propogation, and a forum is the only way people can add their thoughts and comments to topics.

We discussed our useage last night at our most recent meeting - everyone would like the feature where they are notified of new posts (not just the current implementation of it).

I belong to other forums where I get notified when anyone posts something new to a thread, whether I visit it or not (the email includes what was posted).

This is definitely what I'd like implemented in SMF. As a builder of websites and solutions, I want to be able to offer my clients the best ... SMF is almost there. Please take one more step in the right direction.

Thank you in anticipation.

青山 素子

davidmcc3, why not use the RSS feed capability? That provides a way to poll for new items and even includes the post contents.
Motoko-chan
Director, Simple Machines

Note: Unless otherwise stated, my posts are not representative of any official position or opinion of Simple Machines.


Mikhailat

I would appreciate a mod like that, because most parts of our board are only visible for certain usergroups, so I can't use a RSS to Mail service to get notified about new posts. (because they only see public posts)

Since I need to respond as fast as possible to some of the new posts, I currently have to subscribe to every board and as soon as there a new topics to every topic. And than I have to hope, that I don't forget a topic ;)

kistner

I realize this is an old post, but I still do not see an option for this.  Has any progress been made?
thanks

Illori

since this is in the mod requests board it will most likely not be a core smf feature, you would have to check the mod site to see if a mod was ever created based on this request.

Advertisement: