Hiển thị các bài đăng có nhãn Javascript. Hiển thị tất cả bài đăng
Hiển thị các bài đăng có nhãn Javascript. Hiển thị tất cả bài đăng

Thứ Năm, 2 tháng 3, 2017

Blogger Thumbnails Problem? A Quick Solution

Blogger Thumbnails Problem? well, here I am giving you a quick solution for our pro and free template users. Today (2nd March 2017) blogger changed their post thumbnail format (data:post-thumbnail). That's why many users are facing Blogspot blogger thumbnail problems. Their images are got blurry. Here are solutions.

Blogger Thumbnails Problem? A Quick Solution

Backup your template before start work for safety.


A quick solution for free users:

Go to blogger dashboard > Theme > Edit HTML and paste below javascript before </head>
 <script type='text/javascript'>
//<![CDATA[
function bp_thumbnail_resize(e,t){var n=620;var r=330;image_tag='<img width="'+n+'" height="'+r+'" src="'+e.replace("/s72-c-k-no/","/w"+n+"-h"+r+"-c/")+'" alt="'+t.replace(/"/g,"")+'" title="'+t.replace(/"/g,"")+'"/>';if(t!="")return image_tag;else return""}
//]]>
</script>

Note: You can change your thumbnail width (n=620) and height (r=330).

Now Save Template

Permanent Solution for Pro users

Go to blogger dashboard > ThemeEdit HTML and find /s72-c/ by pressing Ctrl+F and replace it with /s72-c-k-no/

Blogger Thumbnails Problem? A Quick Solution
Now again find /\/s[0-9]+(\-c)?\// and replace it with /\/s[0-9]+(\-c-k-no)?\//

Now Save Template

Happy blogging. Thank you.

Thứ Năm, 3 tháng 11, 2016

Reaction Buttons for Blogger using Vicomi

Reaction Buttons for Blogger - here is another big and very useful blogger widgets. You can show reaction buttons on your blogspot blog. Reaction is a smart way for your visitors to leave feedback without leaving any comments. Here is very simple way to add recation buttons for blogspot blogger using vicomi.com.

Reaction Buttons for Blogger using Vicomi


You can discover lots of awesome blogger widgets by msdesignbd. Now lests starting the tutorial.
Step1: Go to vicomi.com
Step2: Now signup with your Blog title, e-mail and your website.
Reaction Buttons for Blogger using Vicomi

Step3: Now choose your emotion design and click Done.
Step4: Now copy the code.
Reaction Buttons for Blogger using Vicomi

Step5: Now go to Edit HTML and find <data:post.body/>
Step6: Past copied code right after <data:post.body/>

Thứ Hai, 16 tháng 5, 2016

Sidebar Floating Facebook Like Box For Blogger

Sidebar Floating Facebook Like Box For Blogger

Sidebar Floating Facebook Like Box For Blogger - is a widget for adding a like box on blogger in sidebar. Facebook like box for website or blogspot is a important widget to increase fan page like. You can easily grow up your facebook fan page like using facebook like box. Today i am share awesome and beautiful facebook like box for website. This a sidebar floating facebook like box. When visitors mouse hover in facebook icon, then it Floating and open a like box from sidebar. This script i founded around internet. But i customize this script with CSS and get up an awesome look. You can add this code also any wordpress blog.

Also Read: Flat Popup Facebook Like Box Widget for Blogger

Facebook like box widget pay an important role on every blog. We know, facebook is the largest social networks. You may get a huge number of traffic form facebook if you have a big number of fan. Facebook like box for blogger is the easiest way to promote your fan page with your visitors.

Floating Facebook Box for Blogs

In this tutorial i will show you, how to add facebook like box to blogger. Every one looking for different and attractive widget for his/her blog. You may find different type of facebook like box widget for blogger. example: Popup facebook like box ( if you interested to add popup facebook like box to blogger then check out this widget: Flat Popup Facebook Like Box Widget for Blogger ). From my opinion sidebar floating facebook like box for blogger is the best widget.

MS Design BD always published different and attractive blogger widgets for blogspot. We always share customized attractive and beautiful blogger widgets for blogspot blogger. So, floating facebook like is also a different type of blogger widget. This widget is totally customized facebook like box with css.


Sidebar Floating Facebook Like box for Blogspot

To add this beautiful facebook like box for blogger, at first your have to need add jQuery in your blog (if already added, then ignore it). Now go to Blogger Dashboard > Template > Edit HTML find and past below code before </head>
 <script src='//code.jquery.com/jquery-1.10.2.min.js' type='text/javascript'/> 

Now Save Template

Below steps are adding floating facebook like for website or your blogspot blog. Add below codes on widget.

Step1: Go to your blogger dashboard Layout > Add a Gadget and find HTML/Javascipt
Step2: Copy the below codes and past on HTML/Javascipt
 <script type="text/javascript"> 
//<!--
$(document).ready(function() {$(".msfslikebox").hover(function() {$(this).stop().animate({right: "0"}, "medium");}, function() {$(this).stop().animate({right: "-250"}, "medium");}, 500);});
//-->
</script>
<style type="text/css">
.msfslikebox{background: url("http://i.imgur.com/pQGrWuH.png") no-repeat scroll left center transparent !important;display: block;float: right;height: 270px;padding: 0 5px 0 46px;width: 245px;z-index: 99999;position:fixed;right:-250px;top:20%;}
.msfslikebox div{border:none;position:relative;display:block;}
.msfslikebox span{bottom: 12px;font: 8px "lucida grande",tahoma,verdana,arial,sans-serif;position: absolute;right: 6px;text-align: right;z-index: 99999;}
.msfslikebox span a{color: #808080;text-decoration:none;}
.msfslikebox span a:hover{text-decoration:underline;}
</style><div class="msfslikebox"><div>
<iframe src="http://www.facebook.com/plugins/likebox.php?href=http%3A%2F%2Ffacebook.com%2Fmsdesign.rtml&amp;width=245&amp;colorscheme=light&amp;show_faces=true&amp; connections=9&amp;stream=false&amp;header=false&amp;height=270" scrolling="no" frameborder="0" style="border:4px solid rgb(53, 102, 203); overflow: hidden; height: 266px; width: 240px;background:#fff;"></iframe></div></div>


Note: msdesign.rtml change it with your facebook page user name.

After adding above codes, if this widget does not work, then make your that did you have in your template fb-root. If not, then add fbAsyncInit right after <body> from below.
 <div id='fb-root'/>
<script type='text/javascript'>
//<![CDATA[
window.fbAsyncInit = function() {
FB.init({
appId : '878599892159456', // replace with your app id
status : true, // check login status
cookie : true, // enable cookies
xfbml : true // parse XFBML
});
};
(function() {
var e = document.createElement('script');
e.src = document.location.protocol + '//connect.facebook.net/en_US/all.js';
e.async = true;
document.getElementById('fb-root').appendChild(e);
}());
//]]>
</script>
Save Template and now see result.

If you found any problem then obviously inform me on comment section. Happy blogging and keep sharing my posts. Thanks...

Thứ Bảy, 10 tháng 10, 2015

Flat Popup Facebook Like Box Widget for Blogger

Flat Popup Facebook Like Box for Blogger

Flat Popup Facebook Like Box for Blogger - in this session i shared this widget for blogger. Before some days, i shared another popup like box for blogger. That was Pop up Facebook Like box for Blogger with CSS ". This widget was made with some cookies and these are unnecessary. Recently i build another popup facebook like box widget using CSS and JavaScript (No cookies included). 

Targeted visitors are most important of any blog. Retention blog visitors more and more important. If you want to increase your facebook like then should promote your page in your blog with your blog's users. Then you will get more like from your users who visit your blog. Adding the pop up like box is most essential for get more like. So today i am gonna to share a tutorial about pop up facebook like box for blogger.

How it work?

Recently i found a popup jQuery named Easy Static Modal Popup Plugin. I used this jQuery in this popup facebook like box widgeteZmodal is a simple and fast jQuery plugin which enables you to display static html content in a responsive, fully configurable modal popup window. This a best popup plugin. Thats why i used eZmodal in this widget. 

In first load, in this widget shown a loader. This loader like below screenshot.

Flat Popup Facebook Like Box Widget for Blogger

Using facebook like box you may keep your visitors in your touch. This way is another great way for increase blog traffic. Popup facebook like box is great way for promote your fan page with your blog visitors. Proper use of like box, you can get more like for your fan page.

Facebook is a great way for increase blog traffic. When you share your content on your facebook page, then here is an opportunity to share your content by your visitor with others. In this way can get more extra traffic. In this circumstance you have must need promote your page with your blog. Popup like box is one of the best way.

Now lets start the tutorial. Before start work, please take a backup of your template. 
Step 1: Go to Blogger Dashboard > Template > Edit HTML and past below code before </style>
 /*=============== CSS Popup Like box by msdesignbd.com ======================*/
.mspopup{position:fixed;top:0;left:0;right:0;bottom:0;z-index:90000;background:rgba(0,0,0,.6);overflow-x:hidden;overflow-y:auto;display:none}
.mspopup-container{background:#fff url(http://i.imgur.com/2twQjiN.gif) no-repeat 50% 50%;padding:0;font-size:14px;height:236px;position:fixed;top:50%;left:50%;z-index:90001;-webkit-box-shadow:0 0 15px 0 rgba(50,50,50,0.8);transform:translateY(-50%) translateX(-50%)}
.mspopup .mspopup-close{position:absolute;top:9px;right:20px;font-weight:700;font-family:Verdana;font-size:18px;cursor:pointer;color:#fff}
.mspopup .mspopup-close:hover{color:#535353}
.mspopup .mspopup-header{font-size:20px;padding:10px;text-align:center;color:#fff;font-family:Open Sans;background-color:#3B5998;text-shadow:1px 2px 4px #838383}
.mspopup .mspopup-header p{font-size:10px;padding:0;margin:0;font-weight:400;text-transform:initial}
.mspopup .mspopup-content{padding:10px 20px}

Step2: Now past below code before </body> tag.
 <script src='https://cdn.rawgit.com/msdesign92/ms-design/master/mspopup.js' type='text/javascript'/>
<script type='text/javascript'>
$(&#39;#popup-box&#39;).mspopup({
&#39;autoOpen&#39;: true
});
</script>

Now Save Template.

Step3: Go to Layout > Add a gadget > HTML/Javascript and past below code.
<div id="popup-box" class="mspopup">
<div class="mspopup-container">
<div class="mspopup-header">
<div class="mspopup-close" data-dismiss="mspopup">x</div>
Like us and Join with our community
<p> Get our all latest update from our facebook page, Its free and speedy</p>
</div>
<div class="mspopup-content">
<div class="fb-page" data-href="https://www.facebook.com/msdesign.rtml" data-width="400" data-height="300" data-small-header="true" data-adapt-container-width="true" data-hide-cover="true" data-show-facepile="true" data-show-posts="false"><div class="fb-xfbml-parse-ignore"></div></div>
</div>
</div>
</div>


Note: Change msdesign.rtml with your facebook page username.

That's it. Now refresh your blog and see awesomeness. Thanks...

Thứ Bảy, 1 tháng 8, 2015

New Mashable Mashshare Social Sharing Widget For Blogger

New Mashable Mashshare Social Sharing Widget For Blogger


Yeah! Here it is present. New Mashable Mashshare Social Sharing Widget For Blogger - in this session i will share a topic with you about Mashable Mashshare sharing widget for blogger. In this tutorial i shared this, how to add mashable mashshare in blogger.

Also Read: Flat Social Share Button for Blogger


This thing made by Sharrre (you can visit their website for further information). When i visit some website, then i see this type of widget. Although those websites are wordpress base. You know wordpress plugins are not supported in blogger. Recently i hard tried to make a Mashable Mashshare social sharing widget for blogger. I succeed but some resource are founded from internet those are freeware.

Blogtyrant  published a review about Mashable Mashshare. Although he published this review about wordpress plugin. But you found a main features about this widget from his review.


Now lets start this tutorial. Before starting work, please keep a backup file of your template for safety.

Go to Blogger Dashboard > Template > Edit HTML and copy past below CSS before ]]></b:skin>
 #sharrrrre{float:left;margin:0 5px 0 0;padding:8px;border-right:1px solid silver}
.sharrre .count{color:#7fc04c;font-weight:700;display:block;font-size:50px;position:relative;text-align:center;text-decoration:none;width:100px;line-height:40px;padding:0}
.sharrre .share{color:#666;display:block;font-size:10px;height:10px;text-align:center;text-decoration:none;width:100px;padding:0}
.social-div a{text-decoration:none!important;display:inline-block}
.social-div a img{display:inline-block;width:auto;height:auto;margin:0 8px 0 -5px;vertical-align:middle}
#socialshare{display:inline-block;vertical-align:middle;text-align:center;color:#fff;font-size:16px;padding:14px 20px 15px;text-decoration:none;font-family:Open Sans;margin-right:5px;-webkit-font-smoothing:antialiased;-webkit-text-rendering:optimizeLegibility;text-transform:uppercase}
#socialshare:active{padding:15px 20px;margin-bottom:-1px}
#socialshare:hover{opacity: 0.9;}
.share-toggle{position:relative;display:inline-block;cursor:pointer;vertical-align:middle;text-align:center;color:#fff}
.share-toggle a{color:#fff;text-decoration:none;}
.social-div{vertical-align:middle;margin: 25px;}
#expand-social{display:inline-block;position:relative;vertical-align:middle;height:53px}
#social-expand{display:inline-block;vertical-align:middle;position:relative;top:0;left:0}
.expand{background:#FF4949;position:relative;width:40px;height:40px;line-height:40px;font-size:200%}
.expand:active{box-shadow:0 1px 0 0 #c5bebe;height:41px;margin-bottom:-1px}
.expand:hover{opacity:.9}
.expand-minus{display:none}
.socialshare2{width:50px;height:50px;display:inline-block}
.socialshare2:active{height:51px;margin-bottom:-1px}
.socialshare2:hover{opacity:.9}
.mbafacebook{background:#507bbf}
.mbafacebook:active{box-shadow:0 1px 0 0 #4671b5}
.mbatwitter{background:#63cef2}
.mbagoogle-plus{background:#4d4f54 url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj4epoNKU3jOy6NTxWixxISktuJJErIqeSvJLQrtKZj_TQCzOyK1ohIUQfd_rWhdg6fnAmeY2RJAMZu9r0jzrugq9wdyx2tFwUFsO7NlOxV8I4eiOTFbQkyg1R2RFm2v3bvhI8g6vQOn0o/s20/g+.png) no-repeat center}
.mbagoogle-plus:active{box-shadow:0 1px 0 0 #43454c}
.mbalinkedin{background:#1aace3 url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYqZWtehoZp04SabC_TBqwakjhjwHHs_cU7AIcPPaH1n7hwGPqNYhDQdjmPgqJ6AR3Buv8IQhNn187Q1YRxEomrlaW9SbLlvt03TgLoJ4SmFqyphAErUpPcMbq4WRbfYqJjLpTxdlblFE/s20/in.png) no-repeat center}
.mbalinkedin:active{box-shadow:0 1px 0 0 #12a4db}
.mbapinterest{background:#f16261 url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhTP1A2iblU2QX26ueTOLEMdbuMdmaacvVFOnCV191NHSafNh7bpLzUkwP0Q5sZVxPrtkI3Zk32JNyOngy9MP_WPg8dJPiaKjTbk0h3_iXU6Sawk4DLlu7kMpqBKmwtj_o_xSTTKUe1RQY/s20/pinterest.png) no-repeat center}
.mbapinterest:active{box-shadow:0 1px 0 0 #e85756}
.mbastumbleupon{background:#fdaf40 url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgy7S6-iJ5MQYeEIn2_thEUaDUPgc_oS178POClPeSNAS3AczJlW-WtFx-3PxzqXbgqJQFI213mXNETe56XrqWgJWgCm1Sn2ZZrQiqln15PMRQN-xAapN5AVsXQeCFCNhZlcF_uVGAndGQ/s20/stumble.png) no-repeat center}
.mbastumbleupon:active{box-shadow:0 1px 0 0 #f5a635}


Now Copy past below code right after  <data:post.body/>
 <b:if cond='data:blog.pageType == &quot;item&quot;'>
<div class='social-div'>
<div id='sharrrrre'>
<div data-title='SHARES' id='shareme'/>
</div>
<div style='display: inline-block; margin-bottom: 20px;'>
<a class='mbafacebook' expr:href='&quot;http://www.facebook.com/sharer.php?u=&quot; + data:post.url + &quot;&amp;title=&quot;+ data:post.title' id='socialshare' onclick='window.open(this.href, &apos;windowName&apos;, &apos;width=550, height=600, left=24, top=24, scrollbars, resizable&apos;); return false;' rel='nofollow' target='_blank'>
<img src='https://googledrive.com/host/0B8D3MQmcZTyvN1kzV3lfS2h6NW8'/>
Share on Facebook
</a>
<a class='mbatwitter' expr:href='&quot;http://twitter.com/share?url=&quot; + data:post.url + &quot;&amp;title=&quot; + data:post.title' id='socialshare' onclick='window.open(this.href, &apos;windowName&apos;, &apos;width=550, height=600, left=24, top=24, scrollbars, resizable&apos;); return false;' rel='nofollow' target='_blank'>
<img src='https://googledrive.com/host/0B8D3MQmcZTyvVXp2Qm5OSzRMUmM'/>
Share on Twitter
</a>
</div>
<div id='expand-social' style='display:none;'>
<a class='socialshare2 mbagoogle-plus' data-title='Google+' expr:href='&quot;https://plus.google.com/u/0/share?url=&quot; + data:post.url' onclick='window.open(this.href, &apos;windowName&apos;, &apos;width=550, height=600, left=24, top=24, scrollbars, resizable&apos;); return false;' rel='nofollow' target='_blank'>
</a>
<a class='socialshare2 mbalinkedin' data-title='Linkedin' expr:href='&quot;http://www.linkedin.com/shareArticle?mini=true&amp;url=&quot; + data:post.url + &quot;&amp;title=&quot; + data:post.title + &quot;&amp;source=&quot; + data:blog.title' onclick='window.open(this.href, &apos;windowName&apos;, &apos;width=550, height=600, left=24, top=24, scrollbars, resizable&apos;); return false;' target='_blank'>
</a>
<a class='socialshare2 mbastumbleupon' data-title='Stumble-Upon' expr:href='&quot;http://www.stumbleupon.com/submit?url=&quot; + data:post.url + &quot;&amp;title=&quot; + data:post.title' onclick='window.open(this.href, &apos;windowName&apos;, &apos;width=550, height=600, left=24, top=24, scrollbars, resizable&apos;); return false;' rel='nofollow' target='_blank'>
</a>
<a class='socialshare2 mbapinterest' data-title='Pin it' expr:href='&quot;http://pinterest.com/pin/create/button/?url=&quot; + data:post.url + &quot;&amp;media=&quot; + data:post.thumbnailUrl + &quot;&amp;description=&quot; + data:post.snippet' onclick='window.open(this.href, &apos;windowName&apos;, &apos;width=550, height=600, left=24, top=24, scrollbars, resizable&apos;); return false;' rel='nofollow' target='_blank'>
</a>
</div>
<div class='share-toggle'>
<div id='social-expand' onClick='toggle(&apos;expand-social&apos;);'>
<div class='expand-plus expand'>+</div>
<div class='expand-minus expand'>-</div>
</div>
</div>
</div>
</b:if>

Now last step. Copy past below Javascript before </body>
 <script src='https://cdn.rawgit.com/msdesign92/ms-design/master/mashable-share.js'/>
<script type='text/javascript'>
$(function(){
$(&#39;#shareme&#39;).sharrre({
share: {
googlePlus: true,
facebook: true,
twitter: true,
stumbleupon: true,
linkedin: true,
pinterest: true
},
enableTracking: true,
enableHover: false,
});
});
</script>
<script type='text/javascript'>
function toggle(d)
{
$(&quot;#&quot; + d).animate({width:&#39;toggle&#39;},400);
}
$(document).ready(function(){
$(&quot;#social-expand&quot;).click(function(){
$(&quot;.expand-plus&quot;).toggle();
$(&quot;.expand-minus&quot;).toggle();
});
});
</script>

Now Save Template.

Hope you like it. If you found any problem then feel free to leave a comment and if you think our posts are helpful then do not forget share our posts. Thanks...

Thứ Hai, 29 tháng 6, 2015

Install Syntax code highlighter in Blogger

Install Syntax code highlighter in Blogger

Install Syntax code highlighter in Blogger - today i am share a tutorial that how to install Syntax Code highlighter in blogger. For those of you who often share a tutorial course, already familiar with the term Syntax Highlighter.

Many of friends requested me for share this code highlighter. When you want to share any tutorial about blog with many code, then you have to need a code highlighter for share those code for better understand. So friend, now lets stat the tutorial. Just follow the below steps for installing syntax code highlighter for blogger.

Syntax code highlighter for Blogger

Code highlighter is a most important part of blogger who share on his/her blog any code tricks or tips. Who looking for prism Code Highlighting tricks for blogger this tutorial for only for you. 

Prism does its best to encourage good authoring practices. Therefore, it only works with <code> elements, since marking up code without a <code> element is semantically invalid. According to the HTML5 spec, the recommended way to define a code language is a language-xxxx class, which is what Prism uses. To make things easier however, Prism assumes that this language definition is inherited. Therefore, if multiple <code> elements have the same language, you can add the language-xxxx class on one of their common ancestors. This way, you can also define a document-wide default language, by adding a language-xxxx class on the <body> or <html> element. - Prism.com

Important features of Prism Code highlighter for blogger

  • Highlight CSS language
  • Highlight HTML5 language
  • Highlight Javascript language
  • Highlight jQuery language
  • Highlights embedded languages (e.g. CSS inside HTML, JavaScript inside HTML)
  • Highlights inline code as well, not just code blocks
  • Highlights nested languages (CSS in HTML, JavaScript in HTML

Install prism Syntax code highlighter in Blogger. Use this awesome code highlighting in blogspot blog. Syntax code highlighter can improve your blog's beauty. Prism code highlighter is awesome colorful code highlighter ever. If you wanna install this prism code highlighter in blogger, then follow below all steps. 

At first go to Blogger Dashboard > Template > Edit HTML and copy past below CSS Code before </style>
 
/* CSS Syntax Highlighter */
pre {padding:35px 10px 10px 10px;margin:.5em 0;white-space:pre;word-wrap:break-word;overflow:auto;background-color:#333;position:relative;max-height:500px;box-shadow:0 0 0 1px #eee;border-radius:3px;}
pre::before {font-size:13px;content:attr(title);position:absolute;top:0;background-color:transparent;padding:6px 10px 7px 10px;left:0;right:0;color:#333;display:block;margin:0 0 15px 0;font-weight:700;box-shadow:0 0 3px #ccc;}
pre::after {content:&quot;Double click to selection&quot;;padding:2px 10px;width:auto;height:auto;position:absolute;right:8px;top:4px;font-size:12px;color:#888;line-height:20px;transition:all 0.3s ease-in-out;}
pre:hover::after {opacity:0;top:-8px;visibility:visible;}
code {font-family:Consolas,Monaco,&#39;Andale Mono&#39;,&#39;Courier New&#39;,Courier,Monospace;line-height:16px;color:#aaa;background-color:transparent;
padding:1px 2px;font-size:12px;}
pre code {display:block;background:none;border:none;color:#aaa;direction:ltr;
text-align:left;word-spacing:normal;padding:10px;font-weight:bold;}
code .token.punctuation {color:#bbb;}
pre code .token.punctuation {color:#777;}
code .token.comment,code .token.prolog,code .token.doctype,code .token.cdata {color:#aaa;}
code .namespace {opacity:.8;}
code .token.property,code .token.tag,code .token.boolean,code .token.number {color:#d75046;}
code .token.selector,code .token.attr-name,code .token.string {color:#88a9ad;}
pre code .token.selector,pre code .token.attr-name {color:#00a1d6;}
pre code .token.string {color:#6fb401;}
code .token.entity,code .token.url,pre .language-css .token.string,pre .style .token.string {color:#5ac954;}
code .token.operator {color:#1887dd;}
code .token.atrule,code .token.attr-value {color:#009999;}
pre code .token.atrule,pre code .token.attr-value {color:#1baeb0;}
code .token.keyword {color:#e13200;font-style:italic;}
code .token.comment {font-style:italic;}
code .token.regex {color:#ccc;}
code .token.important {font-weight:bold;}
code .token.entity {cursor:help;}
pre mark {background-color:#ea4f4e!important;color:#fff!important;padding:2px;border-radius:2px;}
code mark {background-color:#ea4f4e!important;color:#fff!important;padding:2px;border-radius:2px;}
pre code mark {background-color:#ea4f4e!important;color:#fff!important;padding:2px;border-radius:2px;}
.comments pre {padding:10px 10px 15px 10px;background:#333;border-radius:3px;box-shadow:inset 0 0 5px rgba(0,0,0,0.2);text-shadow:0 -1px 0 rgba(0,0,0,0.3);}
.comments pre::before {content:&#39;Code&#39;;font-size:10px;font-weight:700;position:relative;top:0;background-color:#363636;padding:2px 8px;left:0;right:0;color:#fff;text-transform:uppercase;display:inline-block;margin:0 0 10px 0;border:none;border-radius:2px;border:1px solid #2a2a2a;box-shadow:inset 0 1px 0 rgba(255,255,255,0.2),inset 0 20px 20px rgba(255,255,255,0.1);text-shadow: 0 -1px 0 rgba(0,0,0,0.3);}
.comments pre::after {font-size:11px;}
.comments pre code {color:#aaa;}
.comments pre.line-numbers {padding-left:10px;}
pre.line-numbers {position:relative;padding-left:3.0em;counter-reset:linenumber;}
pre.line-numbers &gt; code {position:relative;}
.line-numbers .line-numbers-rows {height:100%;position:absolute;top:0;font-size:100%;left:-3.5em;width:3.5em;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;padding:10px 0 0 0;background:#444;}
.line-numbers-rows &gt; span {display:block;counter-increment:linenumber;}
.line-numbers-rows &gt; span:before {content:counter(linenumber);color:#aaa;display:block;
padding-right:0.8em;text-align:right;transition:350ms;}
pre[data-codetype=&quot;CSSku&quot;]:before,pre[data-codetype=&quot;HTMLku&quot;]:before,
pre[data-codetype=&quot;JavaScriptku&quot;]:before,pre[data-codetype=&quot;JQueryku&quot;]:before{background-color:#fff;}

After that save the 3 below codes just before </body>
 <script src='https://cdn.rawgit.com/msdesign92/ms-design/master/pismaa.js' type='text/javascript'/>

 <script>
$('pre').attr('class', 'line-numbers');
Prism.hooks.add("after-highlight",function(e){var t=e.element.parentNode;if(!t||!/pre/i.test(t.nodeName)||t.className.indexOf("line-numbers")===-1){return}var n=1+e.code.split("\n").length;var r;lines=new Array(n);lines=lines.join("<span></span>");r=document.createElement("span");r.className="line-numbers-rows";r.innerHTML=lines;if(t.hasAttribute("data-start")){t.style.counterReset="linenumber "+(parseInt(t.getAttribute("data-start"),10)-1)}e.element.appendChild(r)})
</script>


 <script type='text/javascript'>
var pres = document.getElementsByTagName(&quot;pre&quot;);
for (var i = 0; i &lt; pres.length; i++) {
pres[i].addEventListener(&quot;dblclick&quot;, function () {
var selection = getSelection();
var range = document.createRange();
range.selectNodeContents(this);
selection.removeAllRanges();
selection.addRange(range);
}, false);
}
</script>

Save the Template

Then when you create a new post, use the code below caller on the post HTML Tab

 <pre title="HTML" data-codetype ="HTMLku"><code class="language-markup"> ... YOUR HTML CODE HERE ... </code></pre>
<pre title="CSS" data-codetype ="CSSku"><code class="language-css"> ... YOUR CSS CODE HERE ... </code></pre>
<pre title="Javascript" data-codetype ="JavaScriptku"><code class="language-javascript"> ... YOUR JAVASCRIPT CODE HERE ... </code></pre>
<pre title="jQuery" data-codetype ="JQueryku"><code class="language-javascript"> ... YOUR jQuery CODE HERE ... </code></pre>

Thứ Bảy, 20 tháng 6, 2015

Pop up Email Subscribe box for Blogger

blogger pop up email subscribe box

Pop up Email Subscribe box for Blogger - is a blogger widget using jquery. This subscription form created with css3 and jquery. In this tutorial i shared how to add pop up email subscription box for your blogspot blog.

Also Read: Pop up Facebook Like box for Blogger with CSS


By adding this widget, you should easily increase your blog readers. It's a better way for increase blog readers. I hope this fresh pop up email subscribe box help you to increase blog readers. Now lets start the tutorial.

Go to blogger dashboard > Template > Edit HTML and past the below CSS Code before </style> 
 #sub-box {display:none;background:rgba(0,0,0,0.9);width:100%;height:100%;position:fixed;top:0;left:0;z-index:99999;}
#boxclose {width:100%;height:100%;-webkit-transform:translateZ(0);}
#boxview {background:#fff;border:8px solid #fff;width:600px;height:250px;position:absolute;top:33%;left:28%;}
#closebox {float:right;cursor:pointer;position:absolute;right:-1px;top:-2px;}
#closebox:before {content:&quot;Close&quot;;padding:5px 8px;background:#fff;color:#48cb7a;font-weight:normal;font-size:12px;font-family:Open sans;}
#boxlink,#boxlink a.visited,#boxlink a,#boxlink a:hover {color:#aaaaaa;font-size:9px;text-decoration:none;text-align:center;padding:5px;}
#subscribe-box {width:600px;height:250px;background-color:#02BA74;}
#subscribe-box p {font-family:&#39;Open Sans&#39;;font-size:18px;color:#fff;line-height:20px;padding:10px 20px 0 20px;margin:0;}
#subscribe-box .emailfield {padding:0px 20px 10px;}
#subscribe-box .emailfield input {background:#f9f9f9;color:#bbb;padding:10px;margin-top:10px;font-size:13px;font-family:&#39;Open Sans&#39;;width:96.3%;border:0;transition:all 0.4s ease-in-out;}
#subscribe-box .emailfield input:focus {background:#fff;outline:none;color:#888;}
#subscribe-box .emailfield .submitbutton {background:#444;color:#fff;text-transform:uppercase;font-weight:normal;font-size: 16px;border:none;outline:none;width:100%;cursor:pointer;border-radius:3px;transition:all 0.4s ease-in-out;}
#subscribe-box .emailfield .submitbutton:active {outline:none;border:none;background:#fff;color:#e25734;}
#subscribe-box .emailfield .submitbutton:hover{background:#fff;color:#444;}


Now Save Template.
Now go to Layout > Add a gadget > HTML/Javascript and past the following below code.
 <script type='text/javascript'>
//<![CDATA[
jQuery.cookie = function (key, value, options) {
// Pengaturan cookie
if (arguments.length > 1 && String(value) !== "[object Object]") {
options = jQuery.extend({}, options);
if (value === null || value === undefined) {
options.expires = -1;
}
if (typeof options.expires === 'number') {
var days = options.expires, t = options.expires = new Date();
t.setDate(t.getDate() + days);
}
value = String(value);
return (document.cookie = [
encodeURIComponent(key), '=',
options.raw ? value : encodeURIComponent(value),
options.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE
options.path ? '; path=' + options.path : '',
options.domain ? '; domain=' + options.domain : '',
options.secure ? '; secure' : ''
].join(''));
}
// cookie
options = value || {};
var result, decode = options.raw ? function (s) { return s; } : decodeURIComponent;
return (result = new RegExp('(?:^|; )' + encodeURIComponent(key) + '=([^;]*)').exec(document.cookie)) ? decode(result[1]) : null;
};
//]]>
</script>
<script type='text/javascript'>
jQuery(document).ready(function($){
if($.cookie('popup_facebook_box') != 'yes'){
$('#sub-box').delay(3000).fadeIn('fast');
$('#closebox, #boxclose').click(function(){
$('#sub-box').stop().fadeOut('fast');
});
}

});
</script>
<div id='sub-box'>
<div id='boxclose'>
</div>
<div id='boxview'>
<div id='closebox'>
</div>
<div id='subscribe-box'>
<center><p>Subscribe for Latest Update</p></center>
<div class='emailfield'>
<form action='http://feedburner.google.com/fb/a/mailverify?uri=YOUR-USER-NAME' method='post' onsubmit='window.open(&apos;http://feedburner.google.com/fb/a/mailverify?uri=YOUR-USER-NAME, &apos;popupwindow&apos;, &apos;scrollbars=yes,width=550,height=520&apos;);return true' target='popupwindow'>
<input type='text' name='name' onblur='if (this.value == &quot;&quot;) {this.value = &quot;Your Name&quot;;}' onfocus='if (this.value == &quot;Your Name&quot;) {this.value = &quot;&quot;;}' value='Your Name'/>
<input type='text' name='email' onblur='if (this.value == &quot;&quot;) {this.value = &quot;Your Email&quot;;}' onfocus='if (this.value == &quot;Your Email&quot;) {this.value = &quot;&quot;;}' value='Your Email'/>
<input name='uri' type='hidden' value='YOUR-USER-NAME'/>
<input name='loc' type='hidden' value='en_US'/>
<input class='submitbutton' type='submit' value='Subscribe Now!'/>

</form>
</div></div>
</div>
</div>

Note: YOUR-USER-NAME replace with your feedburner user name.

That's it. Now refresh your page and see result. If you found any problem then inform me comment section and if you think our post is helpful then do not forget to share with others. Thanks...