Monday, 31 December 2012

Create Cool Smooth Scroll Back to Top Effect For Blogger Blogs


Finally yet another exciting trick to create a smooth scroll to top button for BlogSpot blogs. We have just discovered for you a cool JQuery script that does all the work. A back to top button is crucial for a blog or site because visitors enjoy easy site navigation so this button will provide them with this ease.We have kept the installation process a one step process. Please see this button in action towards the bottom right corner of this blog.

Now actually while testing the button on MBT blog, you will discover the best thing about this button i.e, it appears only when the user scrolls down the page and disappears as he scrolls up. Also google has now introduced floating ads on the bottom because of which the button gets hidden but we have also got a solution for that.We shifted the button a little upwards.

Add Scroll to Top button to Blogspot

  1. Go To Blogger > Design
  2. Choose HTML/JavaScript widget
  3. Paste the following code inside it
    <style>

    div#topcontrol{

    position:auto!important; margin-bottom:20px!important; z-index:9999999!important;

    }

    </style>

<script type="text/javascript" >
/***********************************************
* Scroll To Top Control script- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
* Modified by My Blogging Tricks
* This notice MUST stay intact for legal use
* Visit Project Page at http://www.dynamicdrive.com for full source code
***********************************************/
var scrolltotop={
    //startline: Integer. Number of pixels from top of doc scrollbar is scrolled before showing control
    //scrollto: Keyword (Integer, or "Scroll_to_Element_ID"). How far to scroll document up when control is clicked on (0=top).
    setting: {startline:100, scrollto: 0, scrollduration:1000, fadeduration:[500, 100]},
    controlHTML: '<img src="IMAGE LINK" />', //HTML for control, which is auto wrapped in DIV w/ ID="topcontrol"
    controlattrs: {offsetx:5, offsety:5}, //offset of control relative to right/ bottom of window corner
    anchorkeyword: '#top', //Enter href value of HTML anchors on the page that should also act as "Scroll Up" links
    state: {isvisible:false, shouldvisible:false},
    scrollup:function(){
        if (!this.cssfixedsupport) //if control is positioned using JavaScript
            this.$control.css({opacity:0}) //hide control immediately after clicking it
        var dest=isNaN(this.setting.scrollto)? this.setting.scrollto : parseInt(this.setting.scrollto)
        if (typeof dest=="string" && jQuery('#'+dest).length==1) //check element set by string exists
            dest=jQuery('#'+dest).offset().top
        else
            dest=0
        this.$body.animate({scrollTop: dest}, this.setting.scrollduration);
    },
    keepfixed:function(){
        var $window=jQuery(window)
        var controlx=$window.scrollLeft() + $window.width() - this.$control.width() - this.controlattrs.offsetx
        var controly=$window.scrollTop() + $window.height() - this.$control.height() - this.controlattrs.offsety
        this.$control.css({left:controlx+'px', top:controly+'px'})
    },
    togglecontrol:function(){
        var scrolltop=jQuery(window).scrollTop()
        if (!this.cssfixedsupport)
            this.keepfixed()
        this.state.shouldvisible=(scrolltop>=this.setting.startline)? true : false
        if (this.state.shouldvisible && !this.state.isvisible){
            this.$control.stop().animate({opacity:1}, this.setting.fadeduration[0])
            this.state.isvisible=true
        }
        else if (this.state.shouldvisible==false && this.state.isvisible){
            this.$control.stop().animate({opacity:0}, this.setting.fadeduration[1])
            this.state.isvisible=false
        }
    },
   
    init:function(){
        jQuery(document).ready(function($){
            var mainobj=scrolltotop
            var iebrws=document.all
            mainobj.cssfixedsupport=!iebrws || iebrws && document.compatMode=="CSS1Compat" && window.XMLHttpRequest //not IE or IE7+ browsers in standards mode
            mainobj.$body=(window.opera)? (document.compatMode=="CSS1Compat"? $('html') : $('body')) : $('html,body')
            mainobj.$control=$('<div id="topcontrol">'+mainobj.controlHTML+'</div>')
                .css({position:mainobj.cssfixedsupport? 'fixed' : 'absolute', bottom:mainobj.controlattrs.offsety, right:mainobj.controlattrs.offsetx, opacity:0, cursor:'pointer'})
                .attr({title:'Scroll Back to Top'})
                .click(function(){mainobj.scrollup(); return false})
                .appendTo('body')
            if (document.all && !window.XMLHttpRequest && mainobj.$control.text()!='') //loose check for IE6 and below, plus whether control contains any text
                mainobj.$control.css({width:mainobj.$control.width()}) //IE6- seems to require an explicit width on a DIV containing text
            mainobj.togglecontrol()
            $('a[href="' + mainobj.anchorkeyword +'"]').click(function(){
                mainobj.scrollup()
                return false
            })
            $(window).bind('scroll resize', function(e){
                mainobj.togglecontrol()
            })
        })
    }
}
scrolltotop.init()
</script>

      4.  OPTIONAL: Now if you haven't pasted this JQuery code in your template before, then paste it below the <head> tag,

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

Replace IMAGE LINK with the image link of your back to top button. You can get several beautiful free buttons right here. Just right click the buttons below and select "Copy image location" to fetch their links:



     5.   Save the widget and drag it near the footer or any bottom position.
     6.  View your blog to see the magic.

Still Have Any Question?

I hope this little trick works for all of you. If you have any questions on how to adjust the position and fade duration then please let me know. I didn't mention them for simplicity. Please do a favour by sharing it with your friends. Peace brothers :)

Friday, 28 December 2012

Optimize Blog Post Title with H2 for Better SEO


All of you bloggers may be familiar with headline tags that start from H1 and go up to H6 in decreasing order of size. You should know that they really play immense importance in your blog template optimization. Headlines, bolded and highlighted text draw attention. By default all blogger templates are designed such that the H1 tag is given to Homepage Main Title, H2 is given to Blog Description or Header dates, sidebar headers and H3 is assigned for post titles. While the fact is that your Post titles are the second most important part of your blog after the main title.

Its your post titles that ping search engines on an update and are indexed and crawled by search engine robots. Actually in SEO the post title is referred as the KING whiles post content is referred as the QUEEN. So if the king is treated with H3 tag instead of H2 tag then I guess you must re-plan your Traffic campaign.

Changing Post Tiles Heading Tags In Blogger


Changing post titles' from default H3 tag to H2 is extremely easy if you follow the steps below,

1.    Go To Blogger> Design > Edit HTML
2.    Backup your template
3.    Enable .
4.    Search for,

.post h3

5.    and replace it with

.post h2

(keep replacing that for all occurrences of .post h2)

6.    Then search for,

<h3><data:title/></h3>

7.    and replace it with this,

<h2><data:title/></h2>

8.    Again now search for the two highlighted codes,

<h3 class='post-title entry-title'>
     <b:if cond='data:post.link'>
       <a expr:href='data:post.link'><data:post.title/></a>
     <b:else/>
        <b:if cond='data:post.url'>
          <a expr:href='data:post.url'><data:post.title/></a>
        <b:else/>
          <data:post.title/>
        </b:if>
     </b:if>
</h3>

9.    And replace them with the code below,

<h2 class='post-title entry-title'>
     <b:if cond='data:post.link'>
       <a expr:href='data:post.link'><data:post.title/></a>
     <b:else/>
        <b:if cond='data:post.url'>
          <a expr:href='data:post.url'><data:post.title/></a>
        <b:else/>
          <data:post.title/>
        </b:if>
     </b:if>
</h2>

10.    Save your template and now Congrats for the smart change! :>

I am sure this change will bring a positive change in your web Traffic inshAllah. If you have a question then do not hesitate to post a comment as I like it when you post queries  :>

Tuesday, 25 December 2012

Online Meta Tag Generator Tool For Blogger



meta-tags-generator-tool 
Meta tags are the most popular html tags which are still recommended by SEOs. The first thing that every blogger or webmaster must do after creating a blog/website is to submit his blog/website to the search engines and also add important meta tags inside his blog's/website's template. To do this, now we have created a simple Meta Tag Generator Tool below with which you can  create important tags within seconds without any need of SEO knowledge at all!

Below are some steps that will help you in writing the best description and for choosing the most relevant keywords for your blog.

Meta Description:

Describe your blog in max 150 letters. The Character Counter tool can help you. For example we have chosen the following words for describing our blog,

A Blog about Blogger Tricks, Blogger Templates, Widgets, SEO, etc.

You can choose a similar description to describe your blog with most relevant words.

Meta Keywords:

Choose words that describe the main or core topics of your blog. Choose few but smart keywords that  reflect the overall content of your blog. Google keyword Tool can immensely help you in choosing the right keywords. 

Write a maximum of three words per keyword and separate each keyword using a comma. See my keywords as an example,


Blogger tricks, blogger tips, SEO guide, computer security, blogger widgets,


Meta Robot:


You don't need to be bothered with this tag so simply leave the default in the tool below.


Meta Tag Generator Tool


Description:
Keywords:
Author (Optional):
Robots (Optional):

Create Floating Bar for facebook, twitter and other sharing buttons for bloggers


Today I am going to introduce to you a new and cool widget for blogger designed that really took a lot of my time in designing it. You may have seen the design of floating sharing buttons with count on popular blogs. This widget has been tested by us on major browsers like IE6+, Firefox and Chrome and we found it working just fine with no compatibility issues or design conflicts.  If you copied this post or widget and took all the credits then we will take strict action against the blogger/developer and report to Adsense and GOOGLE DMCA. All of you developers and bloggers are requested to link back to this post if in case they will share this widget with their readers.

Copyright

All the codes below are copyrights of MyBloggerTricks. I have only edited and improved the code structure to make it work better and smoothly. We therefore request both bloggers and developers to kindly attach an attribution link back to this page and MyBloggerTricks if they wish to share this tutorial with their readers. Any copyright infringement shall result in your blog being reported to AdSense, Blogger and DMCA.

Adding Floating Bar To Blogger

We have kept the steps extremely easy to apply. But before applying, you would like to see how it looks like so below is the picture of the widget:

 

All you need is to copy and paste the long code we developed and tested all these days. Just follow these extremely easy steps:
    1. Go to Blogger > Template  
    2. Backup your template
    3. Click Edit HTML
    4. Click Proceed
    5. Then Click
    6. Search for,

    <b:includable id='post' var='post'>

         7. Just below it paste the following code:

    <b:if cond='data:blog.pageType == "item"'>
    <b:if cond='data:blog.pageType != "static_page"'>
    <style>
    .mbt_social_floating{
        position:fixed; bottom:10%; margin-left:-60px; float:left;     width:60px;
        background-color:#f7f7f7;     padding: 5px 0 0px 0px;
         border-top:1px solid #ddd;
    border-left:1px solid #ddd;
    border-bottom:1px solid #ddd;
    z-index:9999px !important;
    border-radius:5px;-moz-border-radius:5px;-webkit-border-radius:5px;
    }
    .mbt_social_floating .mbt_side_social_button{
        margin-bottom:5px;
        float:none;
        height:auto;
        width:60px;
    }
    .mbt_social_floating .st_twitter_vcount, .mbt_social_floating.st_plusone_vcount, .st_email{
        margin-left:5px;
    }
    .mbt_social_floating .stButton_gradient{
        background:none !important;
        height:21px !important;
        padding-left:0 !important;
    }
    .mbt_social_floating .chicklets, .mbt_social_floating .stMainServices {
        background:url(&#39;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEghIMdzrhml5bl23v6EHrdn55eput31XhkHm7dvHcFVPGw9-Fis7hd6dswOq3rEt-6SD4R1rJ8UK32kyAaoFDjwB3cB2Ik9T7-Wh5_1ukyD3VkdhsETJW8j-UJkp-tYjLXrvPiR_pkhiXTC/s400/gc_social_sprite.gif&#39;) no-repeat !important;
        height:19px !important;
        width:45px !important;
        padding:0 !important;
    }
    .st_email .chicklets{
        background-position:0 -77px !important;
        background-image:url(&#39;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEghIMdzrhml5bl23v6EHrdn55eput31XhkHm7dvHcFVPGw9-Fis7hd6dswOq3rEt-6SD4R1rJ8UK32kyAaoFDjwB3cB2Ik9T7-Wh5_1ukyD3VkdhsETJW8j-UJkp-tYjLXrvPiR_pkhiXTC/s400/gc_social_sprite.gif&#39;) !important;
    }
    .mbt_social_floating .st_twitter_vcount .st-twitter-counter{
        background-position:0 -58px !important;
    }
    .mbt_social_floating  .stButton_gradient{
        border:none !important;
    }
    .mbt_social_floating .stBubble_count{
        width:44px !important;
        font-size: 15px !important;
        font-weight: normal !important;
        padding-top:7px !important;
        height:23px !important;
        background:none !important;
    }
    .mbt_social_floating .st_twitter_vcount .stBubble_count{
        color:#00a6df;
        background-color:#f8fbfc !important;
    }
    .st_twitter_vcount{
        margin-bottom: 3px;
        display: block;
    }

    .st_email{
        margin-bottom: 5px; margin-top: 3px;
        display: block;
    }
    .mbt_social_floating .stBubble{
        background-position: 21px 31px !important;
        height:35px !important;
    }.mbt_social_floating .st_pinterest_vcount{
        margin-left:5px;
    }
    .mbt_social_floating .st_pinterest_vcount .st-pinterest-counter{
        background-position:0 -19px !important;
    }
    .mbt_social_floating .st_pinterest_vcount .stBubble_count{
        color:#FF0505;
        background-color:#fbf8f8 !important;
    }

    .mbt_social_floating .st_pinterest_vcount .stBubble{
        background-image:url('https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiW7GU0tFmbLVRImA1bwdLEwdX-ulhC2lZ2vBQ8Wkmw4rM0hGnmXoeQndLei-RV7rcNvSFq-E_LCxmklnENICwUL9ciqla3iXhNvdfgkyA4swQIuQRogrTmIW9_KWwasfH8t-M67kwmpN5Z/s400/bubble_arrow_pinterest.png') !important;
    }


    .st_pinterest_vcount{
        margin-bottom: 0px;
        display: block;
    }

    </style>

    <div class='mbt_social_floating'>
        <script type='text/javascript'>var switchTo5x=true;</script>
        <script src='http://w.sharethis.com/button/buttons.js' type='text/javascript'/>
            <script type='text/javascript'>stLight.options({onhover:false, , doNotHash: true, doNotCopy: true, hashAddressBar: false});</script>
    <div style='margin:0px 0 0px 10px;'><div id='fb-root'/><script src='http://connect.facebook.net/en_US/all.js#xfbml=1'/><fb:like font='' href='' layout='box_count' send='false' show_faces='false'/></div>
        <span class='st_twitter_vcount' displaytext='' st_via='mbloggingtricks'/>
    <span class='st_pinterest_vcount' displaytext=''/>
    <div style='margin:0px 0 0 5px;'>
        <span class='st_plusone_vcount' displaytext=''/>
    </div>
     
    <div class='addthis_toolbox addthis_default_style ' style='margin:5px 0px 5px 8px;'>
    <a class='addthis_counter'/>
    </div>
    <script src='http://s7.addthis.com/js/250/addthis_widget.js' type='text/javascript'/>
    <script type='text/javascript'>
    var addthis_config = {
         ui_cobrand: &quot;My Blogging Tricks&quot;,
    ui_header_color: &quot;#ffffff&quot;,
         ui_header_background: &quot;#0080FF&quot;
    }
    </script>
    <span class='st_email' displaytext=''/>
    <p style=' line-height:0px; font-size:10px; font-weight:bold; text-align:center;'><a href='http://www.mybloggingtricks.com/2012/12/create-floating-bar-for-facebook-other-social-media.html' style='color:#CAC8C8;'>Widgets</a></p>
    </div></b:if></b:if>

    Just replace mbloggingtricks with your twitter username.

         8.  Save your template and you are all done!

    Troubleshooting

    If in case the facebook like button isn't working then add the following code right below the <body> tag,


    <div id="fb-root"></div>
    <script>(function(d, s, id) {
      var js, fjs = d.getElementsByTagName(s)[0];
      if (d.getElementById(id)) return;
      js = d.createElement(s); js.id = id;
      js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";
      fjs.parentNode.insertBefore(js, fjs);
    }(document, 'script', 'facebook-jssdk'));</script> 

    Note:- This floating bar would display on post pages only and wont display on homepage. The widget has a white background and floats to the left of blog posts. Peace and blessings pals! :)

    Monday, 24 December 2012

    Hide Read More Link In Blogger Static Pages?


    Read More links are very important for a blog as they help giving a new and neat look to your homepage. But Read More links on static pages can look bad and give an unprofessional  look to your blog. Customizing and removing these can help to keep static blogger pages also neat and clean and increase user experience because as it is said "First Impression Last Long!"

    How To Hide Read More Link in Static Pages?

    1. Go To Blogger > Design > Edit HTML
    2. Backup your template
    3. Search for the old read more code which looks like this, or something similar to this:

    <b:if cond='data:blog.pageType != "item"'>
    <a expr:href='data:post.url'>
    <div style="text-align: right;">Read More ->></div></a>
    </b:if>

     
    Simply replace it with this one,

    <!--READ-MORE-STARTS-->
    <b:if cond='data:blog.pageType == &quot;static_page&quot;'><br/>
    <b:else/>
    <b:if cond='data:blog.pageType == &quot;index&quot;'><br/>
    <a expr:href='data:post.url'><div style='text-align: right;'>Read More ->></div>
    </a>
    </b:if>
    </b:if>
    <!--READ-MORE-STOPS-->


    Or if you want to add an image then simply replace it with the code below:

    <!--READ-MORE-STARTS-->
    <b:if cond='data:blog.pageType == &quot;static_page&quot;'><br/>
    <b:else/>
    <b:if cond='data:blog.pageType == &quot;index&quot;'><br/>
    <a expr:href='data:post.url'><div style='text-align: right;'>
    <img height='33px' src='IMAGE URL OF READ MORE BUTTON' width='120px'/></div>
    </a>
    </b:if>
    </b:if>
    <!--READ-MORE-STOPS-->

    Kindly replace IMAGE URL OF READ MORE BUTTON with Image link of your read more button. 

    Save your template and then view all your static Pages to see a new professional look and also see the code working just perfect! Peace and blessing ! :)