PDA

View Full Version : Email Notification Help


Parker Clack
01-15-2002, 03:22 AM
I have set up the option to allow you to get an email with each thread that you are subscribed to or get just the one as it is set to as the default with vBulletin.

I have already set up the user table with new row called notifyall
and have this as an option in the modifyoptions template.

sendnotification function of the functions.php file you have

$useremails=$DB_site->query("SELECT user.*
FROM subscribethread,user
WHERE subscribethread.threadid='$threadid'
AND subscribethread.userid=user.userid
AND user.userid<>'$userid'
AND user.lastactivity>'$lastposttime[dateline]'");

I have written


if ($bbuserinfo['notifyall']!=0) {
$useremails=$DB_site->query("SELECT user.*
FROM subscribethread,user
WHERE subscribethread.threadid='$threadid'
AND subscribethread.userid=user.userid
AND user.userid<>'$userid'");
} else {

$useremails=$DB_site->query("SELECT user.*
FROM subscribethread,user
WHERE subscribethread.threadid='$threadid'
AND subscribethread.userid=user.userid
AND user.userid<>'$userid'
AND user.lastactivity>'$lastposttime[dateline]'");
}

which is supposed to send an email out with each thread that they are subscribed to or based on their lastpost time.

As it is though the above doesn't see the first check of
if ($bbuserinfo['notifyall']!=0) {

so that it can run the if/else so..........I was wondering what I should use in here to check the user table for notifyall to see if it is set to 1 or 0 and $useremails works as selected by this choice.

Thanks,
Parker