Support Forum

Email digest or email notification of posts

UN
Unknown
Member

Our site, George Washington Space Society just migrated from Google Groups to Word Press on dedicated hosting. We installed and use SimplePress for our forum- and we really like it. Only one issue. Previously on Google Groups our members could adjust their profile to be immediately notified of a new post or recieve for example a daily or weekly digest. It worked very well since a lot of our members are busy professionals and dont always recall to visit our site and check for announcements, etc.

Is there way emulate such capability in SimplePress?

r/

Kirk

13 Answers

New Answer

YS Yellow Swordfish
Yellow Swordfish
Member

We don’t currently offer an email digest although there is an open ticket to look into ths for the future.
Forum members can subscribe to topics which will send emails but the auto-subscribe feature only applies to topics they post in.
The best option at the moment are the RSS feeds.

UN
Unknown
Member

There was a- for lack of better word hack that would perform this function. I thought the thread was here in this forum….true?

 

r/

Kirk

YS Yellow Swordfish
Yellow Swordfish
Member

It's fairly simple to change the code to send emails to all members on each post if you know a little php. The file is /library/sf-post-support.php which has the email notification routine in it and selects the users to send it to basefd on subscriptions.

UN
Unknown
Member

ok, uhm is this the code ur talking of?

 

…in /library/sf-post-support.php (line 89):

sf_send_email($admins_email, __('Forum Post', “sforum”).': '.substr($topicname,0,30).'…'.' ['.get_option('blogname').']', $msg, '', $header);

I think the red one is a bug… sf_send_email() accepts only 4 parameters

YS Yellow Swordfish
Yellow Swordfish
Member

Yes we know. That has been cleaned up in the next update – 4.3.4

But that isn’t the bit you want. You want the next section which deals with subscriptions

UN
Unknown
Member

Is there a chance some code prototype might be offered? I looked at the subscription section and its not apparent how to go about enabling notification of posts to the members. I'm getting more and more querries from our members as to why they are not recieving their notifications like they used to from Google Groups. Any insights appreciated.

r/

Kirk

MP Mr Papa
Mr Papa
Member

not sure what you want Kirk…  members can already subscribe to topics… and can auto subscribe to topics they post in…  thats very similar to google groups…  there is no digest ability and thats a serious code change…

but if you want them to be notified of EVERY new post in the forum change

$users=$wpdb->get_var("SELECT topic_subs FROM ".SFTOPICS." WHERE topic_id=".$newpost['topicid']);

to

$users=$wpdb->get_col("SELECT user_id FROM ".SFMEMBERS);

and coment out or remove this line

$users = unserialize($users);

and you should be close… obviously havent tested so you may need to play with it…  and this will send ALL users an email on EVERY new post…  so BEWARE of the load on your server if you have lots of members or a busy forum…

and that code is in sf-post-support.php around line 95…

UN
Unknown
Member

Hmm. I gave it shot and the my test time out with this message:

“Forum not set – Unable to create post”

I refreshed the page and my test post appears in the particular forum. I waited a few mintues and the email account under my profile (as site admin) didnt get a notification. Is the code change the only mod I must do? Or as you say this is “close”.

UN
Unknown
Member

I must correct myself. One of our users claims they got a notification. Appears to work but not “cleanly”? i.e. it took about 15 secs for the aforementioned error msg to appear, and then I only saw my post when refreshed the browser.

Thoughts?

YS Yellow Swordfish
Yellow Swordfish
Member

Hopw many users do you have? Sounds like it might have timed out.

MP Mr Papa
Mr Papa
Member

one of the reasons why we dont offer this solution…  lots of users means lots of resources required…  your php error log should give more info on what happened… could be php memory issue or as andy says, a cpu timeout issues…  you should be able to increase both of those in your php.ini file..

UN
Unknown
Member

Were a pretty small group, so far 115 members. I modified the php.ini file as follows:

 

max_execution_time = 120     ; #Maximum execution time of each script, in seconds
max_input_time = 120 ; #Maximum amount of time each script may spend parsing request data
memory_limit = 128M      ; #Maximum amount of memory a script may consume

And it works! No time out now.

Listen guys I completely understand the hesitation on implementing such a feature. However our users were really starting to complain and if I could not get this fixed it would have meant dropping SimplePress- which I REALLY did not want to do. Its great software. Really appreciate the assist. I hope you guys can implement a Digest Feature in a future release in a way that is resource benign.

MP Mr Papa
Mr Papa
Member

its on the list, but not likley to make the initial 5.0 list…  but could become plugin after that..