织梦DedeCMS会员文章被评论后自动发短消息给作者的方法

我们找到并打开/plus/feedback.php文件,在里面找到如下代码:

 

$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','0','$feedbacktype','$face','$msg'); "; $rs = $dsql->ExecuteNoneQuery($inquery);  

将其替换为下面的代码:

 

$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','0','$feedbacktype','$face','$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}》有新的评论','$dtime','$dtime','0','0','{$cfg_ml->M_LoginID}说:{$msg}'); "; $rs = $dsql->ExecuteNoneQuery($inquery); $rs = $dsql->ExecuteNoneQuery($inquery1);  

 

这样就修改完成了,大家可以试试效果。

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/46696241b43be45e5f0f72dbf3358236.html