Rumah  >  Artikel  >  pembangunan bahagian belakang  >  DISCUZ 改动群组发帖系统提醒成员 notification_add 发送通知提示函数

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

WBOY
WBOYasal
2016-06-13 12:12:411645semak imbas

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:超越 有问题请加群
Kenyataan:
Kandungan artikel ini disumbangkan secara sukarela oleh netizen, dan hak cipta adalah milik pengarang asal. Laman web ini tidak memikul tanggungjawab undang-undang yang sepadan. Jika anda menemui sebarang kandungan yang disyaki plagiarisme atau pelanggaran, sila hubungi admin@php.cn