1. XenForo 1.5.14 中文版——支持中文搜索!现已发布!查看详情
  2. Xenforo 爱好者讨论群:215909318 XenForo专区

美化 加入社交平台分享按钮

本帖由 admin2012-02-23 发布。版面名称:XenForo中文版

  1. admin

    admin 管理员 管理成员

    注册:
    2011-11-01
    帖子:
    3,671
    赞:
    2,425
    查找模板share_page

    PHP:
    <xen:if is="{$xenOptions.facebookLike}">
                    <
    div class="facebookLike shareControl">
                        <
    xen:container var="$facebookSdk">1</xen:container>
                        <
    fb:like href="{$url}show_faces="true" width="500" action="{$xenOptions.facebookLikeAction}font="trebuchet ms" colorscheme="@fbColorScheme"></fb:like>
                    </
    div>
                </
    xen:if>
    下面加入
    PHP:
    <!-- SocialButton begin -->
                        <
    div class="sharePage">
                            <
    class="sina" href="javascript:void((function(s,d,e){try{}catch(e){}var f='http://v.t.sina.com.cn/share/share.php?',u=d.location.href,p=['url=',e(u),'&title=',e(d.title),'&appkey=2924220432'].join('');function a(){if(!window.open([f,p].join(''),'mb', ['toolbar=0,status=0,resizable=1,width=620,height=450,left=',(s.width- 620)/2,',top=',(s.height-450)/2].join('')))u.href=[f,p].join('');}; if(/Firefox/.test(navigator.userAgent)){setTimeout(a,0)}else{a()}}) (screen,document,encodeURIComponent));" title="分享到新浪微博">新浪微博</a>|<class="t_qq" href="javascript:(function(){window.open('http://v.t.qq.com/share/share.php?title='+encodeURIComponent(document.title)+'&url='+encodeURIComponent(location.href)+'&source=bookmark','_blank','width=610,height=350');})()" title="分享到腾讯微博">腾讯微博</a>|<class="renren" href="javascript:void((function(s,d,e){if(/renren\.com/.test(d.location))return;var f='http://share.renren.com/share/buttonshare?link=',u=d.location,l=d.title,p=[e(u),'&title=',e(l)].join('');function%20a(){if(!window.open([f,p].join(''),'xnshare',['toolbar=0,status=0,resizable=1,width=626,height=436,left=',(s.width-626)/2,',top=',(s.height-436)/2].join('')))u.href=[f,p].join('');};if(/Firefox/.test(navigator.userAgent))setTimeout(a,0);else%20a();})(screen,document,encodeURIComponent));" title="分享到人人网">人人网</a>|<a href="javascript:var u='http://www.douban.com/recommend/?url='+location.href+'&title='+encodeURIComponent(document.title);window.open(u,'douban','toolbar=0,resizable=1,scrollbars=yes,status=1,width=450,height=330');void(0)" title="分享到豆瓣">豆瓣</a>|<a href="javascript:window.open('http://www.kaixin001.com/repaste/share.php?rtitle='+encodeURIComponent(document.title)+'&rurl='+encodeURIComponent(document.location.href)+'&rcontent=');void(0)" title="分享到开心网">开心网</a>|<a rel="nofollow" class="fav_twitter" href="javascript:window.open('http://twitter.com/home?status='+encodeURIComponent(document.location.href)+'&nbsp;'+encodeURIComponent(document.title));void(0)">Twitter</a>
                        </
    div>
                        <!-- 
    SocialButton end -->
     
  2. admin

    admin 管理员 管理成员

    注册:
    2011-11-01
    帖子:
    3,671
    赞:
    2,425
    更新一段分享代码
    代码:
    <!-- SocialButton begin -->
    <div class="sharePage">
        <a class="sina" href="javascript:void((function(s,d,e){try{}catch(e){}var f='http://v.t.sina.com.cn/share/share.php?',u=d.location.href,p=['url=',e(u),'&title=',e(d.title),'&appkey=2924220432'].join('');function a(){if(!window.open([f,p].join(''),'mb', ['toolbar=0,status=0,resizable=1,width=620,height=450,left=',(s.width- 620)/2,',top=',(s.height-450)/2].join('')))u.href=[f,p].join('');}; if(/Firefox/.test(navigator.userAgent)){setTimeout(a,0)}else{a()}}) (screen,document,encodeURIComponent));" title="分享到新浪微博"><img src="http://www.hujiaomian.com/styles/icon/sinaminiblog.gif"></a> <a class="t_qq" href="javascript:(function(){window.open('http://v.t.qq.com/share/share.php?title='+encodeURIComponent(document.title)+'&url='+encodeURIComponent(location.href)+'&source=bookmark','_blank','width=610,height=350');})()" title="分享到腾讯微博"><img src="http://www.hujiaomian.com/styles/icon/qqmb.gif"></a> <a class="renren" href="javascript:void((function(s,d,e){if(/renren\.com/.test(d.location))return;var f='http://share.renren.com/share/buttonshare?link=',u=d.location,l=d.title,p=[e(u),'&title=',e(l)].join('');function%20a(){if(!window.open([f,p].join(''),'xnshare',['toolbar=0,status=0,resizable=1,width=626,height=436,left=',(s.width-626)/2,',top=',(s.height-436)/2].join('')))u.href=[f,p].join('');};if(/Firefox/.test(navigator.userAgent))setTimeout(a,0);else%20a();})(screen,document,encodeURIComponent));" title="分享到人人网"><img src="http://www.hujiaomian.com/styles/icon/renren.gif"></a> <a href="javascript:(function(){window.open('http://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?url='+ encodeURIComponent(location.href)+ '&title='+encodeURIComponent(document.title),'_blank');})()" title="分享到QQ空间"><img src="http://www.hujiaomian.com/styles/icon/qzone.gif"></a>
    </div>
    <!-- SocialButton end -->
     
正在加载...