Home  >  Article  >  CMS Tutorial  >  How to send a successful review SMS message to the contributor after a DreamWeaver member submits a review?

How to send a successful review SMS message to the contributor after a DreamWeaver member submits a review?

angryTom
angryTomOriginal
2019-11-09 13:36:512269browse

How to send a successful review SMS message to the contributor after a DreamWeaver member submits a review?

How to send a successful review message to the contributor after the DreamWeaver member submits a review

1. Open dede/archives_do.php , find:

$query = "SELECT arc.id,arc.typeid,ch.issystem,ch.maintable,ch.addtable FROM `dede_arctiny` arc
LEFT JOIN `xc_arctype` tp ON tp.id=arc.typeid
LEFT JOIN `xc_channeltype` ch ON ch.id=tp.channeltype
WHERE arc.id in($arcids) ";

and modify it to:

$query = "SELECT arc.id,arc.mid,arc.typeid,ch.issystem,ch.maintable,ch.addtable FROM `dede_arctiny` arc
LEFT JOIN `xc_arctype` tp ON tp.id=arc.typeid
LEFT JOIN `xc_channeltype` ch ON ch.id=tp.channeltype
WHERE arc.id in($arcids) ";

to implement the function and extract the publisher ID, which is the mid value seen in the backend member center.

2. Find:

$dsql->Execute('ckall');

Add a line below it:

$dtime = time();

Implement the function and get the current review time, which is the time when the short message is published.

3. Find:

$dsql->ExecuteNoneQuery("Update `dede_member`
set scores=scores+{$cfg_sendarc_scores} where mid='".$cfg_ml->M_ID."' ; ");

Add below it:

$mid = $row['mid'];
$dsql->ExecuteNoneQuery("INSERT INTO `dede_member_pms`
(`floginid`,`fromid`,`toid`,`folder`,`subject`,`sendtime`,`writetime`,
`hasview`,`isadmin`,`message`)
VALUES ('admin','1','$mid','inbox','文档审核消息!',
'$dtime','$dtime','0','0','您的文章已经经过了本站的审核!')");

Realize the function, read out the user id, and write all the information into the short message table.

In this way, a short message will be sent to the corresponding publisher during the review.

Note: The table name in this method can be changed to your own table name.

Recommended tutorial: dedecms tutorial

The above is the detailed content of How to send a successful review SMS message to the contributor after a DreamWeaver member submits a review?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn