Dedecms文章被别人评论后系统发送短消息给作者的实现方法如下:在Feedback.PHP文件中,加入一条sql语句,把评论成功的消息插入到dede_member_pms表中,这样作者就能收到通知了。
找到:
$inquery = "INSERT INTO `dede_Feedback` (`aid`,`typeid`,`username`,`arctitle`,`ip`,`ischeck`,`dtime`,`mid`,`bad`,`good`,`ftype`,`face`,`msg`) VALUES ('$aid','$typeid','$username','$arctitle','$ip','$ischeck','$dtime','{$cfg_ml->M_ID}','0','$Feedbacktype','$face','$msg'); "; $rs = $dsql - > ExecuteNoneQuery($inquery);
修改为:
$inquery = "INSERT INTO `dede_Feedback`(`aid`,`msg`) VALUES('$aid','$msg'); "; $inquery1 = " INSERT INTO `dede_member_pms`(`floginid`,`fromid`,`toid`,`tologinid`,`folder`,`subject`,`sendtime`,`writetime`,`hasview`,`isadmin`,`message`) VALUES('admin','1','$mid','$writer','inBox','你的《{$arctitle}》有新的评论','{$cfg_ml->M_LoginID}说:{$msg}'); "; $rs = $dsql - > ExecuteNoneQuery($inquery); $rs = $dsql - > ExecuteNoneQuery($inquery1);
推荐教程:dedecms教程
原文链接:https://www.f2er.com/dedecms/534206.html