What is Bitly:
It is an online service that provides you lot brusk URLs of your posts therefore that you lot tin portion them amongst your friends, family, as well as on the web. This service is fairly pop on microblogging site twitter because it is the default shortening service since May 6, 2009. The shorten links created amongst this service are permanent as well as somewhat expect similar this http://bit.ly/6wgJO.How to Auto Generate Short URLs of Your Posts inwards Blogger amongst Bit.ly
The First matter you lot volition endure doing is to login into your Blogger Dashboard. Now After logging in, acquire to your spider web log >> Template >> Edit HTML >> as well as search for the ]]></b:skin> tag. Once you lot notice it, exactly inwards a higher house it glue the next CSS code.#shorturl {
float: left;
background: #F8F8F8;
padding-bottom: 10px;
border-top: 1px company #d2d2d2;
border-bottom: 1px company #d2d2d2;
padding-top: 10px;
width: 650px;
}
#shorternh2 {
float: left;
padding-left: 20px;
padding-right: 10px;
}
.textinpo {
float: left;
font-family: "verdana",helvetica,Tahoma,Arial,sans-serif;
font-size: 12px;
color: #666;
border: 1px company #ccc;
border-radius: 3px;
background: #fff;
width: 215px;
padding: 0px!important;
padding-left: 10px!important;
height: 20px!important;
margin: -4px!important;
}
Now afterwards pasting the agency canvass coding into your template, it is fourth dimension to motion ahead, as well as acquire things a chip to a greater extent than serious. Again inwards the template, search for <div class='post-footer'> as well as exactly inwards a higher house it glue the next JavaScript coding which would generate the shorten URLs as well as display them at the halt of your posts.
<!-- Short URLs Script yesteryear MBL -->
<b:if cond='data:blog.pageType == "item"'>
<div id='shoternUrl'>
<form id='shorturl'/>
<!-- brusk url widget script outset -->
<script charset='utf-8' src='http://bit.ly/javascript-api.js?version=latest&login=unbfacts&apiKey=R_cb436480530becb8bb6e628aa34520f2' type='text/javascript'/>
<script charset='utf-8' type='text/javascript'>
BitlyClient.addPageLoadEvent(function(){
BitlyCB.myShortenCallback = function(data) {
// this is how to acquire a outcome of shortening a unmarried url
var result;
for (var r inwards data.results) {
outcome = data.results[r];
result['longUrl'] = r;
break;
}
document.getElementById("shorturl").innerHTML = "<div id='shorternh2'>Surprise your friend amongst this fact! Share this link inwards your Status!</div> <input type='text' class='textinpo' value='" + result['shortUrl'] + "' name='bitlyurl'/>";}
BitlyClient.shorten(document.location, 'BitlyCB.myShortenCallback');
});
</script></div>
</b:if>
<!-- Short URLs Script yesteryear MBL -->
Congratulations: Once everything is down, exactly press the “Save” push clit as well as automatic shorten URL script is ready, as well as practiced to endure alive on your website. Now acquire as well as banking concern lucifer your website to run across the Automatically Generate Short URLs of Your Posts inwards Blogger.
We promise this article has helped you lot to larn How to Auto Generate Short URLs of Your Posts inwards Blogger amongst Bit.ly. What are your thoughts close this automatic script, which nosotros accept brought for all guys out there? Which URL shortening service you lot are using? If anyone has whatever work piece applying this tutorial then, do non hesitate to acquire out a comment below.
No comments:
Post a Comment