BLOGCU ADMİN

2. ADIM SABLONU ACIP HTML TIKLA   ctrl+f  TIKLA BU KODU ARAMAYA YAPISTIR   </body> BUL VE ASAGDAKi SCRIPTI KOPYALA  KODUN  ÖNÜNE  YAPISTIR VE KAYDET
    <!-- Download Counter by BW starts-->

    <script type='text/javascript'>
        window.setTimeout(function() {
            document.body.className = document.body.className.replace(&#39;loading&#39;, &#39;&#39;);
          }, 10);
      </script>
    <script src='https://cdn.firebase.com/v0/firebase.js' type='text/javascript'/>
    <script>
    $.each($(&#39;[data-download-count=true]&#39;), function (i, e) {
        var elem = $(e).parent().find(&#39;#download-count&#39;).addClass(&#39;mbtloading&#39;);
        var id = $(e).closest(&#39;.post-body&#39;).siblings(&#39;a[name]&#39;).attr(&#39;name&#39;) + &quot;-&quot; + $(e).attr(&#39;id&#39;);
                              var downloadStats = new Firebase(&quot;https://mbtblogstats.firebaseio.com/downloads/id/&quot; + id);
        var data = {}, isnew = false;
        downloadStats.once(&#39;value&#39;, function (snapshot) {
            data = snapshot.val();
            if (data == null) {
                data = {};
                data.value = 0;
                data.url = window.location.href;
                data.id = id;
                isnew = true;
            }
            elem.removeClass(&#39;mbtloading&#39;).text(data.value);
        });
        $(e).click(function (e) {
            data.value++;
            if (isnew) downloadStats.set(data);
            else downloadStats.child(&#39;value&#39;).set(data.value);
        });
    });
    //<![CDATA[
    $(document).ready(function () {
      //checks if the number of posts on this page are more than one then return.
      if($('.post-outer').length > 1)
      return;
      //selects the element to be made sticky.
      var stickElement = $('.date-header'),
        //selects the element which would trigger the sticky elem to go away
        hideTrigger = $('#comments'),
        //class name to be added (it should match the class in CSS)
        fixed = "fixed",
        top = stickElement.offset().top;
      $(window).scroll(function (event) {
        var y = $(this).scrollTop();
      var maxY = hideTrigger.offset().top;
        if (y >= top && y < maxY) {
          stickElement.addClass(fixed);
        } else {
          stickElement.removeClass(fixed);
        }
      });
    });
    //]]>
    </script>
    <!-- Download Counter by BW Ends-->
(yesilhoca)

Hiç yorum yok :

Yorum Gönder