Tạo tiện ích thống kê cho blogger

Tạo tiện ích thống kê cho blogger

Start Tiến IT đã đăng
Hiện có lượt xem và 0 bình luận
Chi tiết Liên quan Nhận xét Tác giả Hướng dẫn
  • Xem toàn trang
  • Hello xin chào tất cả các bạn, theo yêu cầu của một số bạn thì hôm nay mình sẽ viết bài hướng dẫn cho các bạn tạo widget như blog mình nhé.

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

    Bước 1: Để tạo widget này các bạn vào Bố cục -> Thêm tiện ích -> Kéo xuống dưới chọn Thống kê blog và chọn kiểu 2 nhé
    Bước 2: Tìm đoạn id='Stats1' và thay toàn bộ widget của id='Stats1' thành đoạn code bên dưới
    <b:widget id='Stats1' locked='false' title='' type='Stats' version='1'>
    <b:widget-settings>
    <b:widget-setting name='showGraphicalCounter'>false</b:widget-setting>
    <b:widget-setting name='showAnimatedCounter'>false</b:widget-setting>
    <b:widget-setting name='showSparkline'>false</b:widget-setting>
    <b:widget-setting name='sparklineStyle'>BLACK_TRANSPARENT</b:widget-setting>
    <b:widget-setting name='timeRange'>ALL_TIME</b:widget-setting>
    </b:widget-settings>
    <b:includable id='main'>
    <b:if cond='data:title != &quot;&quot;'><h2><data:title/></h2></b:if>
    <div class='widget-content'>
    <!-- Add the bg color to the header using any of the bg-* classes -->
    <div class='aubout-admin'>
    <div class='admin-image'>
    <img alt='User Avatar' class='img-circle' src='https://i.imgur.com/HmyKG6e.jpg'/>
    </div>
    <!-- /.widget-user-image -->
    <h3 class='admin-username'>Trần Thanh Bình</h3>
    <h5 class='admin-desc'>Designer and Developer</h5>
    </div>
    <!-- Content is going to be visible when data will be fetched from server. -->
    <div expr:id='data:widget.instanceId + &quot;_content&quot;' style='display: none;'>
    <!-- Counter and image will be injected later via AJAX call. -->
    <b:if cond='data:showSparkline'>
    <img alt='Sparkline' expr:id='data:widget.instanceId + &quot;_sparkline&quot;' height='30' width='75'/>
    </b:if>
    <span expr:class='&quot;counter-wrapper &quot; + (data:showGraphicalCounter ? &quot;graph-counter-wrapper&quot; : &quot;text-counter-wrapper&quot;)'><a expr:id='data:widget.instanceId + &quot;_totalCount&quot;'/></span>
    <b:include name='quickedit'/>
    </div>
    </div>
    <script type='text/javascript'>
    function postCount(json){
    document.write(&quot;<span class='counts post2'> Tổng bài viết &quot;);
    var count = json.feed.openSearch$totalResults.$t;
    document.write(&quot;<span class='count all-posts'>&quot; + count + &quot;</span>&quot;);
    document.write(&quot;</span>&quot;)
    }
    function numberOfComments(json){
    document.write(&quot;<span class='counts comment2'> Tổng nhận xét &quot;);
    var count = json.feed.openSearch$totalResults.$t;
    document.write(&quot;<span class='count all-comments'>&quot; + count + &quot;</span>&quot;);
    document.write(&quot;</span>&quot;)
    }
    </script>
    <script src='/feeds/posts/default?alt=json-in-script&amp;max-results=0&amp;callback=postCount' type='text/javascript'/>
    <script src='/feeds/comments/default?alt=json-in-script&amp;max-results=0&amp;callback=numberOfComments'/>
    </b:includable>
    </b:widget>
    Bước 3: Để đoạn trang trí cho đoạn code trên thì tìm đoạn ]]></b:skin> và dán toàn bộ đoạn css bên dưới lên nó nhé
    /* Thong ke */
    #Stats1{border:0!important;box-shadow:0 1px 1px rgba(0,0,0,.1);border-radius:3px}
    #Stats1 .widget-content{padding:0!important}
    .aubout-admin{background-color:#4e3183;color:#fff;padding:20px;border-top-right-radius:3px;border-top-left-radius:3px;height:auto}
    .admin-image img{width:65px;height:auto;float:left;border-radius:50%}
    .admin-username,.admin-desc{margin-left:75px}
    .admin-username{margin-top:5px;margin-bottom:5px;font-size:24px;font-weight:300}
    .admin-desc{margin-top:0;font-size:14px;font-weight:300}
    #Stats1{background:#fff.Stats .counter-wrapper!important;padding:0!important}
    a#Stats1_totalCount{float:right;background:#dd4b39;width:auto;line-height:22px;color:#fff;padding:0 10px;border-radius:20px;margin:10px;font-size:13px;font-weight:600}
    .Stats .counter-wrapper{height:43px;text-align:right;font-weight:400;line-height:41px;color:#333;font-size:16px;border-bottom:1px solid #f4f4f4;padding:0 0 0 10px}
    .Stats .counter-wrapper:after{content:"Tổng lượt xem ";float:left;text-align:left;font-size:16px;color:#333}
    .counts{display:inline-block;font-size:16px;line-height:20px;color:#333;border-bottom:1px solid #f4f4f4;padding:10px}
    .Stats .counter-wrapper,.counts{width:100%;box-sizing:border-box}
    .counts:last-child{border:0}
    .counts .count{display:inline-block;font-size:13px;font-weight:600;vertical-align:top;direction:ltr;float:right;color:#fff;width:40px;text-align:center;line-height:22px;border-radius:16px}
    .counts:hover .titles:before{color:#333!important;border-radius:2px;border-color:rgba(255,255,255,.1)}
    .post 2{margin-bottom:10px}
    .all-posts{background:#00a65a}
    .all-comments{background:#00c0ef}
    span.counter-wrapper:hover,span.counts:hover{color:#444;background:#f7f7f7;cursor:pointer}
    * Nhớ xóa css trước để tránh nó hiển thị không được đẹp nhé
    Chúc các bạn thành công!
    Mục Lục Nội Dung

      Minh Tiến IT

      Pass giải nén mặc định: truongblogger
      Chắc bạn cũng đã nhiều lần gặp những link của 123link dạng 123link.co tại những trang web chia sẻ nội dung số. Nhưng bạn không biết cách nào để truy cập vào đúng link gốc của nội dung mà mình muốn truy cập. Bài viết này sẽ giúp bạn làm điều đó.
      Đầu tiên bạn truy cập vào một link 123link. Khi bạn truy cập xong thì nội dung bạn thấy sẽ tựa như hình ở dưới.
      Trang 123link
      Trang 123link
      Đánh dấu check vào vô “I’m not a robot”. Sau đó sẽ có một bảng captcha hiện ra. Bạn trả lời theo câu hỏi của captcha rồi bấm Verify để xác nhận.
      I’m not a robot
      I’m not a robot
      Verify
      Verify
      Sau khi xác nhận captcha thành công thì bấm chọn nút “Click here to continue” để sang bước tiếp theo.
      Click here to continue
      Click here to continue
      Ở trang tiếp theo, bạn sẽ thấy một đồng hồ đếm ngược, thường thì nhiều nhất sẽ là 7 giây. Bạn đợi cho thời gian đếm ngược chạy hết.
      Bạn đợi cho thời gian đếm ngược chạy hết
      Bạn đợi cho thời gian đếm ngược chạy hết
      Khi thời gian đếm ngược chạy hết, bạn sẽ thấy nút Get Link hiện ra. Bạn bấm vào nút đó để truy cập đến đường link đã được rút gọn bởi 123link.
      Get Link
      Get Link
      Bạn cứ yên tâm là link từ 123link sẽ không có ẩn chứa những mối nguy hiểm như virus, các pop-up quảng cáo không lành mạnh và phiền toái khi bạn đang thao tác các bước để tới link đích.
      HIỆN CÓ 0 BÌNH LUẬN