2009/05/04

Create Auto Read More ( no thumbnail)

Long time ago I have published 1 tip about creating Auto Readmore ( supporting thumbnail ) of Vietwebguide.com, and this tip will guide you how to create that Auto Read more again but it does not support the 1st thumbnail. Its advantage is you do not need to put the summary part between <span class="fullpost"> and </span> and other side, if you are owning many articles,posts...and now you want to make read more to your blog , you can not add the summary part <span class="fullpost"> to them all.Let me show you an example, you have 1000 articles so when will you finish ?And...
You like that "auto Read more" , but you don't like the thumbnails shown at each post, oh it makes you dizzy.

Now you don't need to worry , because you will get the new Read more with the similar features that you don't have any thing else.The only difference is no thumbnail.

Log in your blogger account , go to Edit HTML ( should back up your template) > choose Expand Widget Tempate , then look for the code <data:post.body/> ( press Ctrl F or find it each line , up to you)

Replace it by this whole code :

<b:if cond='data:blog.pageType != &quot;item&quot;'>
<div expr:id='&quot;summary&quot; + data:post.id'/>
<script type='text/javascript'>
var blogID = &quot;937920098338306331&quot;;
function retriveSummaryPost<data:post.id/>(json){document.getElementById(&quot;summary<data:post.id/>&quot;).innerHTML
= json.entry.summary.$t + &quot;...&quot;}

function createSummaryPost<data:post.id/>(POSTID){ var script =
document.createElement(&quot;script&quot;);
script.src = &quot;http://www.blogger.com/feeds/&quot;+blogID+&quot;/posts/summary/&quot;+POSTID+&quot;?alt=json-in-script&amp;callback=retriveSummaryPost<data:post.id/>&quot;;
script.type = &quot;text/javascript&quot;; document.getElementsByTagName(&#39;head&#39;)[0].appendChild(script);
}
</script>
<script type='text/javascript'>
createSummaryPost<data:post.id/>(&quot;<data:post.id/>&quot;);
</script>
<span class='rmlink' style='float:right'><a expr:href='data:post.url'>--&gt;Read more...</a></span>
</b:if>
<b:if cond='data:blog.pageType == &quot;item&quot;'>
<div id='post_body'><data:post.body/></div>
</b:if>


Look for the red code, that is the number of your blogID, if you don't know how to get your blogID , click here to view the instruction.

Note: If you can not find the code <data:post.body> because you have changed your template source many times, so try with the last <data:post.body> as you see.
If you have any problem please leave me a comment below , I will help you.

Follow me on Twitter now or subscribe me now to get the great tips for blogger everyday , don't leave them.
Thanks very much.
Zen

10 comments:

[relaxation music blog] said...

thanks thanks thanks . . the best post about read more hack on blogger..

Belajar SEO Para Pemula said...

can i modified that?

vuluganck said...

@Belajar SEO Para Pemula
Of course you can.

Ieda the Rainbow Princess said...

"If you can not find the code because you have changed your template source many times, so try with the last as you see"

Hello..
Hi..Zen..I'm Ieda..
I really like ur tutorial
about auto read more button..
I've tried for a few time to
apply it into my blog but the problem here,i cant find the data:post.body html code in my 'edit html' templates..
Maybe I did too many changes for my templates
so i cant find the data:post:body
code there..Could u plz teach me how to
put a read more button into my blog..
I hope U can help me to solve the problem..
Thanks a lot..

♥ ieda ♥

vuluganck said...

Every template has at least 1 "data:post:body", if you cannot find them,i assure you have modified uncountable times and they were deleted:),perhaps your template does not have that code because that template is not designed completely.
So the solution is :
-Try to work with the similar code to <data:post.body> as I wrote above such as data:post.body,<data:post.body/>..

wizard320 said...

i found two(2) in my html. which 1 should i replace with the code?

syiham said...

how to setting height of post ?

Dean said...

greetings to all.
I would first like to thank the writers of this blog by sharing information, a few years ago I read a book called guanacaste costa rica in this book deal with questions like this one.

Luna Maya said...

Ane pake cara yang satu ini gan, makasih..

Carlos said...

Hello,

I would like to ask why all my pages have buttons of read more. Like my "About page" "Contact us". I only wanted to have a readmore on the articles

Post a Comment

Thanks for reading , if you have any problem please leave me a comment here I will help you by my best.Please note that you put the friendly words tohelp each other to improving and developing these tips to be better,or the best way for you to track my blog is subscribing my Feed.You are always welcome on Zenplate.
Best regard
Zen

 
.