Showing posts with label "being mary jane". Show all posts
Showing posts with label "being mary jane". Show all posts

Wednesday, 17 July 2013

How To Add Social Media Icons to Blogger Header


social media icons, facebook icons, social media icons for bloggerThis tutorial will help you to add social media icons in the top right corner of the page which could increases the likelihood that readers can follow through the various social networks. There are several ways to do this, like adding a new widget section to the blog header but now, we'll do it using an unordered list that uses icons of Facebook, Twitter, Google+ and blog feed, and as a bonus, the icons will rotate when you hover over them.

You can see a demo in this test blog.


Adding Social Media Icons to Blogger Header

Step 1. From your Blogger dashboard, go to Template and click on the Edit HTML button:

blogger blogspot, blogger template, blogger gadgets

Step 2. To expand the style, click on the small arrow on the left of <b:skin>...</b:skin> (screenshot 1), then click anywhere inside the code area to search (using CTRL + F) for the ]]></b:skin> tag (screenshot 2) and add this code just above it:

 /* Social icons for Blogger
----------------------------------------------- */

#social-icons {
margin-bottom:-30px;
height:50px;
width:100%;
display:block;
clear:both;
z-index: 2;
position: relative;
}
.social-media-icons {
display:table
}
.social-media-icons ul {
text-align:right;
padding:5px 5px 0 0
list-style-image:none;
list-style-position:outside;
list-style-type:none;
}
.social-media-icons ul {
margin-bottom:0;
padding:0;
float:right;
}
.social-media-icons li.media_icon {
margin-left:6px;
padding-left:0 !important;
background:none !important;
display:inline;
float:left;
}
.social-media-icons li:hover {
-moz-transform: rotate(360deg);
-webkit-transform: rotate(360deg);
-o-transform: rotate(360deg);
transform: rotate(-360deg);
-moz-transition: all 0.5s ease-in-out;
-webkit-transition: all 0.5s ease-in-out;
-o-transition: all 0.5s ease-in-out;
-ms-transition: all 0.5s ease-in-out;
transition: all 0.5s ease-in-out;
}

Screenshot 1:


Screenshot 2:


Step 3. Now search for this line

<b:section class='header' id='header' maxwidgets='1' showaddelement='no'>

Step 4. And just above it, add this code:

<div class='social-media-icons' id='social-icons'>
<ul>

<li class='media_icon'><a href='http://facebook.com/username'><img border='0' src='https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhjBdmR3zShEKchYRzp_oO1a8VmmKYxR87FgHhSCFvKrK-FD9O0hNnnrgbGWN7Rz0KXtbPEpxTonxtV8L2MqK-boXIHz5Yj3JXJBrV6FCNoWdoDmlJm1lVMgsEpw8N0HKvJgs9lXnJYeSQ/s1600/Facebook.png'/></a></li>

<li class='media_icon'><a href='http://twitter.com/#!/username'><img border='0' src='https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiPUrb9rBW4f_awm8aXXTc_Oqr1772R1njsVDoG_bK__pBZzUnlqz1TBaMuhLOk_PE9AS2-SmXkvX0FYJcH96DsWtjqv2jlEcNM8bdBEmBc7q0np6eckQo0CfDEa79Ej_sWRjenpOgPses/s1600/Twitter.png'/></a></li>

<li class='media_icon'><a href='https://plus.google.com/XXXXXXXXXXXXXXXXXX/about'><img border='0' src='https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg-zQYUyCLO7maGL30U3rDRNTo4wSTTK24WzTXF9l1VctcWOKjwa7ZEo_06WE_UFg0UALeIMXdvqPQM_r8v6MiwMI3D7hQ-0oIe-3bXsBpw4YTPftbcTaBYJ4CmZ8Ws4R9E1io6hhNrrfc/s1600/googleplus.png'/></a></li>

<li class='media_icon'><a href='http://name-of-your-blog.com/feeds/posts/default'><img border='0' src='https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiTdBYVt2YaryoaTl-G56caV2tCJFkFVqANompujaNvKsAq9J1JZIHasnAXf1skQJ3AF8TNguzDSqVoK4oCP_4JQSo5emE-WsGjZK9zEqsvb2wq_5wrDYQ_JVacT5PehE1zkY8u-VOpMY4/s1600/RSS.png'/></a></li>

</ul></div>

Customization

- Change what's in red with your usernames and id: the first is your Facebook username, the second is that of Twitter, in the third you should change the X by the ID of your Google+ profile and in the fourth you will put the name of your blog.
- To change the icons, just replace the urls in blue with the ones of your images.
- You can add more icons if you want, you just have to add before </ul></div> a line like this for each extra icon you want:

<li class='media_icon'><a href='Link URL'><img border='0' src='Image URL'/></a></li>

Step 5. Finally, Save the Template to apply the changes.

The effect is done with CSS3, so this effect will not work in older browsers.

Tuesday, 16 July 2013

Add Random Posts Widget to Blogger

The Random Posts Widget will show random posts you have added to your blog. The main advantages of this widget is that it is loading pretty fast and shows thumbnails of your posts too, along with the comments link.


How to add Random Posts Widget to Blogger

Step 1. Log in to Blogger Dashboard, and select Template > Edit HTML (click on Proceed button if needed)



Step 2. Select "Expand Widget Templates"

Step 3. Find (CTRL + F) the following tag:

]]></b:skin>

Step 4. Just above it, paste the code below :

#random-posts img{float:left;margin-right:10px;border:1px solid #999;background:#FFF;width:36px;height:36px;padding:3px}

Step 5. Save Template.

Step 6. Go to Layout, click on Add a Gadget 


random posts widget, random blogger

Step 7. Add a new HTML/JavaScript Gadget
random posts blogger

Step 8. Paste the following code in the empy HTML box:

<ul id='random-posts'>
<script type='text/javaScript'>
var rdp_numposts=5;
var rdp_snippet_length=150;
var rdp_info='yes';
var rdp_comment='Comments';
var rdp_disable='Comments Disabled';
var rdp_current=[];var rdp_total_posts=0;var rdp_current=new Array(rdp_numposts);function totalposts(json){rdp_total_posts=json.feed.openSearch$totalResults.$t}document.write('<script type=\"text/javascript\" src=\"/feeds/posts/default?alt=json-in-script&max-results=0&callback=totalposts\"><\/script>');function getvalue(){for(var i=0;i<rdp_numposts;i++){var found=false;var rndValue=get_random();for(var j=0;j<rdp_current.length;j++){if(rdp_current[j]==rndValue){found=true;break}};if(found){i--}else{rdp_current[i]=rndValue}}};function get_random(){var ranNum=1+Math.round(Math.random()*(rdp_total_posts-1));return ranNum};
</script>
<script type='text/javaScript'>
function random_posts(json){for(var i=0;i<rdp_numposts;i++){var entry=json.feed.entry[i];var rdp_posttitle=entry.title.$t;if('content'in entry){var rdp_get_snippet=entry.content.$t}else{if('summary'in entry){var rdp_get_snippet=entry.summary.$t}else{var rdp_get_snippet="";}};rdp_get_snippet=rdp_get_snippet.replace(/<[^>]*>/g,"");if(rdp_get_snippet.length<rdp_snippet_length){var rdp_snippet=rdp_get_snippet}else{rdp_get_snippet=rdp_get_snippet.substring(0,rdp_snippet_length);var space=rdp_get_snippet.lastIndexOf(" ");rdp_snippet=rdp_get_snippet.substring(0,space)+"&#133;";};for(var j=0;j<entry.link.length;j++){if('thr$total'in entry){var rdp_commentsNum=entry.thr$total.$t+' '+rdp_comment}else{rdp_commentsNum=rdp_disable};if(entry.link[j].rel=='alternate'){var rdp_posturl=entry.link[j].href;var rdp_postdate=entry.published.$t;if('media$thumbnail'in entry){var rdp_thumb=entry.media$thumbnail.url}else{rdp_thumb="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg9cQepOiQ9FHQ7boSCvAfHtleMpgGxceSlLxdQfjCOEtsQPs3gNwD2jH9WwgXwKX2foophwAmBLg5wZVYvQWCgJA1Oxjv4kAd0o736ilSXrKNzLfjLBzXcOWCvUrUpvVM3aYcgZR2dulU/s1600/default.jpg"}}};document.write('<li>');document.write('<img alt="'+rdp_posttitle+'" src="'+rdp_thumb+'"/>');document.write('<div><a href="'+rdp_posturl+'" rel="nofollow" title="'+rdp_snippet+'">'+rdp_posttitle+'</a></div>');if(rdp_info=='yes'){document.write('<span>'+rdp_postdate.substring(8,10)+'/'+rdp_postdate.substring(5,7)+'/'+rdp_postdate.substring(0,4)+' - '+rdp_commentsNum)+'</span>'}document.write('<div style="clear:both"></div></li>')}};getvalue();for(var i=0;i<rdp_numposts;i++){document.write('<script type=\"text/javascript\" src=\"/feeds/posts/default?alt=json-in-script&start-index='+rdp_current[i]+'&max-results=1&callback=random_posts\"><\/script>')};
</script>
</ul>

Note: Replace no. 5 with the number of posts you want to be show.

Step 9. Press Save and Enjoy!

How to Add A Comment Count Bubble To Blogger Post Titles

 
A comment bubble with current number of comments displayed to each blogger post titles could make your blog more attractive. This improves not only your comments count but also allows your visitors to see what are the most popular posts on your blog. When a post has many comments, then the comment bubble will show the popularity of your posts to readers and visitors so that they might be more interested in reading them.

So let's start adding it:


Step 1. Go to Dashboard - Template - Edit HTML (click on Proceed button, if needed)


Step 2. Select "Expand Widget Template" (make a backup)

    Step 3. Find - using CTRL + F - the following piece of code in your template:

    ]]></b:skin>

    Step 4. Add the below code just above ]]></b:skin>:

    .comment-bubble {
    float : right;
    width : 48px;
    height : 48px;
    background : url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjuAVQURH-mf9rmJJvto6N7CVfLQN7WMwAN3ymIVek5bDbJXUyW-MprqdW3AWibSqx7NY9C0rSVIHFJjezAMEx8clau0PO9HwcGGq_9q60yjsi_DRl8kYERe6MqTlin7EfJ1k2sePW8WtOy/s1600/speech
    +bubble+green.png);
    background-repeat: no-repeat;
    font-size : 18px;
    margin-top : -15px;
    margin-right : 2px;
    text-align : center;
    }

    Step 5. Now find this code:

    <b:if cond='data:post.title'>
    <h3 class='post-title entry-title'>

    Note: If you can't find it, search this code instead:

    <b:if cond='data:post.title'>
    <h3 class='post-title entry-title' itemprop='name'>

    Step 6. And add this code immediately after it:

    <b:if cond='data:post.allowComments'>
    <a class='comment-bubble' expr:href='data:post.addCommentUrl' expr:onclick='data:post.addCommentOnclick' style='color: #ffffff; font-size: 18px; font-weight: bold;'><data:post.numComments/></a>
    </b:if>

    Note:
    • to change the color of the comments number, replace #ffffff with the hex value of your color;
    • to change the font size, increase/decrease the 18px value;

    Step 7. Preview your template and if everything is ok, click on Save Template.

    Comment Bubbles

    You can choose one of the images below - right click on the desired image and select "Copy Image Address/Location", then replace the red code from step 3 with the address you just copied.

    bubble comment count, bubble blogger postsblogger comments, comment countblogger blogspot, blogger commentsblogger bubble comment countcomments in blogger titlesblogger tips, blogger tricksblogger widgets, bubble comment countbubble comment countBubble Comment CountBubble Comment Count, blogger blogspot


    That's it! Enjoy (: