Top Ad unit 728 × 90

Tạo thống kê tuyệt đẹp cho blogspot/blogg

Thống kê số bài viết, số lượt bình luận,... là những tiện ích cần thiết đối với một website, blog. Trong bài viết này mình chia sẻ tới các...

Thống kê số bài viết, số lượt bình luận,... là những tiện ích cần thiết đối với một website, blog. Trong bài viết này mình chia sẻ tới các bạn một tiện ích thống kê tuyệt đẹp cho blogspot.

Bạn có thể xem trực tiếp tiện ích này ở blog của mình hoặc như hình bên dưới.
Tạo thống kê tuyệt đẹp cho blogspot/blogger

HƯỚNG DẪN CÁCH LÀM:

Để thực hiện thêm tiện ích này bạn cần Đăng nhập blogger -> Bố cục -> Thêm tiện ích HTML sau đó sử dụng đoạn code dưới đây 
<style>
section.widget_info_blog{padding:0!important;overflow:hidden;background:transparent!important;border-radius:3px 3px 0 0!important}
.col-widget.so-bai{border-right:1px solid #ccc;border-bottom:1px solid #ccc}
.col-widget.so-cau-hoi{border-bottom:1px solid #ccc}
.col-widget.so-comment{border-right:1px solid #ccc}
.feau{height:100px;background:linear-gradient(#075eac,#1a75c6);font-size:25px;color:#fff;padding:5px 0;text-align:center}
.logo-widget img{max-height:80px;border:5px solid #fff;border-radius:50%;margin-top:-40px;margin-left:calc(50% - 40px);background: #4d90fe;}
.info{float:left;width:100%;background:#f2f2f2;min-height:50px;margin-top:-45px;padding:5px}
.col-widget{float:left;width:50%;text-align:center;height:35px;line-height:35px;font-size:15px;color:#222;}
</style>

<div class="feau"> Sống Để Chia Sẻ </div>
<div class="logo-widget"> <img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgkqTYoEP0kBZTDIpmN2odIgooXNbFwkdht4kvfAbMjuvL-o3npMv2qHFbU-0uRS0M67rnXPUtiJMwnlJFPa3GG63xvu_oVz8SDZxftxgrmTKAaa-0hv4-10ls8vKOXoBOyPCqF1uLlRkQ/s1600/LOGO.png" /> </div>
<div class="info">
    <div class="col-widget so-bai"> <i class="fa fa-pencil-square-o" aria-hidden="true"></i>
        <script style="text/javascript">
            function showpostcount(json) {
                document.write(parseInt(json.feed.openSearch$totalResults.$t, 10));
            }
        </script>
        <script src="/feeds/posts/default?alt=json-in-script&callback=showpostcount"></script>
    </div>
    <div class="col-widget so-cau-hoi"> <i class="fa fa-refresh" aria-hidden="true"></i>
        <script type="text/javascript">
            var startTime = new Date();

            function currentTime() {
                var a = Math.floor((new Date() - startTime) / 100) / 10;
                if (a % 1 == 0) a += ".0";
                document.getElementById("endTime").innerHTML = a;
            }
            window.onload = function() {
                clearTimeout(loopTime);
            }
        </script>
        <script type="text/javascript">
            document.write('<span id="endTime">0.0</span>');
            var loopTime = setInterval("currentTime()", 100);
        </script>
    </div>
    <div class="col-widget so-comment"> <i class="fa fa-comments-o" aria-hidden="true"></i>
        <script style="text/javascript">
            function numberOfComments(json) {
                document.write(json.feed.openSearch$totalResults.$t);
            }
        </script>
        <script src="/feeds/comments/default?alt=json-in-script&callback=numberOfComments"></script>
    </div>
    <div class="col-widget so-tra-loi"> <i class="fa fa-users" aria-hidden="true"></i> 10 </div>
</div>
Sau đó lưu tiện ích lại và quay lại trang chủ xem kết quả.

TIỆN ÍCH THỐNG KÊ TRÊN BAO GỒM:

- Tổng bài viết
- Tổng số bình luận
- Thời gian tải trang
- Số tác giả website (cái này sửa tay) 😆
Blogspot có một bài hạn chế nên mình chỉ tuỳ chỉnh được như trên, bạn nào có thể tuỳ chỉnh những tiện ích hay hơn thì chia sẻ để mọi người cùng sử dụng nhé!!
Tạo thống kê tuyệt đẹp cho blogspot/blogg Reviewed by Huỳnh Thanh Phong on 23:52 Rating: 5
Những link download phía trên thuộc bản quyền http://startphong-blog.blogspot.com ghi nguồn Blog mình nếu bạn sử dụng lại nó nhé.
© Copyirght 2017 Thanh Phong - Blog . all Rights Reserved.

No comments:

Biểu mẫu liên hệ

Name

Email *

Message *

Powered by Blogger.