Showing posts with label Blogger Hack. Show all posts
Showing posts with label Blogger Hack. Show all posts

Thursday, May 20, 2010

Automatic Read More Hack For Blogger With Thumbnail

Automatic Read More Hack For Blogger With Thumbnails i.e expandable post hack for blogger with thumbnail of image used in blogger posts and all this work is done by the script automatically,you just dont need to locate your image the script will do all work for you automatically.Just you have to write your post and publish it with one image in post related to post.

If you dont want to add thumbnail image in post summary then i had an post previously on automatic read more hack for blogger,read this.

Now how to install Automatic Read More Hack For Blogger With Thumbnails Demo snapshot is below.


Lets start with its installation:-

Now Login to Blogger Go to Layout > Edit HTML in your Blogger dashboard and check the "expand widget templates" box.

Find the closing </head> tag in your blog template, and paste the following section of code immediately before it:
<script type='text/javascript'>var thumbnail_mode = "no-float" ;
summary_noimg = 430;
summary_img = 340;
img_thumb_height = 100;
img_thumb_width = 120;
</script>
<script type='text/javascript'>
//
s[i] = s[i].substring(s[i].indexOf(">")+1,s[i].length);
}
}
strx = s.join("");
}
chop = (chop < strx.length-1) ? chop : strx.length-2;
while(strx.charAt(chop-1)!=' ' && strx.indexOf(' ',chop)!=-1) chop++;
strx = strx.substring(0,chop-1);
return strx+'...';
}

function createSummaryAndThumb(pID){
var div = document.getElementById(pID);
var imgtag = "";
var img = div.getElementsByTagName("img");
var summ = summary_noimg;
if(img.length>=1) {
imgtag = '<span style="float:left; padding:0px 10px 5px 0px;"><img src="'+img[0].src+'" width="'+img_thumb_width+'px" height="'+img_thumb_height+'px"/></span>';
summ = summary_img;
}

var summary = imgtag + '<div>' + removeHtmlTag(div.innerHTML,summ) + '</div>';
div.innerHTML = summary;
}


//]]>
</script>
Note in above codes we can change the numeric numbers according to our need

summary_noimg = 430; is post cut height without image
summary_img = 340; is post cut height with image
img_thumb_height = 100; is thumbnail image height
img_thumb_width = 120; is thumbnail image width

Now find this code <data:post.body/> in your template and replace it with below codes.

<b:if cond='data:blog.pageType != "item"'>

<div expr:id='"summary" + data:post.id'><data:post.body/></div>
<script type='text/javascript'>createSummaryAndThumb("summary<data:post.id/>");
</script> <span class='rmlink' style='float:right;padding-top:20px;'><a expr:href='data:post.url'> read more "<data:post.title/>"</a></span>

</b:if>
<b:if cond='data:blog.pageType == "item"'><data:post.body/></b:if>
Preview Your template if its showing thumbnail with read more hack Save it.

To show thumbnail it should have one image in your blogger posts and please upload the .js file to your server and dont forget to change the link with yours in codes to make this hack work.

I am sure everybody will love this hack for sure.babai

Monday, May 03, 2010

Statistics Widget for Blogger



What is Statistics Widget for Blogger?
 
Statistics Widget for Blogger will display the total number of posts and total number of comments on your blog. As of now, I have included only these two data for display. I do not see any value in displaying the total words in posts and total words in comments. I find them meaningless. If you are interested to display the total number of posts and total number of comments on your blog, please follow the instructions below.

Instructions to install Statistics Widget for Blogger

  • Log in to your Blogger account
  • On your Blogger Dashboard, click on the "Layout" link 
  • This will take you to the "Page Elements" tab. Decide where you want to insert the statistics widget and click on the "Add a Gadget" link accordingly.
    • Scroll down the list and find "HTML/ Javascript" and click on the "+" button 
  • This will open the "Configure HTML/ Javascript" window. In the title section, please type "Blog Statistics" or "Blog Information" or "Blog Data" or any other title as you may wish
  • In the content section, please copy & paste the following code:

<script style="text/javascript">

function numberOfPosts(json) {
document.write('Total Posts: <b>' + json.feed.openSearch$totalResults.$t + '</b><br>');
}

function numberOfComments(json) {
document.write('Total Comments: <b>' + json.feed.openSearch$totalResults.$t + '</b><br>');
}

</script>

<ul><li><script src="http://yourblog.blogspot.com/feeds/posts/default?alt=json-in-script&callback=numberOfPosts"></script></li>

<li><script src="http://yourblog.blogspot.com/feeds/comments/default?alt=json-in-script&callback=numberOfComments"></script></li></ul>

<span style="font-size:75%;"><a href="http://blogspot-n-blogger.blogspot.com/2010/05/statistics-widget-for-blogger.html" target="_blank">Widgets for Blogger</a></span>

  • Remember to replace the text in bold "yourblog" with your blog address. Take note to replace it in two locations.

  • Your window should look like the image below.
  • I have a link back to my blog at the bottom. You are free to remove the credit, if you don't like it
  • Click on "Save" button at the bottom right hand corner

That's it. You have created a widget to display the number of posts and number of comments on your blog. Please contact me if you have any doubts or you face any problems with the widget.

Friday, March 12, 2010

Animated Image Icon Before Post Titles in Blogger / Blogspot

Blogging is all about providing valuable information to your readers. In addition to this, you can customize your blog in such a way that your readers would enjoy your blog layout with the contents. So, here is the tip to add and show animated image icon before blogger post titles. It will be displayed as the logo to your each post on blogspot. This can be done with some simple HTML edits. Lets learn this blogger trick step by step.

Finding An Image Icon To Insert Before Blogger Post Titles :

First things first. You have to do some homework before adding animated image icons. First of all you have to find an icon to place in your blog. The maximum size of your icon should be 50*50 pixels. You may make a search on Google with search phrases like “Animated icons”, “Animated logos” and choose an image. See if the image you have choosen is not protected under any copyright law. Try to get an icon which blends perfectly with your blog theme. Then upload your icon to any image hosting
site such as imageshack, photobucket, tinypic or googlepages etc and get the link to your image. When you are done with this, proceed to next step.

Making HTML Code For Your Image Icon :

After getting the link to your image icon it’s time to make a HTML code using the image link. Follow below code to make a HTML code using the link to your animated icon.

<img src="LINK TO YOUR IMAGE HERE" style="border-width:0px" />

Change the text LINK TO YOUR TEXT HERE with the link to your image. Now I guess you are done with the HTML code to your link. Move to the next step.

Editing HTML To Insert Image Code

Now it’s time to implement the above code in your blogger template and your blog will start showing your icon before blogger post titles. To do this follow below mentioned steps.

1. Go to your blogger dashboard.
2. Navigate to Layout >> Edit HTML
3. Expand Widget Templates by clicking the box next to it
4. Search for the below code in your template by pressing Ctrl+F on your browser
<b:if cond="data:post.url">
5. Add your image HTML code just above this code in your template.
6. Save the template and you are done.

Now you can see an animated image icon before all your post titles on blogger/blogspot. You can also apply this trick to add some special notes before your post titles. Simply post your text in place of the image icon code in your blogger template code and you are done.
Reblog this post [with Zemanta]

Saturday, February 27, 2010

Replace an image instead of Newer posts, Older posts and Home text link

Today we will discuss how to replace an image instead of older posts and newer posts links. This hack is about replacing an image with the hyperlink instead of just the text link alone.

How to replace an image instead of Newer Posts, Older posts and Home

before you implement this hack make sure that you have created the necessary image for each links (Newer Post, Older Post and Home) and have uploaded in a web host. Now let us see how we can replace an image instead of Newer Posts, Older posts and Home link.


Friday, February 12, 2010

Add a Subtitle to Blogger Posts

This Blogger tutorial shows you how to easily and quickly add a subtitle to your Blogger posts (Blogspot posts) so that both search engines and readers will have more information about your post.This is an easy tweak to your Blogger blog that anyone can carry out in a couple of minutes.

Benefits of Using Subtitles in Posts
Adding a subtitle which appears below the title of your post can be both eye catching and informative. For instance a titling schema for this post could be:

Title: Add a Subtitle to a Blogger
Subtitle: Make Your Posts More Search Engine Friendly and User Friendly

If you craft your titles and subtitles carefully you will encourage more targeted readers of your blog as they will be able to see at a glance what your post is about rather than reading the whole article. Your traffic therefore might be slightly less but they will be far more targeted to the content of your site resulting in a lower bounce rate.

Tuesday, January 26, 2010

How to add related posts below every post

To add Related posts/Similar posts widget below every post on your blog, follow these simple steps:

First of all download this file:
relatedPosts_ForBlogger.js

Download here :  relatedPosts.rar


And upload the file (relatedPosts_ForBlogger2.js) to SigMirror.com or HotLinkFiles.com to get a DIRECT LINK to that file.

1. Go to Blogger.com
2. Now go to "Layout", then to "Edit HTML" section
3. Back up your present template, by "Downloading it"
4. Now click on "Expand widget templates"
5. Find this code: </head>