Question2Answer的统计添加

第一步、上http://www.cnzz.com网站,注册账号,然后填写你的网站信息,获取到它的脚本。

第二步、复制它的脚本到你的网页的脚本中。例如:

找到/qa-include/qa-theme-base.php文件,对下面函数进行修改即可。


                function attribution()

                {

                        // Hi there. I'd really appreciate you displaying this link on your Q2A site. Thank you - Gideon


                        $this->output(

                                '<div class="qa-attribution">',

                                'Powered by <a href="http://www.question2answer.org/">Question2Answer</a>',

                                '</div>'

                        );


                        // forlong401 adds them for tongji.这里省略一些个人信息,<script>这个标签内的就是从CNZZ拷贝过来的源码脚本。注意,如果出现单引号“'”那么你需要添加反斜杠\来进行转义。

                        $this->output(

                                '<div class="cnzz-attribution">',

                                '<script type="text/javascript">var cnzz_protocol = (("https:" == document.location.protocol) ? " https://" : " http://");</script>',

                                '</div>'

                        );



  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值