jeudi 27 février 2014

How To Stop Sites From Opening Your Blog In A Frame

OK this is another post that comes from a readers question.They said "I use Networked Blogs to auto share my posts on Facebook but when you click the link on Facebook it shows the page with a bar at the top and a different URL".

This is in fact called a frame and some websites display pages from other sites within a frame, Stumble Upon would be a good example as indeed is Networked Blogs.While I feel Stumble Upon has a reason for this many websites do it to keep people on their site, some even take credit for your content.

Example

In the first image you see how the blog usually looks :


Here we see the blog within the Networked Blogs frame.In the address bar you can see the URL is Networked Blogs (In Green) and a bar runs across the top of the page (In Red) :


We can fix this and add a line of script to your template that detects when your blog is being placed in a frame and overrides the frame.This tutorial is for Blogger Blogs but the code will work on any site.

Stop Your Blog Opening In A Frame
Click Here To View Full Post >>

Libellés :

How to Add Neat CSS3 Dropdown Menu in Blogger

Here's another simple yet amazing dropdown menu with pure CSS3 made by Andrew from script-tutorials.com to which I have made some slight modifications so that it could easily adapt in our Blogger template.

In the upper right corner of this menu we have the contact links and the social media icons for Facebook, Twitter, Google Plus and RSS feed. Below these links, we have the drop-down navigation menu and on the left side, the search form.
To achieve better user interface and interaction, the CSS dropdown menu features sub categories that appear with a nice touch of CSS3 box-shadow, text-shadow and a cool transition once the parent link is activated by a hover.

dropdown menu

Please visit this demo page to see it in action.

Adding the CSS dropdown navigation menu in Blogger

Step 1. Access your Blogger Dashboard and go to Template > click on the Edit HTML button


Step 2. Click anywhere inside the code area and press the CTRL + F keys to open the search box. Type the tag below inside the search box and hit Enter to find it.
Step 3. Just below add the HTML structure:
Replace the # symbols with the URLs of your links and replace the texts in blue with the titles that you want to appear. To change the social media icons, add the links of your icons instead of the ones in blue. If you don't know how to upload and get the URL of an image, please read this tutorial.

If you want to remove the sub categories, remove the code within the tags highlighted in yellow, including the ul tags. To remove only a menu element, remove the part that starts with
  • and ends with


  • Step 4. And now let's add the CSS styling for the menu. Search for the following piece of code:
    ]]>
    Just above ]]> add this code:
    #contact-links {
        text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.3);
        margin: auto;
        position: relative;
        width: 100%;
    }
    #contact-links a {
        color: #4C9FEB;
    }
    #contact-links a:hover {
        color: #3D85C6;
    }
    #my-links {
        float: right;
        font-size: 12px;
        margin: 4px 10px;
        overflow: hidden;
        text-shadow: 0 1px 0 #FFFFFF;
    }
    #my-links a {
        margin-left: 7px;
        padding-left: 8px;
        text-decoration: none;
    }
    #my-links a:first-child {
        border-width: 0;
    }
    #menu-container {
        background: -webkit-linear-gradient(#f6f6f6, #e9eaea) repeat scroll 0 0 transparent;
        background: -moz-linear-gradient(#f6f6f6, #e9eaea) repeat scroll 0 0 transparent;
        background: linear-gradient(#f6f6f6, #e9eaea) repeat scroll 0 0 transparent;
        filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f6f6f6', endColorstr='#e9eaea',GradientType=0 );
        border-radius: 0 0 4px 4px;
    border:1px solid rgba(0,0,0,0.1);
        box-shadow: -1px 1px 0 rgba(255, 255, 255, 0.8) inset;
        clear: both;
        height: 46px;
        padding-top: 1px;
    }
    #neat-menu {
        float: left;
    }
    #neat-menu a {
        text-decoration: none;
    }
    #neat-menu ul {
        list-style: none;
        margin: 0;
        padding: 0;
    }
    #neat-menu > ul > li {
        float: left;
        padding-bottom: 12px;
    }
    #neat-menu ul li a {
        box-shadow: -1px 0 0 rgba(255, 255, 255, 0.8) inset, 1px 0 0 rgba(255, 255, 255, 0.8) inset;
        border-color: #D1D1D1;
        border-image: none;
        border-style: solid;
        border-width: 0 1px 0 0;
        color: #333333;
        display: block;
        font-size: 14px;
        height: 25px;
        line-height: 25px;
        padding: 11px 15px 10px;
        text-shadow: 0 1px 0 #FFFFFF;
    }
    #neat-menu ul li a:hover {
    background: -webkit-linear-gradient(#efefef, #e9eaea) repeat scroll 0 0 transparent;
        background: -moz-linear-gradient(#efefef, #e9eaea) repeat scroll 0 0 transparent;
        background: linear-gradient(#efefef, #e9eaea) repeat scroll 0 0 transparent;
        filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#efefef', endColorstr='#e9eaea',GradientType=0 );
    }
    #neat-menu > ul > li.active > a {
        background: -webkit-linear-gradient(#55A6F1, #3F96E5) repeat scroll 0 0 transparent;
        background: -moz-linear-gradient(#55A6F1, #3F96E5) repeat scroll 0 0 transparent;
        background: linear-gradient(#55A6F1, #3F96E5) repeat scroll 0 0 transparent;
        filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#55A6F1', endColorstr='#3F96E5',GradientType=0 );
        border-bottom: 1px solid #2D81CC;
        border-top: 1px solid #4791D6;
        box-shadow: -1px 0 0 #55A6F1 inset, 1px 0 0 #55A6F1 inset;
        color: #FFFFFF;
        margin: -1px 0 -1px -1px;
        text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.3);
    }
    #neat-menu > ul > li.active > a:hover {
        background: -webkit-linear-gradient(#499FEE, #3F96E5) repeat scroll 0 0 transparent;
        background: -moz-linear-gradient(#499FEE, #3F96E5) repeat scroll 0 0 transparent;
        background: linear-gradient(#499FEE, #3F96E5) repeat scroll 0 0 transparent;
        filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#499FEE', endColorstr='#3F96E5',GradientType=0 );
    }
    #neat-menu > ul > li:first-child > a {
        border-radius: 0 0 0 5px;
    }
    #neat-menu ul ul {
        background: -webkit-linear-gradient(#F7F7F7, #F4F4F4) repeat scroll 0 0 padding-box transparent;
        background: -moz-linear-gradient(#F7F7F7, #F4F4F4) repeat scroll 0 0 padding-box transparent;
        background: linear-gradient(#F7F7F7, #F4F4F4) repeat scroll 0 0 padding-box transparent;
        filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#F7F7F7', endColorstr='#F4F4F4',GradientType=0 );
        border-radius: 5px 5px 5px 5px;
        border: 1px solid rgba(0, 0, 0, 0.1);
        box-shadow: 0 1px 0 #FFFFFF inset;
        height: 0;
        margin-top: 1px;
        opacity: 0;
        overflow: hidden;
        width: 240px;
        padding: 0;
        position: absolute;
        visibility: hidden;
        z-index: 1;
        -webkit-transition: all .5s;
        -moz-transition: all .5s;
        -ms-transition: all .5s;
        -o-transition: all .5s;
        transition: all .5s;
    }
    #neat-menu ul li:hover ul  {
        margin-top: 0\2;
        height: auto;
        opacity: 1;
        visibility: visible;
    }
    #neat-menu ul ul a {
        border-right-width: 0;
        border-top: 1px solid #D1D1D1;
        box-shadow: 0 1px 0 #FFFFFF inset;
        color: #444444;
        height: 24px;
        line-height: 24px;
        padding: 7px 12px;
        text-shadow: 0 1px 0 #FFFFFF;
    }
    #neat-menu ul ul a:hover {
    background: -webkit-linear-gradient(#55A6F1, #3F96E5) repeat scroll 0 0 transparent;
        background: -moz-linear-gradient(#55A6F1, #3F96E5) repeat scroll 0 0 transparent;
        background: linear-gradient(#55A6F1, #3F96E5) repeat scroll 0 0 transparent;
        filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#55A6F1', endColorstr='#3F96E5',GradientType=0 );
        border-top: 1px solid #4791D6;
        box-shadow: -1px 0 0 #55A6F1 inset, 1px 0 0 #55A6F1 inset;
        color: #FFFFFF;
        text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.3);
    }
    #neat-menu ul ul li:first-child a {
        border-top-width: 0;
    }
    #menu-search {
        margin:8px 10px 0 0;
        float: right;
    }
    #menu-search form {
        background: url("https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiWD9yB_2cARHeEks42_dQwKAnnmRiAVasSbaIZVSOu8zx9QCnt_tZlLtwo2lP6AOrv1P_mr9BMQTsnBrQiu_e3ZwnC79GtjTpeCUJ5XMt9I-bjZIornjlUu6w-QWKv4LSrxXhnAQL41SAH/s1600/menu-search.gif") no-repeat scroll 5% 50% transparent;
        border: 1px solid #CCCCCC;
        border-radius: 3px 3px 3px 3px;
        box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05) inset, 0 1px 0 #FFFFFF;
        height: 26px;
        padding: 0 25px;
        position: relative;
        width: 130px;
    }
    #menu-search form:hover {
        background-color: #F9F9F9;
    }
    #menu-search form input {
        color: #999999;
        font-size: 13px;
        height: 26px;
        text-shadow: 0 1px 0 #FFFFFF;
        background: none repeat scroll 0 0 transparent;
        border: medium none;
        float: left;
        outline: medium none;
        padding: 0;
        width: 100%;
    }
    #menu-search form input.placeholder, #menu-search form input:-moz-placeholder {
        color: #C4C4C4;
    }
    Step 5. Click on the Save template button to save the changes... and you're done! ;)

    I hope you like this CSS3 dropdown menu and if you enjoyed this tutorial, please share and subscribe.

    Libellés : ,

    mardi 25 février 2014

    Share Blog Posts in Social Media using AddThis

    In my opinion, AddThis is the most complete social sharing service allowing to share your posts in more than 270 different social networks. I use the AddThis widget, so if you would like to see a live demo, please scroll down to the bottom of this post to see the AddThis sharing buttons.


    This tutorial will show you how to register and add this feature on your blog and you will get to know some of the customization options of these buttons. So let's get started!

    Getting the AddThis share buttons code

    Step 1. Visit the https://www.addthis.com/get/sharing page.
    Step 2. To get the sharing buttons and to access the AddThis sharing stats to find out how many people shared your post by using the AddThis feature, click on the "Create account" button.

    create addthis account

    The site will ask you to make a small registration. Fill out the information to register. It's quick, simple and it's free. To finish the registration, click on the Register button.

    register addthis

    Step 3. After you've been logged in, right below the "Get sharing buttons for", choose the "A website" option.

    addthis share buttons

    Step 4. In the "Select style" section, choose the buttons style that you think would look the best on your site/blog. Please note that on the right side you can see a preview of these buttons.

    addthis sharing buttons

    Step 5. After you have chosen the style, the site will provide a code - click on the "Grab it" button to copy it.

    addthis code

    The code provided will look like this:









    Now that you have selected and set up your AddThis sharing buttons, let's add them in the footer of the posts.

    Adding the AddThis sharing buttons on Blogger

    Step 1. Access your Blogger Dashboard and go to Template, then click on the Edit HTML button on the right:

    blogger template

    Step 2. Click anywhere inside the code area and press the CTRL + F keys to open the search box.

    Step 3. Type the following line inside the search box and try to find the second occurrence of it - hit Enter:
    Step 4. Just above this line, add the code for the AddThis social sharing buttons.

    Note: If you want to add at the beginning of your posts, add the code below the second:

    How to add more AddThis buttons

    To add more buttons, simply choose the button for that social network and add the code just before the
    tag (refer to the step 5 from above).

    Some examples:
    /* linkedin button */
    /*gplus button */
    /* digg button */
    /* stumbleupon button */
    /* print button */

    CSS3 AddThis Share Buttons

    You can add just a single button, so that when the reader hovers over it, a menu will open with the options of social networks to share the post.

    css3 share buttons, addthis

    Visit this page for a demo.

    Step 1. Go to Template > click on the Edit HTML button > press the CTRL + F keys and search:
    Just above this line, paste the following code:



    Step 4. Now before ]]> add the following CSS styles:
    #floating-social-buttons {
    padding: 6px 0px 12px;
    position: absolute;
    background: #F6F6F6;
    border-bottom: 1px solid #DEDEDE;
    width: 550px;
    height: 18px;
    z-index: 99;
    }
    .floating-social-buttons {
    margin-left: 5px !important;
    }
    .floating-social-buttons li {
    float: left;
    margin-left: 5px;
    list-style:none;
    }
    To change the width of the bar, modify the 550px values in red. Note that this value also appears in the script which also needs to be modified.

    Step 5. Finally, just below the second
    (press CTRL + F and hit Enter twice to find the second one) add the following code: