Memasang Page Views Hit Counter.

Page Views

Memasang Page Views Hit Counter bertujuan untuk menunjukkan kekerapan pengunjung / pembaca sesebuah post / page.

Untuk memasang blogger page views ini, sila ikuti beberapa langkah mudah ini.

1. Sign In akaun Blogger.

2. Pilih LAYOUT --> EDIT HTML.

3. Cari kod ini.

<p><data:post.body/></p>

4. Copy kod di bawah dan letakkan di atas kod tadi.

<b:if cond='data:blog.pageType == &quot;item&quot;'>
<div id='hit-counter'>
&lt;a href=&#39;http://csharpdotnetfreak.blogspot.com&#39; rel=&#39;follow&#39;&gt;
<script src='http://www.amitjain.co.in/pageview.php' type='text/javascript'/> &lt;/a&gt;
</div></b:if>

5. Cari kod ini.

</body>

6. Tambahkan kod dibawah, di atas kod tadi.

<a href="http://csharpdotnetfreak.blogspot.com/2009/02/blogger-post-page-views-hit-counter.html"><script src='http://www.amitjain.co.in/pageview.php' type='text/javascript'/></a>

7. Pilih SAVE TEMPLATE.

8. Selamat Mencuba.

Sumber csharpdotnetfreak

READ MORE...

Menambah Scroll Background Dengan jQuery.

Scroll Background jQuery

LIHAT DEMO

1. SIGN IN akaun blogger.

2. Pilih LAYOUT --> EDIT HTML.

3. BACKUP TEMPLATE anda dahulu untuk mengelakkan sebarang masalah.

4. Klik pada EXPAND WIDGET TEMPLATE seperti screenshot di bawah ini.

Blog Tricks

5. Cari kod ini.

</head>

6. Copy script jQuery di bawah dan letakkan di atas kod tadi.

<script src='http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js?ver=1.3.2' type='text/javascript'></script>

7. Tambahkan script ini, di bawah script jQuery tadi.

<script type='text/javascript'>
//<![CDATA[
$(function(){

// ***
// Scrolling background
// ***

// height of background image in pixels
var backgroundheight = 4000;

// get the current minute/hour of the day
var now = new Date();
var hour = now.getHours();
var minute = now.getMinutes();

// work out how far through the day we are as a percentage - e.g. 6pm = 75%
var hourpercent = hour / 24 * 100;
var minutepercent = minute / 30 / 24 * 100;
var percentofday = Math.round(hourpercent + minutepercent);

// calculate which pixel row to start graphic from based on how far through the day we are
var offset = backgroundheight / 100 * percentofday;

// graphic starts at approx 6am, so adjust offset by 1/4
var offset = offset - (backgroundheight / 1);

function scrollbackground() {
// decrease the offset by 1, or if its less than 1 increase it by the background height minus 1
offset = (offset < 1) ? offset + (backgroundheight - 1) : offset - 1;
// apply the background position
$('body').css("background-position", "50% " + offset + "px");
// call self to continue animation
setTimeout(function() {
scrollbackground();
}, 70
);
}

// Start the animation
scrollbackground();
});
//]]>
</script>

7. Cari kod CSS body.

body {
background:#000;
margin:0;
color:$textcolor;
font:x-small Georgia Serif;
font-size/* */:/**/small;
font-size: /**/small;
text-align: center;
}

8. Gantikan background dengan kod ini.

background:url(http://lh6.ggpht.com/_dfnTVAxeWMI/SrFV2ZgHUvI/AAAAAAAACU8/yP_7acjnv5U/bgscroll.jpg);

10. Contoh.

body {
background:url(http://lh6.ggpht.com/_dfnTVAxeWMI/SrFV2ZgHUvI/AAAAAAAACU8/yP_7acjnv5U/bgscroll.jpg);
margin:0;
color:$textcolor;
font:x-small Georgia Serif;
font-size/* */:/**/small;
font-size: /**/small;
text-align: center;
}

11. Pilih PREVIEW untuk melihat hasilnya.

12. Jika berpuas hati pilih SAVE TEMPLATE.

Perhatian !!! Sekiranya anda sudah mempunyai script jQuery NO 6, anda hanya perlu tambahkan script NO 7 di bawahnya.

READ MORE...