Showing posts with label Blogger. Show all posts
Showing posts with label Blogger. Show all posts


Load speed is a very important factor to keep your visitors stay on your website. Researches say that if any website takes it too long to load then visitors leave the site without caring about looking at it. We can increase website load speed by deleting useless codes and hosting the codes on external hosts. You can increase site load speedby optimizing your site's images also. Today, I'll tell you how to boost your website's load speed with lazy image load script.
Using this script, you can force your webpages to show images only on the visible area of the page, i.e. images will load only in that area which appears on the screen and when you scroll down the page, other images will load. Generally when we open a website or blog, all the images are loaded at the same time, but if we use this script, all the images will not load at once, which increases the site's loading speed.

Let's see how to add this script in your blog:

> Login to your blogger account.
> Now go to Template > Edit HTML
> Now search for </head> and just above it, copy and paste the following code:

<script type='text/javascript'>//<![CDATA[
(function(a){a.fn.lazyload=function(b){var c={threshold:0,failurelimit:0,event:"scroll",effect:"show",container:window};if(b){a.extend(c,b)}var d=this;if("scroll"==c.event){a(c.container).bind("scroll",function(b){var e=0;d.each(function(){if(a.abovethetop(this,c)||a.leftofbegin(this,c)){}else if(!a.belowthefold(this,c)&&!a.rightoffold(this,c)){a(this).trigger("appear")}else{if(e++>c.failurelimit){return false}}});var f=a.grep(d,function(a){return!a.loaded});d=a(f)})}this.each(function(){var b=this;if(undefined==a(b).attr("original")){a(b).attr("original",a(b).attr("src"))}if("scroll"!=c.event||undefined==a(b).attr("src")||c.placeholder==a(b).attr("src")||a.abovethetop(b,c)||a.leftofbegin(b,c)||a.belowthefold(b,c)||a.rightoffold(b,c)){if(c.placeholder){a(b).attr("src",c.placeholder)}else{a(b).removeAttr("src")}b.loaded=false}else{b.loaded=true}a(b).one("appear",function(){if(!this.loaded){a("<img />").bind("load",function(){a(b).hide().attr("src",a(b).attr("original"))[c.effect](c.effectspeed);b.loaded=true}).attr("src",a(b).attr("original"))}});if("scroll"!=c.event){a(b).bind(c.event,function(c){if(!b.loaded){a(b).trigger("appear")}})}});a(c.container).trigger(c.event);return this};a.belowthefold=function(b,c){if(c.container===undefined||c.container===window){var d=a(window).height()+a(window).scrollTop()}else{var d=a(c.container).offset().top+a(c.container).height()}return d<=a(b).offset().top-c.threshold};a.rightoffold=function(b,c){if(c.container===undefined||c.container===window){var d=a(window).width()+a(window).scrollLeft()}else{var d=a(c.container).offset().left+a(c.container).width()}return d<=a(b).offset().left-c.threshold};a.abovethetop=function(b,c){if(c.container===undefined||c.container===window){var d=a(window).scrollTop()}else{var d=a(c.container).offset().top}return d>=a(b).offset().top+c.threshold+a(b).height()};a.leftofbegin=function(b,c){if(c.container===undefined||c.container===window){var d=a(window).scrollLeft()}else{var d=a(c.container).offset().left}return d>=a(b).offset().left+c.threshold+a(b).width()};a.extend(a.expr[":"],{"below-the-fold":"$.belowthefold(a, {threshold : 0, container: window})","above-the-fold":"!$.belowthefold(a, {threshold : 0, container: window})","right-of-fold":"$.rightoffold(a, {threshold : 0, container: window})","left-of-fold":"!$.rightoffold(a, {threshold : 0, container: window})"})})(jQuery);$(function(){$("img").lazyload({placeholder:"http://i22.servimg.com/u/f22/15/42/72/40/grey10.gif",effect:"fadeIn",threshold:"-50"})})//]]></script>

> Now save your template.
That's it we have to do. Now if you open your blog, you will see that images are loading slowly when they come in the visible area.

Social media widgets are recommended for bloggers to engage their visitors in their social media pages. If you have a facebook page, twitter profile, google+ page etc for your website/blog, then you can put their subscription links in a stylish way using social media widgets. In this post, I'll tell you how to add a metro style social media widget in your blog. Just follow the steps below:
1. Login to your blogger account and from the dashboard, go to LAYOUTS section.
2. Now, add a new HTML/Javascript widget and paste the following code in that:

<style>
.metro-social{width:315px}
.metro-social li{position:relative;cursor:pointer;padding:0;list-style:none}
.metro-social .facebookbt,.twitterbt,.googleplusbt,.pinterestbt,.linkedinbt,.youtubebt,.rssbt{z-index:7;float:left;margin:1px;position:relative;display:block}
.metro-social .facebookbt{background:url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiVXVKPIm9_UNASs3CCrE3a_gLODHah8aBOnymETWEWtlj6YFCl4yA24H3DxIZJXmgHSGaz1LueFfQX6PQAOLU1Ze7kRBn9uVXWoK5rce-m0zy3bquWPNUa18L5MjxFP4xSs-CY4P6-4BI/s1600/facebook.png) no-repeat center center #1f69b3;width:140px;height:141px}
.metro-social .twitterbt{background:url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgrhTszkzvLTxMMQ9ciC_hb44f_7Gcq8y4vBFUF4pR4SodY3Q4Qtj8On5Eq3sy-Qv30pDcfmNhqZXYuyo8B9PdodJrCJvnZyifZVWswsG4DsoyPR3tHyxU30Q13zO3XZR22EvqOE8OLzOI/s1600/twitter.png) no-repeat center center #43b3e5;width:68px;height:70px}
.metro-social .googleplusbt{background:url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiSJYh0e_20J8_y_5jcgXycqAbB8pi_wa60ist0NqNYPHPBfW5JKeUPn1ttLma0t0V6R4VaQgCywQcDTGuM5yrmkI5Z9aM7Lbw9NfnUjmVzjkx8GDplENnCDRAbQOqDp5vqyf6XyEdWxmk/s1600/google+plus.png) no-repeat center center #da4a38;width:69px;height:70px}
.metro-social .pinterestbt{background:url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgK7emTnhJhBJvEgtl9QtkbwKSetht2A4EG23Qv4tmNbJ1vDvPPzse_Trvpbm0J5CGMy-KytzGVfz5RrOzvwZeh7wIRlm1VucDf__6FWvdy9RcySDHfKQF2z4vnuhoKnCgCU4kEFozDAf8/s1600/pinterest.png) no-repeat center center #d73532;width:68px;height:69px}
.metro-social .linkedinbt{background:url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhXc-6KTQQkjjqiTIMV6YEohh2Gr34iBXF_EPHFVD19tD67wued8o0Oy6XUTVcM4sZ94zLgufj-Y7XhfxQDlUa4H0ICXfVxctgUMg_57q9q6G-HT9s0RVm-bLrr_G5Y7cXLOe13SirZY-Q/s1600/linkedin.png) no-repeat center center #0097bd;width:69px;height:69px}
.metro-social .youtubebt{background:url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhOhSR087-sUWG7CyyImOjunMjouQxuCUoXifx9QkFVwQZ27bSA_KPqVkiHeKYXMHlHneat-tsPNmlSssbXDV7atFYaq0tsEx8X4e9bgALkMMdGUuY66OwF5AO3Q9zY68TMc6UfImGCP6I/s1600/youtube.png) no-repeat center center #e64a41;width:140px;height:69px}
.metro-social .rssbt{background:url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhNl8RJRrlbuTLKn7ITA7E_dcnOuvgCr_Qp2oG2KYsXrOfVLSZvm_YoZhMCfpUcbqTIo5Rm3PjzszflNC5YHu5uNU3TLSWKS1cD_b2Q5g7h-Y_jeM_DNEr-CMDppozVjlrqJITBMh8_ess/s1600/feed.png) no-repeat center center #e9a01c;width:140px;height:69px}
.metro-social li:hover .facebookbt{background:url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhghstgzS8eOOUiOFZR4F1z-J3abq0QvWegLHRBT2R6TZS_UtXKPdI8TgugvN9-MeuwaRgI1F5PcdHxEsm67k_9anKd0XsZ_nRL08BR3Iwzk2MW_qJqTVVjcvc8C826_T4oQYVdwyN4hN4/s1600/facebook.png) no-repeat center center #1f69b3}
.metro-social li:hover .twitterbt{background:url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEib3ofDD30xT-KBPP3fNPRDMWSBR5GpLdwbwTmtnqBE0GT7hfwWynrlGstSyyIjyuPNvdlu8uhniSHxFk7WyL9PjYLUCBAoy97Xs3T0R-dKdK7NQtHhTQBj_KuuiI95C6vHfpfnMiM2DQE/s1600/twitter.png) no-repeat center center #43b3e5}
.metro-social li:hover .googleplusbt{background:url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgxYUkg-US72y4o6mNZRizhNCfmm3weXnbI_3WgGGIbC3Vj6-_VqslZUmS_hJKFrP0FMK8abjxCqpC6a69ZmWcMZj6iYxZPlQH4NtLngzztPhvNCFmhUftJ6I97B4gk1xq7NBw6ttDK2ko/s1600/google+plus.png) no-repeat center center #da4a38}
.metro-social li:hover .pinterestbt{background:url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhZ8e-5aFbtlAur_aZHwVbnWLu00KvEVFRyKCnkT-sUJOv6phs5i94ZykHfN0G0PFH8mPMEaMVmV1mZFF5r-xesbF1c6uzoTPKJJkNYB6lA3Yw5edVBhxPivnzq_35TNVrwZCLnChwv_ZA/s1600/pinterest.png) no-repeat center center #d73532}
.metro-social li:hover .linkedinbt{background:url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi_jP-5a2XEEagp6oKcdEmyffR9bRA3kn7E-Rd8JGdSnItFr7FR9Lxz75M5XcGMWxltWXLEjI-lwaOahrifiS2uvEB6oGbJtNNCRjYz0AgHKzTnF7GMBMAqddjVybsLu0qY-uNFkFdcU6k/s1600/linkedin.png) no-repeat center center #0097bd}
.metro-social li:hover .youtubebt{background:url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhX-G3lU8_oiMTJSSBytVlMBtnpoh0ktgALXwsMYxgtOlDo7DqtmysxfqHoyp1Kn0iTJLPSdRPyEd_v328w9CpiD9GfOdZDVJTnAL9UrNxR7n5y-IHA6jJ2MYfHFbZA1vLEzHZ7stkrt-c/s1600/youtube.png) no-repeat center center #e64a41}
.metro-social li:hover .rssbt{background:url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhnK12KnaPJRWlfFM18c6kUfj6OMfnryt5dRwIqr2cHd7Y91zyqkBcbnAr_I4hBlpvUZYBV4GpmFALkgqu_4gJG3UoeHSkiEH8ViphpSiYW3i2vRWHQrBOYX6b9e7WD0C6HqszAoAuawww/s1600/feed.png) no-repeat center center #e9a01c}
</style>
<div class="metro-social">
<br />
<li><a class="facebookbt" href="YOUR FACEBOOK PAGE LINK" target='_blank'></a></li>
<li><a class="twitterbt" href="YOUR TWITTER ACCOUNT LINK" target='_blank'></a></li>
<li><a rel='author' class="googleplusbt" href="YOUR GOOGLE PLUS LINK" target='_blank'></a></li>
<li><a class="pinterestbt" href="YOUR PINTEREST LINK" target='_blank'></a></li>
<li><a class="linkedinbt" href="YOUR LINKEDIN PROFILE LINK" target='_blank'></a></li>
<li><a class="youtubebt" href="YOUR YOUTUBE CHANNEL LINK" target='_blank'></a></li>
<li><a class="rssbt" href="YOUR FEED URL" target='_blank'></a></li>
</div>

3. Replace the red text with your own social media links and then save the widget and save the layout.
4. That's it. Open your blog and see the live preview of your metro style social media widget.
Keep visiting PC Tricks Guru for more tips and tricks.

Facebook popup like box is a handy widget which increases your facebook page likes and helps in building large number of audience. Using facebook popup like box is a good practice but you must keep it in mind that your facebook popup like box must not appear every time when a visitor opens any page. So you must use cookies to set the appearance of facebook popup like box at a fixed time interval. Now let us see how to add this popup like box in your blogger blog.
  • Login to your blogger account and go to Template > Edit HTML
  • Now, find the code </head> and just before </head>, copy and paste the following code:
<script src='https://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js'>
</script>
<script src='http://yourjavascript.com/69231961363/jquery-colorbox-min.js' type='text/javascript'/>
<script type='text/javascript'> jQuery(document).ready(function(){ if (document.cookie.indexOf(&#39;visited=true&#39;) == -1) { var setDays = 1000*60*60*24*5; var expires = new Date((new Date()).valueOf() + setDays); document.cookie = &quot;visited=true;expires=&quot; + expires.toUTCString(); $.colorbox({width:&quot;400px&quot;, height:&quot;430px&quot;, inline:true, href:&quot;#facebook-popup&quot;}); }});
</script>


Note: In the above code, is the number of days after which the popup box will appear again to the visitor. You may change it with any value between 1 to 7.
  • Now search for the code </b:skin> and just before </b:skin> copy and paste the following CSS code:
/* Colorbox Core Style: The following CSS is consistent between example themes and should not be altered. */ #colorbox, #cboxOverlay, #cboxWrapper { position: absolute; top: 0; left: 0; z-index: 9999; overflow: hidden; } #cboxOverlay { position: fixed; width: 100%; height: 100%; } #cboxMiddleLeft, #cboxBottomLeft { clear: left; } #cboxContent { position: relative; } #cboxLoadedContent { overflow: auto; -webkit-overflow-scrolling: touch; } #cboxTitle { margin: 0; } #cboxLoadingOverlay, #cboxLoadingGraphic { position: absolute; top: 0; left: 0; width: 100%; height: 100%; } #cboxPrevious, #cboxNext, #cboxClose, #cboxSlideshow { cursor: pointer; } .cboxPhoto { float: left; margin: auto; border: 0; display: block; max-width: none; -ms-interpolation-mode: bicubic; } .cboxIframe { width: 100%; height: 100%; display: block; border: 0; } #colorbox, #cboxContent, #cboxLoadedContent { box-sizing: content-box; -moz-box-sizing: content-box; -webkit-box-sizing: content-box; } /* User Style: Change the following styles to modify the appearance of Colorbox. They are ordered and tabbed in a way that represents the nesting of the generated HTML. */ #cboxOverlay { background: #000; } #colorbox { outline: 0; } #cboxContent { margin-top: 20px; background: #000; } .cboxIframe { background: #fff; } #cboxError { padding: 50px; border: 1px solid #ccc; } #cboxLoadedContent { border: 5px solid #123D60; background: #fff; box-shadow: 3px 3px 3px #fff; } #cboxTitle { position: absolute; top: -20px; left: 0; color: #ccc; } #cboxCurrent { position: absolute; top: -20px; right: 0px; color: #ccc; } #cboxLoadingGraphic { background: url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjbN_B_8SivJkkA6Ew4j3G9D1P68CMKzA3VxN2xvuxVF0bDbaV0piRj2yZHwD88TFG10-whASKz3gEsZioAlkTunXNhQp3XPsNhoxeNM8x_tsZPVI0xSfZio7rKJeNywbStimsCFLD3WII/s1600/loading.gif) no-repeat center center; } /* these elements are buttons, and may need to have additional styles reset to avoid unwanted base styles */ #cboxPrevious, #cboxNext, #cboxSlideshow, #cboxClose { border: 0; padding: 0; margin: 0; overflow: visible; width: auto; background: none; } /* avoid outlines on :active (mouseclick), but preserve outlines on :focus (tabbed navigating) */ #cboxPrevious:active, #cboxNext:active, #cboxSlideshow:active, #cboxClose:active { outline: none; } #cboxSlideshow { position: absolute; top: -20px; right: 90px; color: #fff; } #cboxPrevious { position: absolute; top: 50%; left: 5px; margin-top: -32px; background: url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEin5mwJmF3NiNnPvMBVSjWPpsTPa4LO2irLUWFDZtXFxwDycsE_MqUq1VCRDnVTMR8uj28cbnHGwWuDwvu_8cHdJPGMfk6fvDvJ4ALYeGQ80Fz01mIlDmwM72QLOR2dFyQ37HpDqdKz3ZM/s1600/controls.png) no-repeat top left; width: 28px; height: 65px; text-indent: -9999px; } #cboxPrevious:hover { background-position: bottom left; } #cboxNext { position: absolute; top: 50%; right: 5px; margin-top: -32px; background: url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEin5mwJmF3NiNnPvMBVSjWPpsTPa4LO2irLUWFDZtXFxwDycsE_MqUq1VCRDnVTMR8uj28cbnHGwWuDwvu_8cHdJPGMfk6fvDvJ4ALYeGQ80Fz01mIlDmwM72QLOR2dFyQ37HpDqdKz3ZM/s1600/controls.png) no-repeat top right; width: 28px; height: 65px; text-indent: -9999px; } #cboxNext:hover { background-position: bottom right; } #cboxClose { position: absolute; top: 5px; right: 5px; display: block; background: url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEisrVY2-7ncfwMH_cRx5B59op5zxk_i0BsX4q7rAVuPRqyb0HbNaGf4fC-yA_NNgqZ-jXLmjHxuaglT7DIfb_9uwfheN3xPrA-N1dQd-jDp2BXcbwG5u025ygXI9VyBkehLjAAqWGY9_KI/s1600/controls1.png) no-repeat top center; width: 38px; height: 19px; text-indent: -9999px; } #cboxClose:hover { background-position: bottom center; }
  • Now, let's move towards the last step. Find </body> in your template code and just before </body>, copy and paste the following code:
<div style='display:none'>
<div id='facebook-popup' style='background:#fff;position:scroll;z-index:99999;'>
<div style='text-align:center;padding-top:15px'>
<h3 style='font-family: &apos;Source Sans Pro&apos;, Sans Serif; Font-size: 18px; font-weight: 300px; '>Receive All Free Updates Via Facebook.</h3>
<iframe allowtransparency='true' frameborder='0' scrolling='no' src='//www.facebook.com/plugins/likebox.php?href=http%3A%2F%2Fwww.facebook.com%2Fpctrickblog&amp;width=342&amp;height=300&amp;show_faces=true&amp;colorscheme=light&amp;stream=false&amp;show_border=false&amp;header=false&amp;appId=' style='border:none; overflow:hidden; width:342px; height:300px;'/>
</div>
</div>
</div>
  • Now, replace pctrickblog with your own facebook page username and save your template. Now, you can see your facebook page popup box when you open your blog.

Blogger is a nice platform to write and publish articles in your blog. It is easy to use and have nice interface also. You might be publishing a few articles daily if you are a blog owner. Well, suppose you have to go outside from your home and you don't get any computer a few days, then how will you write articles in your blog? You may use your mobile, yes I know, but what if you don't have network access also, then?
You will not publish anything in your blog and it will be inactive until you come back home, right? But do you know, you can schedule your articles to be published in your blog at a later date! Yes, you can write your articles and can schedule them to be published on a specific date automatically, without logging in to your account. Let's see how to schedule blogger posts.

  • Login to your blogger account.
  • Now write a new post.
  • After finishing with writing the post, click "Schedule" from the right sidebar under the "Post Settings".
  • Now select "Set date and time". A calendar will appear now.
  • Select the date and time on which you want your post to be published automatically and then click "Done".
  • That's it. Now publish your post. Your post will be automatically published in the date and time you scheduled.

I love blogger because it provides an awesome support to edit and customize the templates of blogs hosted on it. By adding new codes, we can make cool changes in our blogs and can make them look better. In this post, I'll tell you a simple method to change the mouse pointer in blogger blogs, means whenever anyone opens your blog, he will see that his mouse pointer looks different while surfing your blog pages. So, lets start the tutorial onchanging the mouse pointer in blogger blogs:

1. Login to your blogger account and go to Template > Edit HTML
2. Now search for </head> and copy and paste the below code just before </head> tag.

<style type='text/css'>body,a,a:hover{cursor:url(http://cur.cursors-4u.net/nature/images10/nat977.gif),progress}</style>

3. Now just change the red colored url from the above code with your own cursor url and save your template.
4. That's it. Now if you open your blog, you see your new mouse pointer.