马上注册,免费下载更多dz插件网资源。
您需要 登录 才可以下载或查看,没有账号?立即注册
×
- //获取用户信息 //主题数 $_G['tan']['threads']=getuserprofile('threads'); //回帖数 $_G['tan']['posts']=getuserprofile('posts')-$_G['tan']['threads']; //收藏数 $_G['tan']['favtimes']=getuserprofile('favtimes'); //新短消息 loaducenter(); //这个必须加上否则会报错,这个是用来调用Ucenter相关函数信息 $arr = uc_pm_checknew($_G['uid'],1);
复制代码 这个为上面的解释,getuserprofile 获取用户信息任意字段函数,在举几个例子供大家参考,此函数,提供一个参数,内容为用户的字段名,即可返回出来他值的内容.
如:我要获取用户
威望::getuserprofile('extcredits1')
金钱: getuserprofile('extcredits2')
贡献:getuserprofile('extcredits3')
用户uid:getuserprofile(uid')
听从:getuserprofile('follower ')
收听:getuserprofile('following ')
主题:getuserprofile('threads')
直接在你需要的页面直接写就可以.
- loaducenter()在文件 source/function/function_core.php 中: function loaducenter() { require_once DISCUZ_ROOT.'./config/config_ucenter.php'; require_once DISCUZ_ROOT.'./uc_client/client.php'; }
复制代码
©DZ插件网所发布的一切资源仅限用于学习和研究目的;不得将上述内容用于商业或者非法用途,否则,一切后果请用户自负。 本站内容为站长个人技术研究记录或网络,不提供用户交互功能,所有内容版权归原作者所有。您必须在下载后的24个小时之内,从您的电脑中彻底删除上述内容。如果您喜欢该程序,请支持正版软件,得到更好的正版服务。 您在本站任何的赞助购买、下载、查阅、回复等行为等均表示接受并同意签订《DZ插件网免责声明协议》。 如有侵权请邮件与我们联系处理: discuzaddons@vip.qq.com 并出示相关证明以便删除。敬请谅解!
|
|