Quote:
Originally posted by ChurchMedia
Your hack as described in the instructions is working perfectly. I was just wondering if you could help me with some additional modifications....
|
ok I see..
Give this a shot:
PHP Code:
=================================================================
// Hack: Send email notification on subscribed forums
if ($enableemail and $visible) {
$tousers=$DB_site->query("SELECT user.username,user.email,user.htmltext
FROM subscribeforum,user
WHERE subscribeforum.forumid='$forumid'
AND subscribeforum.userid=user.userid
AND user.userid<>'$bbuserinfo[userid]'");
$forumtitle=unhtmlspecialchars($foruminfo['title']);
$author=unhtmlspecialchars($bbuserinfo['username']);
$postsubject=unhtmlspecialchars($subject);
$postcontents=unhtmlspecialchars($message);
while ($touser=$DB_site->fetch_array($tousers)) {
$touser['username']=unhtmlspecialchars($touser['username']);
// Logician HTML mail hack
if ($touser['htmltext']==0){
// user wants plain text messages
eval("\$emailmsg = \"".gettemplate("email_threadstarter",1,0)."\";");
eval("\$emailsubject = \"".gettemplate("emailsubject_threadstarter",1,0)."\";");
mail($touser['email'],$emailsubject,$emailmsg,"From: \"$bbtitle Mailer\" <$webmasteremail>");
}
else
//user wants HTML messages
{
eval("\$emailmsg = \"".gettemplate("email_threadstarter_html",1,0)."\";");
eval("\$emailsubject = \"".gettemplate("emailsubject_threadstarter",1,0)."\";");
mail($touser['email'],$emailsubject,$emailmsg,"From: \"$bbtitle \" <$webmasteremail>\nMIME-VERSION: 1.0\nCONTENT-TYPE: TEXT/HTML; CHARSET=iso-8859-9\nCONTENT-DISPOSITION: INLINE\n");
}
// Logician HTML mail hack
}
}
// End hack
=================================================================
Enjoy..