How to make widgets read more automatic on Blogspot | GET MONEY ON LINE How to make widgets read more automatic on Blogspot - GET MONEY ON LINE

Tutorial How to Use WordPress


How to make widgets read more automatic on Blogspot

Sunday, November 16, 2014


How to make widgets read more automatic on Blogspot that I think most good is that I will attach the script code in the widget below., after my long search for a suitable script code then this script that could fit with my blog. In the default view the homepage, the articles will be posted terpublish extends downward. Thanks to the automatic readmore widgets, blog will look more presentable and pleasing to the eye.

Well, to put widgets read more this is not too difficult. As usual, my friend had to do Log in Blogger, then select the menu template.

read more how to make automatic
Then select Edit HTML and further because it would update the display of bloggers now there is not just expand widget friend's script code </ head>. To facilitate the search, always use the Control + F or F3 key.

After the meet, replace the code with the code in the script below:

<script type='text/javascript'> var thumbnail_mode = &quot;no-float&quot; ; summary_noimg = 430; summary_img = 340; img_thumb_height = 100; img_thumb_width = 120; </script>
    <script type='text/javascript'>
    function removeHtmlTag(strx,chop){
    var s = strx.split("<");
    for(var i=0;i<s.length;i++){
    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;

Next step is to find the code <data: post.body />, then replace that code with the code below. Note, the script code <data: post.body /> in a template, there may be two or three pieces of script code like this. My friend can try to replace it one by one. And on this blog template, scrip code <data: post.body /> I replaced was the second.

 <b:if cond='data:blog.pageType != &quot;item&quot;'>
<div expr:id='&quot;summary&quot; +'><data:post.body/></div>
<script type='text/javascript'>createSummaryAndThumb(&quot;summary<>&quot;);
<span class='rmlink' style='float:right;padding-top:20px;'>
<a expr:href='data:post.url'> <b> readmore</b> &#187;&#187;&#160;&#160; </a></span>
<b:if cond='data:blog.pageType == &quot;item&quot;'><data:post.body/>

When finished, click the Preview friend can try to see the edited result. And if successful, my friend can save the edited by clicking the Save Template. Good luck and good luck. Good luck. 


Sidebar One

#Blog List