Pages

Translate

Showing posts with label Tips And Tricks. Show all posts
Showing posts with label Tips And Tricks. Show all posts

Wednesday 5 June 2013

How to Create a Floating "Sticky" Sidebar Widget in Blogger

Elements that float along your screen are pretty cool and attention grabbing. They are more commonly known as the “Sticky” floating widgets that stick to your screen as you scroll and tend to have a higher click through rate. This is the reason why at MyBloggerLab, we are using a Floating subscription widget in the sidebar that has been quite useful for us. Many of our users kept on emailing us about how they can create a “Sticky” floating sidebar widget in Blogger. In the past, we have already shown you how to make a Sticky Floating Footer bar in Blogger. In this article, we will show you how to create a floating “sticky” Sidebar widget in Blogger?

Remember: This works pretty well with all kinds of widgets present in your sidebar. It is not necessary that a person can only use if for email subscription boxes. You can use it for promotion of your items, galleries, popular postsInstagram photos, and basically everything that you wish for. 

Step#1: Adding a New Widget: 

The First thing you need to do is to add a new widget in your sidebar so that later on you can make it sticky. Go to Blogger.com >> Layout >> Add a Gadget >> Add HTML/JavaScript >> and name the widget as “My Sticky Gadget”. Now writing anything in the HTML body and once everything is down press “Save” button located at the end of the page.

Step#2: Installing a “Sticky” Plugin:

Now after properly adding a new widget in your blog, it’s time for some serious work. This time go to Template >> Edit HTML >> and search for the ending </body> tag and just above it paste the following JavaScript code.

<script>
/*<![CDATA[*/
// Sticky Plugin
// =============
// Author: Syed Faizan Ali
(function($) {
    var defaults = {
            topSpacing: 0,
            bottomSpacing: 0,
            className: 'is-sticky',
            center: false
        },
        $window = $(window),
        $document = $(document),
        sticked = [],
        windowHeight = $window.height(),
        scroller = function() {
            var scrollTop = $window.scrollTop(),
                documentHeight = $document.height(),
                dwh = documentHeight - windowHeight,
                extra = (scrollTop > dwh) ? dwh - scrollTop : 0;
            for (var i = 0; i < sticked.length; i++) {
                var s = sticked[i],
                    elementTop = s.stickyWrapper.offset().top,
                    etse = elementTop - s.topSpacing - extra;
                if (scrollTop <= etse) {
                    if (s.currentTop !== null) {
                        s.stickyElement.css('position', '').css('top', '').removeClass(s.className);
                        s.currentTop = null;
                    }
                }
                else {
                    var newTop = documentHeight - s.elementHeight - s.topSpacing - s.bottomSpacing - scrollTop - extra;
                    if (newTop < 0) {
                        newTop = newTop + s.topSpacing;
                    } else {
                        newTop = s.topSpacing;
                    }
                    if (s.currentTop != newTop) {
                        s.stickyElement.css('position', 'fixed').css('top', newTop).addClass(s.className);
                        s.currentTop = newTop;
                    }
                }
            }
        },
        resizer = function() {
            windowHeight = $window.height();
        };
    // should be more efficient than using $window.scroll(scroller) and $window.resize(resizer):
    if (window.addEventListener) {
        window.addEventListener('scroll', scroller, false);
        window.addEventListener('resize', resizer, false);
    } else if (window.attachEvent) {
        window.attachEvent('onscroll', scroller);
        window.attachEvent('onresize', resizer);
    }
    $.fn.sticky = function(options) {
        var o = $.extend(defaults, options);
        return this.each(function() {
            var stickyElement = $(this);
            if (o.center)
                var centerElement = "margin-left:auto;margin-right:auto;";
            stickyId = stickyElement.attr('id');
            stickyElement
                .wrapAll('<div id="' + stickyId + 'StickyWrapper" style="' + centerElement + '"></div>')
                .css('width', stickyElement.width());
            var elementHeight = stickyElement.outerHeight(),
                stickyWrapper = stickyElement.parent();
            stickyWrapper
                .css('width', stickyElement.outerWidth())
                .css('height', elementHeight)
                .css('clear', stickyElement.css('clear'));
            sticked.push({
                topSpacing: o.topSpacing,
                bottomSpacing: o.bottomSpacing,
                stickyElement: stickyElement,
                currentTop: null,
                stickyWrapper: stickyWrapper,
                elementHeight: elementHeight,
                className: o.className
            });
        });
    };
})(jQuery);
/*]]>*/
</script>
<script type='text/javascript'>
   $(document).ready(function(){
    $("#mblfloater").sticky({topSpacing:0});
   });
</script>

Step#3: Creating a Widget “Sticky” in Blogger:

After adding the JavaScript code, you have to search for the name of your widget. Since, we have named it as "My Sticky Gadget". Therefore, in the template coding search for "My Sticky Gadget". To be able to search correctly it is essential that you must use the built-in search box provided by the Blogger template editor.

Note: To enable the search box click anywhere in the template editor and press"CTRL+F". Now on finding "My Sticky Gadget" you will able to see a code similar to the the following one.

<b:widget id='HTML32' locked='false' title='My Sticky Gadget' type='HTML'>
            <b:includable id='main'>
  <!-- only display title if it's non-empty -->
  <b:if cond='data:title != &quot;&quot;'>
    <h2 class='title'><data:title/></h2>
  </b:if>
  <div class='widget-content'>
    <data:content/>
  </div>
</b:includable>
          </b:widget>

Now after finding the code as mentioned above, just replace it completely with the following coding.

<b:widget id='HTML32' locked='false' title='My Sticky Gadget' type='HTML'>
            <b:includable id='main'>
<div id='mblfloater'>
  <!-- only display title if it's non-empty -->
  <b:if cond='data:title != &quot;&quot;'>
    <h2 class='title'><data:title/></h2>
  </b:if>
  <div class='widget-content'>
    <data:content/>
  </div>  </div>
</b:includable>
          </b:widget>

Remember: The ID of your widget should be unique. For example, if you are usingid='HTML32' in any of your widget then you cannot use the same ID for others.

All done: Once everything is done, press the "Save Template" button to finish the process.

Sticky floating sidebar widgets can bring a lot of growth in your sign ups. They help in increasing user engagement. You can also use multiple floating widgets in sidebar. However, this act might annoy your visitors. Make sure you have a balanced design, so that it don't annoy your users

We hope that this article have helped you in creating a Sticky floating sidebar widget in your Blogger website. This plugin is robust enough to be used in any element of your sites. Let us know what you think in the below comments.

How Can People Auto Publish Their Facebook Status On Twitter

Currently Facebook has added "Profile Subscribes Functionality" and it has joined Twitter. Now you could attach Facebook account with your Twitter account to auto publish Facebook status on Twitter. 

I really wanna pay thanks to Google plus because it has been launched if it hadn't been then we shouldn't have gained these amazing Facebook features perhaps. 

As i have told you that this feature allows you to post auto updates from Facebook to Twitter.
And this feature is accessible not only for Facebook Pages,  but also for Your Facebook profiles.




How to Attach Facebook account with Twitter

I'm gonna teach you "How To Link Your Facebook status with Twitter" i mean to those who wanna update their status automatically from Facebook to twitter. 
So keep in mind that only that status will be auto published on Twitter whose privacy has been set as "Public".
 

To attach your Facebook account with Twitter use the Facebook–Twitter service link page.


And select Your Page there.

 



On the next page you will be asked to Log In to your Twitter Account and to authorize the app. 
 
 


It will ask you to make some changes when you allow the app.




You were to do just this to attach your Facebook account with twitter. Now We will see that whether it really works or not.
To do this Post some updates on your Facebook page and then log in to your twitter account and see that the posts are auto published on twitter or not.

Check Out Video Tutorial



 
Did You Like It ?
Please share your ideas about it and give your valuable feedback's and let me know what you liked or didn't like and if you liked then don't forget to subscribe to my daily post updates.
Also, give the post a social media share.

How Can People Add Background Images In Blogger Posts

 


Now i'm gonna tell you how can people add background images in posts. To have background pictures in blogger posts looks very nice. As you're watching background picture in my post. Any size of image can be used.
I hope this tricks will benefit you for your blog posts.

Step by step method to add background images in your post: 

First of all: 

Step #1: 
Go to www.blogger.com and sign in to your account.

Step #2:
Click on create "New Post" and then Click on "Edit HTML"


 

Step #3:
Copy the code given below and paste it in "Edit HTML". And after pasting it type your text content which you wanna write where "Your Text Here" is written.









                <div style="background:url(  Your Image
           URL Address  ) no-repeat;">
             <br>  Your Text Here  <br></div>










Step #4:
Copy the address of image which you wanna add and paste the address where "Your Image URL Address" is written.


Step #5:
Now you have done, Publish your post and see the changes you've done in your background.



 


Did You Like It ?
Please share your ideas about it and give your valuable feedback's let me know what you liked or didn't like and if you liked then don't forget to subscribe to my daily post updates
Also, give the post a social media share.

How To Add Mashable Sharing Widget With G+ Add To Circles

Mashable sharing widgets are so popular now a days. Many people search them and want to add them to their blogs because they really benefit them. 
They make your blogs attractive and up-to-date.

Mashable sharing widgets are fairly attractive and undoubtedly  they're one of the most charming and well equipped social box that indeed increase the subscription rates.

There are number of Mashable style sharing widgets drifting round the internet, and i extremely longed for coming up with this version.

Follow a few simple steps given below to add this awesome widget to your blog:

Step #1:   
Move to Blogger Dashboard >>> Design >>> Add a New Gadget.

And paste the following code in that new window:


  // PeH Mashable Sharing Widget

    <style>
    #search {
    }
    #search input[type="text"] {        background: url(search-white.png) no-repeat 10px 6px #fcfcfc;        border: 1px solid #d1d1d1;        font: bold 12px Arial,Helvetica,Sans-serif;        color: #bebebe;        width: 150px;        padding: 6px 15px 6px 35px;        -webkit-border-radius: 20px;        -moz-border-radius: 20px;        border-radius: 20px;        text-shadow: 0 2px 3px rgba(0, 0, 0, 0.1);        -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15) inset;        -moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15) inset;        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15) inset;        -webkit-transition: all 0.7s ease 0s;        -moz-transition: all 0.7s ease 0s;        -o-transition: all 0.7s ease 0s;        transition: all 0.7s ease 0s;        }
    #search input[type="text"]:focus {        width: 200px;        }
    </style>



    <style>        /* Social Widget */        #BeH-mashable-bar {            border: 0;            margin-bottom: 10px;            margin: 0 auto;                width:300px;        }        .fb-likebox {            background: #fff;            padding: 10px 10px 0 10px;            border: 1px solid #D8E6EB;            margin-top: -2px;                height:79px;        }        .googleplus {            background: #F5FCFE;            border-top: 1px solid #FFF;            border-bottom: 1px solid #ebebeb;            border-right: 1px solid #D8E6EB;            border-left: 1px solid #D8E6EB;            border-image: initial;            font-size: .90em;            font-family: "Arial","Helvetica",sans-serif;            color: #000;            padding: 9px 11px;            line-height: 1px;}        .googleplus span {            color: #000;            font-size: 11px;            position: absolute;            display:inline-block;            margin: 9px 70px;}        .g-plusone {    float: left;}        .twitter {            background: #EEF9FD;            padding: 10px;            border: 1px solid #C7DBE2;            border-top: 0;}        #mashable {            background: #EBEBEB;            border: 1px solid #CCC;            border-top: 1px solid white;            padding: 2px 8px 2px 3px;            text-align: right;            border-image: initial;}        #mashable .author-credit {}        #mashable .author-credit a {            font-size: 10px;            font-weight: bold;            text-shadow: 1px 1px white;            color: #1E598E;            text-decoration:none;}        #email-news-subscribe .email-box{            padding: 5px 10px;            font-family: "Arial","Helvetica",sans-serif;            border-top: 0;            border-right: 1px solid #C7DBE2;            border-left: 1px solid #C7DBE2;            border-image: initial;           height:34px;}        #email-news-subscribe .email-box input.email{            background:#FFFFFF;            border: 1px solid #dedede;            color: #999;            padding: 7px 10px 8px 10px;            -moz-border-radius: 3px;            -webkit-border-radius: 3px;            -o-border-radius: 3px;            -ms-border-radius: 3px;            -khtml-border-radius: 3px;            border-radius: 3px;            border-image: initial;            font-family: "Arial","Helvetica",sans-serif;}          #email-news-subscribe .email-box input.email:focus{color:#333}          #email-news-subscribe .email-box input.subscribe{            background: -moz-linear-gradient(center top,#FFCA00 0,#FF9B00 100%);            background: -webkit-gradient(linear,left top,left bottom,color-stop(0,#FFCA00),color-stop(1,#FF9B00));            background: -moz-linear-gradient(center top,#FFCA00 0,#FF9B00 100%);            -pie-background: linear-gradient(270deg,#ffca00,#ff9b00);            font-family: "Arial","Helvetica",sans-serif;            border-radius:3px;            -moz-border-radius:3px;            -webkit-border-radius:3px;            border:1px solid #cc7c00;            color:white;            text-shadow:#d08d00 1px 1px 0;            padding:7px 14px;            margin-left:3px;            font-weight:bold;            font-size:12px;            cursor:pointer;            border-image: initial;}        #email-news-subscribe .email-box input.subscribe:hover{            background: #ff9b00;            background-image:-moz-linear-gradient(top,#ffda4d,#ff9b00);            background-image:-webkit-gradient(linear,left top,left bottom,from(#ffda4d),to(#ff9b00));            filter:progid:DXImageTransform.Microsoft.Gradient(startColorStr=#ffffff,endColorStr=#ebebeb);            outline:0;-moz-box-shadow:0 0 3px #999;            -webkit-box-shadow:0 0 3px #999;            box-shadow:0 0 3px #999            background:-webkit-gradient(linear,left top,left bottom,color-stop(0,#ffda4d),color-stop(1,#ff9b00));            background:-moz-linear-gradient(center top,#ffda4d 0,#ff9b00 100%);            -pie-background:linear-gradient(270deg,#ffda4d,#ff9b00);            border-radius:3px;            -moz-border-radius:3px;            -webkit-border-radius:3px;            border:1px solid #cc7c00;            color:#FFFFFF;            text-shadow:#d08d00 1px 1px 0}          #other-social-bar {            background-color: #D8E6EB;            box-shadow: 0 1px 1px #FFFFFF inset;            padding: 0px;            font-family: "Arial","Helvetica",sans-serif;            font-weight:bold;            overflow: hidden;            border: 1px solid #B6D0DA;               height:37px;        }        #other-social-bar ul {list-style: none outside none; padding-left: 4px;}        #other-social-bar .other-follow {            float: center;            color:#1E598E;            overflow: hidden;            height:30px;            padding:14px;            width: 270px;}        #other-social-bar .other-follow ul {            list-style: none outside none;            padding-left: 4px;}        #other-social-bar .other-follow ul li {            font-size: 12px;            font-weight: bold;            display:inline;            border:0;            text-shadow: 1px 1px white;}          #other-social-bar .other-follow ul li a {            font-size: 12px;            color:#1E598E;            font-weight: bold;            display:inline;            text-shadow: 1px 1px white;}        #other-social-bar .other-follow li {            font-size: 12px;            font-weight: bold;            display:inline;            border:0;            text-shadow: 1px 1px white;}        #other-social-bar .other-follow li a {            font-size: 12px;            color:#1E598E;            font-weight: bold;            display:inline;            text-shadow: 1px 1px white;}        #other-social-bar .other-follow li.my-rss {            background: url('https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjXY9p_r10AnqlD0O6s9m5N-EwKJgCyWuZNt-plIenTR8UQXgWnYlUVtETMotx-EfRXvHtGbV5Bu1oCtYy_q2xojYnmKbbPSK_YEGCRCChB1wByoWesCyKs2HIMnzEH3Q9rYWZjZ3fScL8/s400/rss-16x16.png') no-repeat transparent;            line-height: 1;            padding: 0px 3px 1px 20px;            width: 60px;            margin-bottom:0px;                margin-left:5px;}
        #other-social-bar .other-follow li.my-rss a, #other-social-bar .other-follow li.my-linkedin a, #other-social-bar .other-follow li.my-gplus a{        text-decoration:none;        }
        #other-social-bar .other-follow li.my-rss a:hover, #other-social-bar .other-follow li.my-linkedin a:hover, #other-social-bar .other-follow li.my-gplus a:hover{        text-decoration:underline;        }
        #other-social-bar .other-follow li.my-linkedin {            background: url('https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjTl5B0DTaPdoD-H25_VGHM4F8tBovoq6q1jwPDB8apAV0qXj5MUp5MWaLUXETR_I1qEBhY8e7A0i8ToN3DbcKrDcHLIaNcV5uVG8yZX-jsOsmYWNX-0o_JdxsRbKMfJl9FvidXJYlcZWI/s400/linkedin-16x16.png') no-repeat transparent;            line-height: 1;            padding: 0px 3px 1px 20px;            width: 60px;            margin-bottom:0px;}        #other-social-bar .other-follow li.my-gplus {            background: url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgPZ4Kd9uDeLVMwlecccDl6Ff5B6sKG_00XzfhwtbIr9C30vi6Z1Zisg16_sN8WdgpEcODcSdbuwrdViCGFbaXHCiiq29-HGfzJULEpmz-P5QQYjKsxP8zYRQAL_4AUk-moHGXeIL6aJec/s400/gplus-16x16.png) no-repeat transparent;            line-height: 1;            width: 60px;            padding: 0px 3px 1px 20px;            margin-bottom:0px;}

        </style>

        <!--[if IE]>
        <style>        #email-news-subscribe .email-box input.subscribe{            background: #FFCA00;            }        </style>
        <![endif]-->
        
        <!--begin of social widget--> <div style="margin-bottom:10px;"> <div id="BeH-mashable-bar" > <!-- Begin Widget -->


    <form method="get" action="/search" id="search">      <input name="q" type="text" size="40" placeholder="Search..." />    </form><br/>
    <g:plus href="Here Paste Your G+ URL" rel="publisher" width="300" height="69" theme="light"></g:plus>



    <div class="fb-likebox"> <!-- Facebook --> <iframe src="//www.facebook.com/plugins/like.php?href=Here Paste Your Facebook URL&amp;send=false&amp;layout=standard&amp; width='50'px&amp;show_faces=true&amp;action=like&amp;colorscheme=light&amp;
        font&amp;height=100px&amp;appId=234513819928295" scrolling="no" frameborder="0" style="border:none; overflow:hidden; "></iframe></div>

    <div class="twitter"> <!-- Twitter --> <iframe title="" style="width: 300px; height: 20px;" class="twitter-follow-button" src="http://platform.twitter.com/widgets/follow_button.html#_=1319978796351&amp;
        align=&amp;button=blue&amp;id=twitter_tweet_button_0&amp;
        lang=en&amp;link_color=&amp;screen_name=Your Name&amp;show_count=&amp;
        show_screen_name=&amp;text_color=" frameborder="0" scrolling="no"></iframe> </div> <div id="email-news-subscribe"> <!-- Email Subscribe --> <div class="email-box">
        <form action="http://feedburner.google.com/fb/a/mailverify" method="post" target="popupwindow" onsubmit="window.open('http://feedburner.google.com/fb/a/mailverify?uri=Your Name', 'popupwindow', 'scrollbars=yes,width=550,height=520');return true">                  <input class="email" type="text" style="width: 150px; font-size: 12px;" id="email" name="email" value="Enter Your Email here.." onfocus="if(this.value==this.defaultValue)this.value=&#39;&#39;;" onblur="if(this.value==&#39;&#39;)this.value=this.defaultValue;" />                      <input type="hidden" value="bloggingehow" name="uri" />                <input type="hidden" name="loc" value="en_US" />                <input class="subscribe" name="commit" type="submit" value="Subscribe" />              </form>
        </div> </div> <div id="other-social-bar"> <!-- Other Social Bar --> <ul class="other-follow"> <li class="my-rss"> <a rel="nofollow" title="RSS" href="Your Feedburner URL" target="_blank">RSS Feed</a> </li> <li class="my-gplus"> <a rel="nofollow" title="Google Plus" rel="author" href="Here Paste your G+ URL/posts" target="_blank">Google Plus</a> </li> </ul> </div> <div id="mashable" style="background: #EBEBEB;border: 1px solid #CCC;border-top: 1px solid white;padding: 1px 8px 1px 3px;text-align: right;border-image: initial;font-size:10px;font-family: "arial","helvetica",sans-serif;"> </div></div>

        <!-- End Widget --> </div> <!--end of social widget-->

       



Step #2:  
After adding this code you will have to change the above blue colored text with your own links for your social media networks. 


You had to do just this and you've added the widget to your blog. 

Now if you have any problem just pass the comments below....