Home > Backend Development > PHP Tutorial > DISCUZ 改动群组发帖系统提醒成员 notification_add 发送通知提示函数

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

WBOY
Release: 2016-06-13 12:12:41
Original
1704 people have browsed it

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:超越 有问题请加群
Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template