发新话题 回复
分享主题 打印

[公告] 【水】新功能论坛有回复短信通知

【水】新功能论坛有回复短信通知

各位可以测试下哦。。不在顶贴回了。因为论坛没有声音所以应该不会打扰到各位吧。
参考教程:http://www.discuz.net/thread-856913-1-1.html
由于本站整合了Ucenter1.5 所以造成该帖最后一步:
[table=98%]
  1. 8、 修改"include/newreply.inc.php"
    找到:
    1. if($modnewreplies) {

    复制代码
    上面加:
    1. //新回复,论坛短消息通知开始 原代码为:By Oytktk(靖飒) dev168修改了消息标题,消息检测
    2. if(!empty($thread['msgnotify']) && $discuz_uid && $thread['author'] != $discuz_user){
    3. //1.定义短信内容...
    4. $msgnate = "
    5. 这是由论坛系统自动发送的通知短消息。
    6. 以下您所发表的主题被 ".$discuz_user." 回复。
    7. 主题地址: [url=.$boardurl.viewthread.php?tid=.$thread[tid]."]".$thread['subject']."[/url]
    8. 回复会员: [url=.$boardurl.viewpro.php?uid=.$discuz_uid.]".$discuz_user."[/url]
    9. 回复时间: ".gmdate("$dateformat $timeformat", $timestamp + $timeoffset * 3600)."
    10. 回复位置: [url]".$boardurl."viewthread.php?replied=yes&tid=$tid&pid=$pid&page=".(@ceil(($thread['replies'] + 2) / $ppp))."&extra=$extra#pid".$pid."[/url]
    11. 为了本社区的更好发展, 请积极回贴. 谢谢您的支持!
    12. ";
    13. $subject = strlen($thread['subject'])>8 ? substr($thread['subject'],0,8)."..." : $thread['subject'];
    14. $checktid = "[系统消息]\"".$subject."\"已有新的回复";
    15. //检查是否已有信息报告...
    16. $likes = "%replied=yes&tid=".$tid."&pid=%";
    17. $query = $db->query("SELECT pmid FROM {$tablepre}pms WHERE message LIKE '$likes'");
    18. //2. 执行短信通知...
    19. if($seles = $db->fetch_array($query)){
    20. $db->query("UPDATE {$tablepre}members SET newpm='1' WHERE username='$thread[author]'");
    21. $db->query("UPDATE {$tablepre}pms SET msgfrom='$discuz_user', msgfromid='$discuz_uid', new='1', dateline='$timestamp', message='$msgnate',delstatus='0' WHERE pmid='$seles[pmid]'");
    22. }else{
    23. $db->query("UPDATE {$tablepre}members SET newpm='1' WHERE username='$thread[author]'");
    24. $db->query("INSERT INTO {$tablepre}pms (msgfrom, msgfromid, msgtoid, folder, new, subject, dateline, message)
    25. VALUES ('$discuz_user', '$discuz_uid', '$thread[authorid]', 'inbox', '1', '$checktid', '$timestamp', '$msgnate')");
    26. }
    27. }
    28. //论坛短消息通知结束







[/td][/tr][/table]
此处失效。

具体修正办法为使用discuz自带的sendpm函数修正即可。
谁不怀念苏联,谁就没有良心;谁想回到苏联,谁就没有头脑.

Woodu.ME--从零开始的博客生活
TOP
= =说实话作为高二党对这些不感兴趣,不过还是来支持下这功能把,
希望PTB日后能够更加地活跃,
我是草 泥 马==
TOP

哎。。?这样就方便了【【
虽然我还是想吐槽下短消息内“11 条未读消息 11 条系统消息”的bug,各种已读显示未读……
=。=
TOP
引用:
原帖由 Doduo 于 2013-2-1 21:54 发表

哎。。?这样就方便了【【
虽然我还是想吐槽下短消息内“11 条未读消息 11 条系统消息”的bug,各种已读显示未读……
uc的flag有问题。。懒得修了。。
谁不怀念苏联,谁就没有良心;谁想回到苏联,谁就没有头脑.

Woodu.ME--从零开始的博客生活
TOP
发新话题 回复