整合UC系列-在Header导航中加入新短消息和通知的提醒

2016-07-07 14:55 来源:www.chinab4c.com 作者:ecshop专家

【分享】【整合UC系列】-在Header导航中加入新短消息和通知的提醒
通过UCenter整合了discuz和UCHome之后,每个模块中就需要提醒新的短消息以及通知
方法为:
1.在lib_main.php 的function get_user_info($id=0)方法里面的return $user;前面,增加以下几行:
$user['newmsg'] = uc_call("uc_pm_checknew", array($id));//获取新短消息数
/* 获取通知 */
$uchome_db_pre = "uchome_";
$uchome_note = $GLOBALS['db']->getOne("select `notenum` from {$uchome_db_pre}space where `uid` = '{$id}'");
$user['newnote'] = $uchome_note['notenum'];
/* 获取通知 */
2.member_info.lbi中,增加如下代码:
<span class="pm-ico"><a href="../../../pm.php" target="_blank"
<!--{if $user_info.newmsg}--> class="newmsg"><!--{else}-->>短消息<!--{/if}--></a></span> 
<!--{if $user_info.newnote}--><span id="uchome_ntc"><a href="../../../u/space.php?do=notice" target="_blank">新通知<span>({$user_info.newnote})</span></a></span><!--{/if}-->

里面具体的链接地址和css,大家自行定义了


第一次在ecshop论坛分享经验,以后还会继续分享二次开发的经验。希望大牛指出不足之处
http://qing.blog.sina.com.c ... a9767d33004h3j.html
http://qing.blog.sina.com.c ... a9767d33004h3i.html
http://qing.blog.sina.com.c ... a9767d33004h3k.html
http://qing.blog.sina.com.c ... a9767d33004h3l.html
http://qing.blog.sina.com.c ... a9767d33004h3m.html
http://qing.blog.sina.com.c ... a9767d33004h3n.html
http://qing.blog.sina.com.c ... a9767d33004h3p.html
http://qing.blog.sina.com.c ... a9767d33004h3r.html
http://qing.blog.sina.com.c ... d33004h3s.html
http://qing.blog.sina.com.c ... a9767d33004h3t.html
http://qing.blog.sina.com.c ... a9767d33004h3v.html
http://qing.blog.sina.com.c ... a9767d33004h3w.html
http://qing.blog.sina.com.c ... a9767d33004h3x.html
http://qing.blog.sina.com.c ... a9767d33004h3y.html
http://qing.blog.sina.com.c ... a9767d33004h3z.html
http://qing.blog.sina.com.c ... a9767d33004h40.html
http://qing.blog.sina.com.c ... 3db9a5330049ut.html
http://qing.blog.sina.com.c ... 3db9a5330049uu.html
http://qing.blog.sina.com.c ... 3db9a5330049uv.html
http://qing.blog.sina.com.c ... 3db9a5330049uw.html
http://qing.blog.sina.com.c ... 3db9a5330049ux.html
http://qing.blog.sina.com.c ... 3db9a5330049uy.html
http://qing.blog.sina.com.c ... 3db9a5330049uz.html
http://qing.blog.sina.com.c ... 3db9a5330049v0.html
http://qing.blog.sina.com.c ... 3db9a5330049v1.html
http://qing.blog.sina.com.c ... 3db9a5330049v2.html
http://qing.blog.sina.com.c ... 3db9a5330049v3.html
http://qing.blog.sina.com.c ... 3db9a5330049v4.html
http://qing.blog.sina.com.c ... 3db9a5330049v5.html
http://qing.blog.sina.com.c ... 3db9a5330049v7.html
http://qing.blog.sina.com.c ... 3db9a5330049v8.html
http://qing.blog.sina.com.c ... 3db9a5330049va.html
http://qing.blog.sina.com.c ... 3db9a5330049vb.html
http://qing.blog.sina.com.c ... 3db9a5330049vd.html
http://qing.blog.sina.com.c ... 3db9a5330049ve.html
http://qing.blog.sina.com.c ... 3db9a5330049vf.html
http://qing.blog.sina.com.c ... 3db9a5330049vg.html
http://qing.blog.sina.com.c ... 3db9a5330049vh.html
http://qing.blog.sina.com.c ... 3db9a5330049vi.html
http://qing.blog.sina.com.c ... 3db9a5330049vj.html
http://qing.blog.sina.com.c ... 3db9a5330049vl.html
http://qing.blog.sina.com.c ... 3db9a5330049vm.html
http://qing.blog.sina.com.c ... 3db9a5330049vn.html
http://qing.blog.sina.com.c ... 3db9a5330049vp.html
http://qing.blog.sina.com.c ... 5330049vs.html
http://qing.blog.sina.com.c ... bf5ff333004gr9.html
http://qing.blog.sina.com.c ... bf5ff333004gra.html
http://qing.blog.sina.com.c ... bf5ff333004grb.html
http://blog.sina.com.cn/s/blog_c2bf5ff30101fozj.html
http://blog.sina.com.cn/s/blog_c2bf5ff30101fozl.html
http://blog.sina.com.cn/s/blog_c2bf5ff30101fozo.html
http://blog.sina.com.cn/s/blog_c2bf5ff30101fp03.html
http://blog.sina.com.cn/s/blog_c2bf5ff30101fp04.html
http://blog.sina.com.cn/s/blog_c2bf5ff30101fp07.html
http://blog.sina.com.cn/s/blog_c2bf5ff30101fp0b.html
http://bbs.xwh.cn/thread-7149749-1-1.html
http://blog.sina.com.cn/s/blog_c2bf5ff30101fp1l.html
http://blog.sina.com.cn/s/blog_c2bf5ff30101fp1t.html
http://blog.sina.com.cn/s/blog_c2bf5ff30101fp1u.html
http://blog.sina.com.cn/s/blog_c2bf5ff30101fp1x.html
http://blog.sina.com.cn/s/blog_c2bf5ff30101fp20.html
http://blog.sina.com.cn/s/blog_c2bf5ff30101fp23.html
http://blog.sina.com.cn/s/blog_c2bf5ff30101fp2f.html
http://blog.sina.com.cn/s/blog_c2bf5ff30101fp2k.html
http://blog.sina.com.cn/s/blog_c2bf5ff30101fp2l.html
http://blog.sina.com.cn/s/blog_c2bf5ff30101fp2o.html
http://blog.sina.com.cn/s/blog_c2bf5ff30101fp2t.html
http://blog.sina.com.cn/s/blog_c2bf5ff30101fp2w.html
http://blog.sina.com.cn/s/blog_c2bf5ff30101fp26.html
http://blog.sina.com.cn/s/blog_c2bf5ff30101fp36.html
http://qing.blog.sina.com.c ... bf5ff333004gtb.html
http://blog.sina.com.cn/s/blog_c2bf5ff30101fp3q.html
http://blog.sina.com.cn/s/blog_c2bf5ff30101fp3r.html
http://blog.sina.com.cn/s/blog_c2bf5ff30101fp3v.html
http://blog.sina.com.cn/s/blog_c2bf5ff30101fp3y.html
http://blog.sina.com.cn/s/blog_c2bf5ff30101fp40.html
http://blog.sina.com.cn/s/blog_c2bf5ff30101fp41.html
http://blog.sina.com.cn/s/blog_c2bf5ff30101fp42.html
http://blog.sina.com.cn/s/blog_c2bf5ff30101fp44.html
http://blog.sina.com.cn/s/blog_c2bf5ff30101fp45.html
http://blog.sina.com.cn/s/blog_c2bf5ff30101fp48.html
http://blog.sina.com.cn/s/blog_c2bf5ff30101fp4c.html
http://blog.sina.com.cn/s/blog_c2bf5ff30101fp4e.html
http://blog.sina.com.cn/s/blog_c2bf5ff30101fp4g.html
http://blog.sina.com.cn/s/blog_c2bf5ff30101fp4h.html
http://blog.sina.com.cn/s/blog_c2bf5ff30101fp4j.html
http://blog.sina.com.cn/s/blog_c2bf5ff30101fp4k.html
http://blog.sina.com.cn/s/blog_c2bf5ff30101fp4l.html
http://blog.sina.com.cn/s/blog_c2bf5ff30101fp4m.html
http://blog.sina.com.cn/s/blog_c2bf5ff30101fp4q.html
http://blog.sina.com.cn/&#1 ... 30101fp4s.html
http://blog.sina.com.cn/s/blog_c2bf5ff30101fp4y.html
http://blog.sina.com.cn/s/blog_c2bf5ff30101fp51.html
http://blog.sina.com.cn/s/blog_c2bf5ff30101fp53.html
http://blog.sina.com.cn/s/blog_c2bf5ff30101fp57.html
http://blog.sina.com.cn/s/blog_c2bf5ff30101fp5e.html
http://blog.sina.com.cn/s/blog_c2bf5ff30101fp5i.html
http://blog.sina.com.cn/s/blog_c2bf5ff30101fp5l.html
http://blog.sina.com.cn/s/blog_c2bf5ff30101fp5q.html
http://blog.sina.com.cn/s/blog_c2bf5ff30101fp5u.html
http://blog.sina.com.cn/s/blog_c2bf5ff30101fp5w.html