discuz 加载ucenter中的方法以及UCenter中的常用方法

8 篇文章 0 订阅

function loaducenter() {
   require_once DISCUZ_ROOT.'./config/config_ucenter.php';
   require_once DISCUZ_ROOT.'./uc_client/client.php';
}

loaducenter();

方法定义位置:

source\function\function_core.php

系统通知的方法、notification_add()

    $content='刚才您的分享的技术资料:'.$file_name.'...,有收益到账。'.'<a href="##">点击查看详情</a>';

    $content 支持html 代码哦~

 $authorid 接收通知的uid,即发给谁;
 notification_add($touid$type$note$notevars = array(), $system = 0)
notification_add( $authorid , 'system' , $content , 1 );
获取到消息列表
uc_pm_list($uid$page = 1, $pagesize = 10, $folder = 'inbox'$filter = 'newpm'$msglen = 0)
判断是否有新的消息 
uc_pm_checknew($_G['uid'], 1)
  1. //新短消息 
  2. loaducenter();//这个必须加上否则会报错,这个是用来调用Ucenter相关函数信息 
  3. $arr = uc_pm_checknew($_G['uid'],1); 

发送消息
  loaducenter();//这个必须加上否则会报错,这个是用来调用Ucenter相关函数信息 
    sendpm( $toid $subject $message $fromid  =  '' $replypmid  = 0,  $isusername  = 0,  $type  = 0)
sendpm($touid, $subject, $message, $formuid, 0, 0, $type)

参数含义:

其中有四个参数,前三个为必填参数,最后一个为可选参数;

$toid参数是接收短消息的用户uid;($toid为0时,消息类型为公共消息)

$subject参数是短消息的标题;

$message个参数是短消息的正文内容(不支持HTML);

$fromid个参数是发送短消息的用户uid;($fromid为0时,消息类型为系统消息)










评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值