Ads 468x60px

Pages

Tampilkan postingan dengan label box. Tampilkan semua postingan
Tampilkan postingan dengan label box. Tampilkan semua postingan

Rabu, 02 Oktober 2013

Fading Box With Newer Older Posts Links and Titles for Blogger

The navigation links are those that appear at the bottom of the page that says "Older Posts", "Newer Posts" and "Home" and help us to move through the blog posts. This tutorial will show you how to change the word "Older Posts" and "Newer Posts" for post titles and make these to appear in a box "fading" when you scroll down the page.
blogger gadgets, navigation for blogger

You can see it in action on this demo blog - when you scroll down, the navigation links will appear showing the post titles for the older/newer entries.

This way to display the navigation links will be seen only in individual entries, while those on the homepage and other parts of the blog will still be displayed as usual.

How to Add Navigation Box with Newer & Older Posts on Blogger

Step 1. From your Blogger Dashboard, go to Template > Edit HTML, click anywhere inside the code area and search - using CTRL + F - for this line:

<b:include name=nextprev/>

Screenshot:

Step 2. REPLACE the code above with this one:

<b:if cond=data:blog.pageType != &quot;item&quot;>
<b:include name=nextprev/>
</b:if>
<b:if cond=data:blog.pageType == &quot;item&quot;>
<div id=blog-pager-box>
<h4>Other posts published:</h4>
<b:include name=nextprev/>
</div>
</b:if>

Note: you can change the "Other posts published" title with your own

Step 3. Now add just above </head> the following code:

<b:if cond=data:blog.pageType == &quot;item&quot;>
<script src=http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js type=text/javascript/>
<script>
// <![CDATA[
$(function() {
$(#blog-pager-box).toggle()
.css({
width: 520px,
height: 150px,
position: fixed,
padding: 1em,
bottom: 0,
right: 0,
background: url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiIvE_yeDv-5ha1cjifbQhZYHeuoYyKe3_WEX8qdjqBkYdHADsn57bMv1sPjvSkJXL6V8mJDTf23Ra3CVwVCEhstDzngqM3qDlt-v-YfdU4yEp8eh0RwIlwbzJs9Uv1BD_S1QQYVVbeSGxv/s1600/paper.jpg)
});

$(window).scroll(function() {
if($(this).scrollTop() > 100) {
$(#blog-pager-box).fadeIn();
} else {
$(#blog-pager-box).fadeOut();
}
});
});
$(document).ready(function(){
var newerLink = $("a.blog-pager-newer-link").attr("href");
$("a.blog-pager-newer-link").load(newerLink+" .post-title:first", function() {
var newerLinkTitle = $("a.blog-pager-newer-link:first").text();
$(".blog-pager-newer-link").html("<div>Newer Posts:</div>" + newerLinkTitle);
});
var olderLink = $("a.blog-pager-older-link").attr("href");
$("a.blog-pager-older-link").load(olderLink+" .post-title:first", function() {
var olderLinkTitle = $("a.blog-pager-older-link").text();
$(".blog-pager-older-link").html("<div>Older Posts:</div>" + olderLinkTitle);
});
});
// ]]>
</script>

<style type=text/css>
<!--
#blog-pager-box {
box-shadow: 0 0 3px #AEAEAE;
z-index:9;
}

#blog-pager-box h4 {
margin:0;
padding:0;
color:#4898B9; /* Widgets title color */
font-size:16px; /* Title font size */
}

#blog-pager-newer-link {float:left;clear:both;line-height:30px;}
#blog-pager-older-link {float:left;clear:both;line-height:30px;}
.home-link {display:none;}
.blog-pager-older-link, .blog-pager-newer-link {
background-color: transparent !important;
background-image: none !important;
border:0 !important;
color: #4B4B4B !important; /* Color of the links */
float: left;
width: 500px;
clear:both;
}

a.blog-pager-older-link:hover, a.blog-pager-newer-link:hover {
text-decoration:none !important;
}
 
a.blog-pager-newer-link:before {
content: url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhjyfFbwhfXB4JP7zLTPe0Ep68ifa7sfDKDiAMl6Rdc0bLT9ZbAkUT5aZux6qVJ3QW3HJjjzPGBYm7YsALbyRtCKpRVXbczXh3qZ9EZ060Rof22k9Am4g8ssCdHgkTOa4hrUoyMYPDkuD4/s1600/back.png);
float:left;
}
a.blog-pager-older-link:before {
content: url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhoTjlqBCqKfjaJ8V65vwzMBE3nFOKWIBmxZwuh1qJ-vCUJ5Rsgf4oJT2p6ylob8btnyFeIzsEvaEphbaG1p1_piWchdNsDCOSsNZ4IdiEmcH9TKzTTXE-ytdZvqjnKx6i20pb9IbCo9RU/s1600/forward.png);
float:left;
}
#blog-pager {
width:500px;
background-color: transparent !important;
background-image: none !important;
border:0 !important;
text-align:left;
}
 
#blog-pager div {
color:#0577AB; /* Color for the "Newer Posts" and "Older Posts" text */
font-weight:bold;
margin-bottom: -5px;
}
a#blog-pager div:hover {
text-decoration:none !important;
color:#4898B9; /* Color for the "Newer Posts" and "Older Posts" text */
}
-->
</style>
</b:if>

Note that this gadget uses jQuery, so try to have only one version.


Customization:


- There are three URLs in blue, the first is the paper background image for the box, the other two are the icons that correspond to the arrows. You can replace these with your own.
- In green you can see where to change the text colors.
- The red number is the distance in pixels that activates the gadget, this means that the box will appear when you scroll down the 100px. You can use a higher value if your posts are usually long and therefore the "height" of the scroll is greater.

Step 4. Now, Save the Template and thats it!

You can also change the "Older Posts" and "Newer Posts" links with posts titles or images.
Read More..

Sabtu, 28 September 2013

How to add Facebook Like Fan Box to Blogger

A Facebook Fan Box or Like Box is a great plugin that allows blog visitors to subscribe to your blog updates via their Facebook accounts, without leaving your blog. After subscribing (by pressing like button), visitors will receive your most recent blog updates on their Facebook page. This box also displays faces of the "likers" on your blog. Before creating a fan box you should already have a facebook fan page. If you havent yet created, click here to learn How to Create a Facebook Fan Page.


Add Facebook Like Box to Blogger

1. Find out your Facebook fan page URL by visiting your Facebook fan page and copy the url in the address bar, you can see how your url should look like in my screenshot:


2. Then visit this page: http://developers.facebook.com/docs/reference/plugins/like-box

3. Paste your url into the Facebook Page URL field as it is shown below:


4. Once you are satisfied with the looks of the Like Box, click on the "Get Code" button

5. Youll be given two codes, titled HTML 5, XFBML and IFRAME. You only need the iframe code.
Select it and copy the code generated for your box as it is shown in the example below:


6. Then go to your Blogger Dashboard > Layout > click on the Add a Gadget link


 7. From the pop-up window, scroll down and select HTML/JavaScript



8. Paste the code in the empty HTML box.


9. Click Save and youre done.
Read More..