PDA

View Full Version : Need "Notify of New Post" in Project Tools



Quarterbore
Mon 13th Aug '07, 2:28pm
I am in despirate need of an option that will allow me to get an e-mail (or better would be a PM) when ever a new item is added to the project tools system. I would like this to be configured like in vBulletin where we can enter multiple e-mail addresses.

I would prefer that the system use line breaks as opposed to spaces (it is just easier to read).

My suggestion would be to include this on the pages where we Add or Edit a project. Create a text area with a Description of "Email Addresses to Notify When there is a New Issue posted in the Project Tool."

My ideal solution would be to allow "instant, daily, and weekly reports to be sent and if you use my suggestion for the way to store the data in the database you could add a second "explode" and use a coded variable to indicate "instant, daily, or weekly" as follows:

1|instant@nospamme.com
1|quarterbore@nospamme.com
2|daily@nospamme.com
3|weekly@nospamme.com

Where 1 = instant, 2 = daily, and 3 = weekly

Then, we simply need to use these values sort of like the sample code below:



$notify_list = explode("\r\n", $vbulletin->options['vbproject_notify_list']);
foreach ($notify_list as $notified_member) {
// See if the user wants an instant Notification
$notify_user = explode("|", $notified_member);
if($notify_user[0] == 1){
// Build the list of e-mail addesses that should get notified
// Set a variable that an update needs to be sent
$shall_send = '1';
}
}
if($shall_send){
//Build the notification (Title, Link, Author, Date, etc) and send it
}
unset $notify_list;
unset $notified_member;
unset $notify_user;



I am sure this could be written better, I am simply trying to propose an addition with a head start on how it could be implemented!

Thanks for the consideration...

EDIT: Reposted from home

Quarterbore
Wed 15th Aug '07, 1:35am
OK, I coded a mechanism to allow me to have this on my site and anyone that is interested can get the code here:

http://www.vbulletin.org/forum/showthread.php?t=155272