PHP8.1.21版本已发布
vue8.1.21版本已发布
jquery8.1.21版本已发布

DISCUZ 改动群组发帖系统提醒成员 notification_add 发送通知提示函数

原创
2016-06-13 12:12:41 1368浏览

DISCUZ 更改群组发帖系统提醒成员 notification_add 发送通知提示函数

notification_add($touid, $type, $note, $notevars = array(), $system = 0)
$touid : 发送给谁?
$type : 方式? 常用的是post
$note : 可以自己编辑内容
$notevars = 一些内容参数
$system = 默认情况下为0
 
 
 
将下列代码加入到souse/class/module/module_forum_thread.php文件第139行即可
 
if($this->param['isgroup']==1){
   $bt=$this->param['subject'];
           $querys = DB::fetch_all('select * from pre_forum_groupuser wherefid='.$this->forum['fid']);
   foreach($querysas $arr){
     notification_add($arr['uid'],'system', $author.'发表了:'.$bt, array('from_id' => 0,'from_idtype' => 'sendnotice'), 1);
     }
    }
 
实现效果:群组内任意一成员在群组里面发帖子,群组所有成员就会收到系统提醒,并且提示有系统提醒。
 
 
author:超越 有问题请加群
声明:本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn核实处理。