Auto Image Thumbnail & ReadMore Link For Blogger Post

Socialize: 

Blogger is a good platform for blogging. It has many different pre built templates for its users. These templates are good enough for novice and beginners, but if you are expert or pro you need your own custom template. Custom templates help both you and your visitors in posting and viewing respectively. Customizing a blogger template is not an easy task since it is written in XML. Still there are many tweaks and hacks that can help you in customizing your blogger template.

The tweak or hack that I am going to share today is Auto Read More link with Image Thumbnail. In default every blogger has to put a line break manually in its posts for summarizing them. It is impossible to summarize the post with image and equal number of words, so that it looks beautiful at first page. The features, installation and customization method is so easy that anybody can make it to his taste.

Auto Read More

Auto Read More with image thumbnail is a great tweak for blogger blogs. It give them beauty as well as ease of access. Visitors will find Auto Read More with image thumbnail a great thing, helping them understand and visualize what a post about is and what is explained in it. A picture worth’s thousands of words therefore a post summary with image thumbnail makes the blog itself a worthy thing and help authors increase visitors and viewers.

Features and Installation technique is defined under specific headings so that everyone can understand easily what he or she is going to add to his or her blog.

Features

  • No need to manually enter Line Break in every post.
  • First image of the post will be chosen as the summary image.
  • Width and height of summary image is customizable.
  • Custom settings for both with or without image summary.
  • No external file, therefore no worries about the stopping of the code.

Installation

  1. Login to your Blogger account.
  2. Go to Dashboard > Template > Edit HTML.
  3. Copy paste first code before </head>.
  4. Search for <data:post.body/>.
  5. Replace <data:post.body/> with the second code
  6. Customize the first code if you want.
  7. Save template, and you are done.

First Code

<!-- Auto read more script Start -->
<script type='text/javascript'>
var noImgSum = 200;
imgSum = 100;
iHt = 320;
iWd = 240;
</script>
<script type='text/javascript'>
//<![CDATA[
function removeHtmlTag(strx,chop){
if(strx.indexOf("<")!=-1)
{
var s = strx.split("<");
for(var i=0;i<s.length;i++){
if(s[i].indexOf(">")!=-1){
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 autoReadMore(pID){
var div = document.getElementById(pID);
var imgtag = "";
var img = div.getElementsByTagName("img");
var summ = noImgSum;
if(img.length>=1) {
imgtag = '<img id="autoReadMoreImg" src="'+img[0].src+'" width="'+iWd+'px" height="'+iHt+'px"/>';
summ = imgSum;
}
var summary = imgtag + '<div>' + removeHtmlTag(div.innerHTML,summ) + '</div>';
div.innerHTML = summary;
}
//]]>
</script>
<!-- Auto read more script End -->

Second Code

<!-- Auto read more Start -->
<b:if cond='data:blog.pageType == "item"'>
<data:post.body/>
<b:else/>
<b:if cond='data:blog.pageType == "static_page"'>
<data:post.body/>
<b:else/>
<div expr:id='"summary" + data:post.id'><data:post.body/></div>
<script type='text/javascript'> autoReadMore("summary<data:post.id/>");
</script>
<a id='readmore' expr:href='data:post.url'>Read More ...</a>
</b:if>
</b:if>
<!-- Auto read more End -->

Customization

  • In the first code you can Customize these values
    • var noImgSum = 200; 200 is the characters in no image summary.
    • imgSum = 100; 100 is the characters in image summary.
    • iHt = 320; 320 is the height of summary image.
    • iWd = 240; 240 is the width of the summary image.
  • In the second code you can change Read More ... to your desired sentence.

Still have any queries, feel free to ask.

    You may also like...

20 comments:

  1. Nice Code But This Is Also Full Customizable If You Have A Better Look On It...

    ReplyDelete
  2. hiii...may i get a short code of this within few days please...if the code is bigger then website size will be large...so

    ReplyDelete
    Replies
    1. Sorry, There Is No One Like Your Desire, But We Will Short It Later.

      Delete
  3. how to setting that thumbnaill for float=left ?

    thx :)

    ReplyDelete
  4. This code is really not working...im using the picture window template for blogger.

    ReplyDelete
    Replies
    1. This code is working fine. At the very blog we are using this code.

      Delete
  5. Works fine, but i have the thumbnail and below the the text, how can i change that the text would be right of the thumbnail?

    ReplyDelete
  6. It work to me, but I want to reduce Image quality for optimize loading speed, anyone can share for me ?

    ReplyDelete
  7. Thank you, this works great! I have to ask since I am an absolute novice in this area, but is it possible to center the image in the post? How would I go about doing that?

    ReplyDelete
  8. This comment has been removed by the author.

    ReplyDelete
  9. It doesn't work with for mine, I don't know why.

    (testingfornto.blogspot.com)

    ReplyDelete
  10. to me didn't work :S http://secretosdelosabuelos.blogspot.com/

    ReplyDelete
  11. This is the third tutorial i Tried and failed.. Does this works on responsive template?

    ReplyDelete
  12. Overwhelming and stunning data can be found concerning this matter here profile worth to see it. dark0de market link

    ReplyDelete
  13. I on a phenomenally key level need to uncover to you that I am new to weblog and completely favored this blog page. Strong I'm going to bookmark your blog . You really have bewildering stories. Roots for changing with us your blog. dark0de market url

    ReplyDelete
  14. i never know the use of adobe shadow until i saw this post. thank you for this! this is very helpful. used auto parts

    ReplyDelete
  15. Your content is nothing short of brilliant in many ways. I think this is engaging and eye-opening material. Thank you so much for caring about your content and your readers. How to add thumbnail to YouTube video on android

    ReplyDelete
  16. Admiring the time and effort you put into your blog and detailed information you offer!.. How to make you tube thumbnail

    ReplyDelete

About Me

Hi, I am Muhammad Saalim, Co-Founder of EXEIdeas International and CEO of bord4banned. I am here to share my experiences with you and to help those who can help themselves.

Follow Me



Join Our Official FaceBook Group To Stay With Us.

Caution!

All data, codes, articles, tips and tricks etc, posted here are copyright work of MyTutspot.Blogspot, and are protected with DMCA. Any one, found to be thefting any data, will be under LEGAL ACTION.

My Tutspot.Blogspot 2018 All Rights Reserved
Designed by born4banned | A Project of EXEIdeas International