[php] view plain copy public static function notification_add($touid, $type, $note, $notevars = array(), $system = 0, $category = -1) { global $_G; if(!($tospace = getuserbyuid($touid))) { return false; } space_merge($tospace, 'field_home'); $filter = empty($tospace['privacy']['filter_note'])?array():array_keys($tospace['privacy']['filter_note']); if($filter && (in_array($type.'|0', $filter) || in_array($type.'|'.$_G['uid'], $filter))) { return false; } if($category == -1) { $category = 0; $categoryname = ''; if($type == 'follow' || $type == 'follower') { switch ($type) { case 'follow' : $category = 5; break; case 'follower' : $category = 6; break; } $categoryname = $type; } else { foreach($_G['notice_structure'] as $key => $val) { if(in_array($type, $val)) { switch ($key) { case 'mypost' : $category = 1; break; case 'interactive' : $category = 2; break; case 'system' : $category = 3; break; case 'manage'愛(ài)站庫(kù)溫馨提示:如果你正在尋找優(yōu)秀的discuz模板,那你可以到愛(ài)站庫(kù)的 discuz模板 頻道看看,相信一定有你喜歡的! |
版權(quán)聲明: 本站資源均來(lái)自互聯(lián)網(wǎng)或會(huì)員發(fā)布,如果侵犯了您的權(quán)益請(qǐng)與我們聯(lián)系,我們將在24小時(shí)內(nèi)刪除!謝謝!
轉(zhuǎn)載請(qǐng)注明: Discuz!發(fā)送系統(tǒng)通知方法notification_add解析