Advanced Feedburner Subscription gadget for Blogger

Previously i posted a tutorial on adding a shiny Feedburner subscription widget. This widget is the 2nd version of that subscription gadget. This time it's very classic and looks clean. 

This subscription widget is one of the best Blogger Gadget i have designed, the work of this gadget is simple but the looks it has got with CSS3 makes it professional.

Demo

Activate Email Subscription for your Feed

First of all you have to enable Email subscription for your Feed profile by going on  http://feedburner.google.com/, now click on your Feed name. You will see Publicize tab, click on it and one left there will be 'Email Subscriptions' and if you don't have it active you will see 'Activate' button. Just click on it.

But be there, you will need the code you get after you 'Activate' actually you only need the name for your Feed. Your code would look like this.


<form style="border:1px solid #ccc;padding:3px;text-align:center;" action="http://feedburner.google.com/fb/a/mailverify" method="post" target="popupwindow" onsubmit="window.open('http://feedburner.google.com/fb/a/mailverify?uri=Stramaxon', 'popupwindow', 'scrollbars=yes,width=550,height=520');return true">
<p>Enter your email address:</p>
<p><input type="text" style="width:140px" name="email"/>
</p>
<input type="hidden" value="Stramaxon" name="uri"/>
<input type="hidden" name="loc" value="en_US"/>
<input type="submit" value="Subscribe" />
<p>Delivered by <a href="http://feedburner.google.com" target="_blank">FeedBurner</a>
</p>
</form>


On first line you can see this http://feedburner.google.com/fb/a/mailverify?uri=Stramaxon , you can see i have highlighted the word after = in the address, 'Stramaxon' it's the name of my feed. You will also need your feedname. So copy it on a text editor for quick use.

The HTML 

For the subscription gadget, HTML is the most important part. The HTML code which you will need is as follows.


<div class='subscribe-stx'>
<form action='http://feedburner.google.com/fb/a/mailverify' class='frm-stx-btm' method='post' onsubmit='window.open(&apos;http://feedburner.google.com/fb/a/mailverify?uri=Stramaxon&apos;, &apos;popupwindow&apos;, &apos;scrollbars=yes,width=550,height=520&apos;);return true' target='popupwindow'>
<p id='email-ui'>Subscribe with Email for updates</p>
<div class='inl-9005'>
<p>
<input class='nam-subeml' name='email' style='width:140px' type='text'/>
</p>
<input id='ui015424' name='uri' type='hidden' value='Stramaxon'/>
<input id='ui03994' name='loc' type='hidden' value='en_US'/>
<input id='ui63494' type='submit' value='Subscribe'/>
</div>
<p id='ui43524'>Get updates from <a href='http://feeds.feedburner.com/Stramaxon' target='_blank'>YOUR_BLOG_NAME</a></p>
<div class='attr-stx'>
<a href='http://stramaxon.blogspot.com/2012/06/advanced-feedburner-subscription-gadget.html' target='blank'>Get this Gadget</a>
</div> 
</form>
</div>


See these edits you have to make

Line 3 :
Line 2 is little lengthy, so you have to scroll to side. In the last section, remember we took a the feed name, in my case it was 'Stramaxon'. You can see this URL in line 2  http://feedburner.google.com/fb/a/mailverify?uri=Stramaxon   
You just need to replace the uri with your feed name, check the 'Activate Email Subscription for your Feed' section to know what's your feed name. 

Line 8 :
You need to do the same changes, in the Value field just put your feed name.
<input id='ui015424' name='uri' type='hidden' value='Stramaxon'/>  

Line 12 : Again the same, just have to replace 'Stramaxon' with your feed name and replace YOUR_BLOG_NAME with your Blog name, you can write any thing there.
<p id='ui43524'>Get updates from <a href='http://feeds.feedburner.com/Stramaxon' target='_blank'>YOUR_BLOG_NAME</a></p>

You just need to make these three changes and the HTML is ready to be applied on your Template.

Where to add the HTML : After you have your HTML ready, put it on a plain text editor such as Notepad.

  1. Go to your Blogger Dashboard | Template
  2. Click on Edit HTML | Proceed (not available if you are using Dynamic Views)
  3. Check mark on 'Expand Widget Template
  4. Use CTRL+F or F3 to open default on-page search in your Browser
  5. You need to find the following code <div class="post-footer"> 
  6. And paste the subscription box HTML code above <div class="post-footer">, after you place the code hit Save.     
That's the part with HTML, check any of your Post page and see if the subscription box is appearing or not.

Don't worry if it's not styled, we still have to play with the CSS

Show only on Post Page

You may only want this subscribe box to be shown on the index page i.e the Post page. The HTML above will render the subscribe buttons on all types of page but wrapping the subscribe box HTML around Blogger conditional tag you can tell the server to load it only while the page is a Post Page.

<b:if cond='data:blog.pageType == &quot;item&quot;'> 
//HTML CODE HERE
</b:if>

    The CSS 

    The CSS is the main stuff that makes the gadget looks so professional and makes it an eye candy. But writing this CSS took me about 2 minutes.
    To add this CSS go to Blogger Dashboard -> Template -> Customize -> Advanced -> Add CSS -> Paste the CSS in the custom CSS box, press enter after the last line and hit Apply to Blog.

    Here's the Full CSS we will use to design the subscription box.

    .frm-stx-btm 
    {
        
        border:1px solid gainsboro ;
        padding-left:10px;
        border-left:25px solid #62C7FF;
        background:linear-gradient(45deg,#F3F3F3,rgba(226, 226, 226, 0.59)),url('https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjEg9sei6aqL4dKjYYc0QwsAlplFmuIhHSJDJ3bgMmTw8nLvgWSUbjGJxyWkoducEZHP8i_2OFuDBCYtLgpWlhLbQFnl7k_Kl2_34E628fa3BAob9cFMBuKj-wvtEDKZn5PhLRgpq1Q9qYz/s1600/Blogger-02.png') no-repeat 720px 70px;
        background:-webkit-linear-gradient(45deg,#F3F3F3,rgba(226, 226, 226, 0.59)),url('https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjEg9sei6aqL4dKjYYc0QwsAlplFmuIhHSJDJ3bgMmTw8nLvgWSUbjGJxyWkoducEZHP8i_2OFuDBCYtLgpWlhLbQFnl7k_Kl2_34E628fa3BAob9cFMBuKj-wvtEDKZn5PhLRgpq1Q9qYz/s1600/Blogger-02.png') no-repeat 720px 70px;
        background:-ms-linear-gradient(45deg,#F3F3F3,rgba(226, 226, 226, 0.59)),url('https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjEg9sei6aqL4dKjYYc0QwsAlplFmuIhHSJDJ3bgMmTw8nLvgWSUbjGJxyWkoducEZHP8i_2OFuDBCYtLgpWlhLbQFnl7k_Kl2_34E628fa3BAob9cFMBuKj-wvtEDKZn5PhLRgpq1Q9qYz/s1600/Blogger-02.png') no-repeat 720px 70px;
        background:-moz-linear-gradient(45deg,#F3F3F3,rgba(226, 226, 226, 0.59)),url('https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjEg9sei6aqL4dKjYYc0QwsAlplFmuIhHSJDJ3bgMmTw8nLvgWSUbjGJxyWkoducEZHP8i_2OFuDBCYtLgpWlhLbQFnl7k_Kl2_34E628fa3BAob9cFMBuKj-wvtEDKZn5PhLRgpq1Q9qYz/s1600/Blogger-02.png') no-repeat 720px 70px;
        background:-o-linear-gradient(45deg,#F3F3F3,rgba(226, 226, 226, 0.59)),url('https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjEg9sei6aqL4dKjYYc0QwsAlplFmuIhHSJDJ3bgMmTw8nLvgWSUbjGJxyWkoducEZHP8i_2OFuDBCYtLgpWlhLbQFnl7k_Kl2_34E628fa3BAob9cFMBuKj-wvtEDKZn5PhLRgpq1Q9qYz/s1600/Blogger-02.png') no-repeat 720px 70px;
        transition: all 0.5s ease-in-out;
        -webkit-transition: all 0.5s ease-in-out;
        -moz-transition: all 0.5s ease-in-out;
        -o-transition: all 0.5s ease-in-out;
        -ms-transition: all 0.5s ease-in-out;    
    }
    
    
    .frm-stx-btm:hover
    {
        background:-webkit-linear-gradient(45deg,#F3F3F3,rgba(226, 226, 226, 0.59)),url('https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjEg9sei6aqL4dKjYYc0QwsAlplFmuIhHSJDJ3bgMmTw8nLvgWSUbjGJxyWkoducEZHP8i_2OFuDBCYtLgpWlhLbQFnl7k_Kl2_34E628fa3BAob9cFMBuKj-wvtEDKZn5PhLRgpq1Q9qYz/s1600/Blogger-02.png') no-repeat 520px 20px;
        background:-moz-linear-gradient(45deg,#F3F3F3,rgba(226, 226, 226, 0.59)),url('https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjEg9sei6aqL4dKjYYc0QwsAlplFmuIhHSJDJ3bgMmTw8nLvgWSUbjGJxyWkoducEZHP8i_2OFuDBCYtLgpWlhLbQFnl7k_Kl2_34E628fa3BAob9cFMBuKj-wvtEDKZn5PhLRgpq1Q9qYz/s1600/Blogger-02.png') no-repeat 520px 20px;
        background:-ms-linear-gradient(45deg,#F3F3F3,rgba(226, 226, 226, 0.59)),url('https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjEg9sei6aqL4dKjYYc0QwsAlplFmuIhHSJDJ3bgMmTw8nLvgWSUbjGJxyWkoducEZHP8i_2OFuDBCYtLgpWlhLbQFnl7k_Kl2_34E628fa3BAob9cFMBuKj-wvtEDKZn5PhLRgpq1Q9qYz/s1600/Blogger-02.png') no-repeat 520px 20px;
        background:-o-linear-gradient(45deg,#F3F3F3,rgba(226, 226, 226, 0.59)),url('https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjEg9sei6aqL4dKjYYc0QwsAlplFmuIhHSJDJ3bgMmTw8nLvgWSUbjGJxyWkoducEZHP8i_2OFuDBCYtLgpWlhLbQFnl7k_Kl2_34E628fa3BAob9cFMBuKj-wvtEDKZn5PhLRgpq1Q9qYz/s1600/Blogger-02.png') no-repeat 520px 20px;
    }   
    
    .frm-stx-btm ::selection
    {
        background:#3F6083;
        color:white;
    } 
    
    .nam-subeml
    {
        display:inline;
        border:1px solid lightgrey;
        width:300px !important;
        height:30px;
        padding-left:10px !important;
        font-size:25px;
        color:grey;
        font-family:Arial, Helvetica, sans-serif;
        padding-bottom:5px;
        padding-top:2px;
        
    }
    
    .nam-subeml:focus
    {
    color:black;
    }
    
    .inl-9005 p 
    {display:inline !important;}
    
    #ui63494
    {
        width:100px;
        height:38px;
        top:-2px;
        position:relative;
        border:1px solid darkblue;
        font-family:verdana;
        color:white;
        background:-webkit-linear-gradient(45deg,#5FA3FA,#5494E6);
        background:-moz-linear-gradient(45deg,#5FA3FA,#5494E6);
        background:-ms-linear-gradient(45deg,#5FA3FA,#5494E6);
        background:-o-linear-gradient(45deg,#5FA3FA,#5494E6);
        font-weight:bold;
        font-size:14px;
    }
    
    #email-ui
    {
        font-size:20px;
        font-family:"Palatino Linotype", "Book Antiqua", Palatino, serif;
        margin-bottom:10px;
        word-spacing:2px;
        letter-spacing:1px;
    }
    .attr-stx
    {
        display:block !important;
        visibility:visible !important;
        text-align:right;
        padding:10px;
        font-family:'tahoma';
        font-size:14px;
    }    
    .attr-stx a
    { 
        display:inline-block !important;
        visibility:visible !important;
        text-decoration:none;
        border-bottom:1px dotted grey;
    } 
    .attr-stx a:hover
    {
        display:inline-block !important;
        visibility:visible !important;
        text-decoration:none;
        border-bottom:1px dotted grey;
        background-color:aliceblue;
    } 
    


    Copy and add this CSS to your Blog. Now check your blog page (should be a post page). If you did it all correct then you will see the subscription box clear and shiny.

    This can be used on websites or other blogging platform also, just remember that you have to place the HTML and CSS at the right place for it to display correctly.