Firefox PHP

Group Auto-Email Module

Posted by Joe Curia 
All files from this thread

File Name File Size   Posted by Date  
group_autoemail_v1_01.zip 4.8 KB open | download Joe Curia 03/09/2007 Read message
group_email_permission.diff.gz 444 bytes open | download rgroth 07/10/2007 Read message
Group Auto-Email Module
February 02, 2007 01:41PM
EDIT: This module is now on version 1.01
CMU Version [1.01]
This module allows you to automatically email posts to groups from a forum when they are given rights to that forum. Every member of the group will receive an email of every new and reply post made to the forum.

For example, if a user is part of the Sample Prep group and that group is given permissions to the Sample forum, they would get an email when a new post is made in that forum.

See the readme for more info.

Also one question - In the group_autoemail.php file, if I put a ?> at the end of the file, the module would work up to the point of sending off the emails, however it would then give a blank page. Once I removed the ?> then it would continue on to the confirmation page. Any ideas why that ?> would cause the php to stop?

EDIT - updated file with proper ?> ending thanks to the advice of ts77.

v1 of this mod is now closed. Any changes will be bug fixes. Enhancements will only be made in v2 which is designed for Phorum 5.2 and can be found here.



Edited 7 time(s). Last edit at 08/11/2007 03:50AM by Azumandias.
Attachments:
open | download - group_autoemail_v1_01.zip (4.8 KB)
Re: Group Auto-Email Module
February 03, 2007 07:39AM
Quote

Also one question - In the group_autoemail.php file, if I put a ?> at the end of the file, the module would work up to the point of sending off the emails, however it would then give a blank page.


you probably had empty lines or spaces after the ?> which will break any redirection or cookies which are sent afterwards.


Thomas Seifert



Edited 1 time(s). Last edit at 02/03/2007 07:40AM by ts77.
Re: Group Auto-Email Module
February 03, 2007 11:03AM
Thanks for the tip, that was exactly what I had done wrong. I only know as much php as I have figured out from viewing other peoples code. Never thought about having blank characters after the ?>. Thanks again.

Btw, thanks also for developing this great forum code. I love that you have added hooks for easy module creation. Brilliant!



Edited 1 time(s). Last edit at 02/03/2007 11:07AM by Azumandias.
Re: Group Auto-Email Module
March 08, 2007 02:50PM
I have downloaded this module, Can you give me more detailed instruction on how to install this?

Thanks
Arjun
Re: Group Auto-Email Module
March 08, 2007 04:20PM
It looks like you have to install it like any other mod. So upload the module's folder "group_autoemail" to your server inside Phorum's "mods" directory. Then go in the admin interface to the "Modules" page. There you can enable the module. That should be all. I see no settings.php in the module package, so there is no further configuration going on here.


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Re: Group Auto-Email Module
March 08, 2007 07:48PM
Maurice is, as always, quite correct. However, in order for the emails to go out, you must create groups, give those groups rights to specific forums, and add the groups to any users who should receive the automatic emails.


Joe Curia (aka Azumandias)
Modules: l0Admin Mass Email00000000l000000Automatic Time Zones000ll.l00000Enhanced Custom Profiles0.00Google Calendar0000l.l000000Post Previews
000000000Admin Security Suite000000000000Check Modules for Upgrades0000External Authentication000000Group Auto-Email00000.00000Private Message Alerts
000000000Attachment Download Counter0000Custom Attachment Icons000ll.ll00Favorite Forums000000.00000Highlighted Search Terms0000Self-Delete Posts Option
000000000Attachment Watermarks0l00000000Custom Language Database00l.l.0Forum Lockdown00000.00000Ignore Forums0000000000000Threaded Tree View
000000000Automatic Message Pruning00.llll.00Easy Color Scheme Manager0l.l00Forum Subscriptions0000lll000Moderated User Group
Templates:lGeneric Integration000000000 0000Simple Rounded000000 00000000Tabbed Emerald
Re: Group Auto-Email Module
March 08, 2007 09:22PM
Hi,

I was able to install the module and tested the email feature and it works great.

You guyz Rock!

Thank you!
Module Update - Version 1.01
March 09, 2007 01:23PM
I have finished v1.01 with these changes:

- Added the ability to allow users to individually stop the emails.
- Added CMU compatibility

The file above contains the latest version of this module.


Joe Curia (aka Azumandias)
Modules: l0Admin Mass Email00000000l000000Automatic Time Zones000ll.l00000Enhanced Custom Profiles0.00Google Calendar0000l.l000000Post Previews
000000000Admin Security Suite000000000000Check Modules for Upgrades0000External Authentication000000Group Auto-Email00000.00000Private Message Alerts
000000000Attachment Download Counter0000Custom Attachment Icons000ll.ll00Favorite Forums000000.00000Highlighted Search Terms0000Self-Delete Posts Option
000000000Attachment Watermarks0l00000000Custom Language Database00l.l.0Forum Lockdown00000.00000Ignore Forums0000000000000Threaded Tree View
000000000Automatic Message Pruning00.llll.00Easy Color Scheme Manager0l.l00Forum Subscriptions0000lll000Moderated User Group
Templates:lGeneric Integration000000000 0000Simple Rounded000000 00000000Tabbed Emerald




Edited 1 time(s). Last edit at 03/09/2007 03:49PM by Azumandias.
Re: Group Auto-Email Module
May 19, 2007 09:50PM
I undertstand the concept of this MOD, and it is wonderfull for what I am trying to do with multiple mods, however the english.php file, I don't understand that one. I understand that it changes the output of the email, that of this file, BUT is every email set to this Message format, or can this be changed on a per forum name basis. I guess what I mean, is

I know the syntax below is correct, but would it work?

if("%forum"=='FORUM1'){
Forum Number 1;
}

elseif("%forum%"=='FORUM2') {
Forum Number 2 Code;
}

Of would I do A group_sub match, am unclear on this one.
Re: Group Auto-Email Module
May 24, 2007 08:21PM
Thanks for this great mod!
I've made an enhancement to the code, to ensure that the user who posts doesn't get an email-notification of his own post.
In group_autoemail.php @ line 40 add
$user_id=$PHORUM["user"]["user_id"];
$sql.=" AND user_id!=$user_id";
before
$res = mysql_query($sql, $conn);

ps: at line 60, there is a reference to $user_id , but $user_id isn't declared before (at least not until my addition ;-) )
Sorry, only registered users may post in this forum.

Click here to login