Auto Read More.Fungsion Auto is
Not only that, we can also control the number of characters displayed. Here there are two
Important! Already installed Read More old version in the code should be used to return to normal, the way remove the red code below (Each template may be different, so
Readmore
OK, if you've lived proceed with the tutorial below.
First, please go directly to the page Edit HTML, find the code then put this script on the code If so, do not forget at the store first.
Directly copy paste the code below:
Auto-readmore link script, version 2.0 (for
(C)2008 by Anhvo
********************************************/
function removeHtmlTag(strx,chop){
if(strx.indexOf("<")!=-1)
{
var s = strx.split("<");
for(var i=0;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
var summ = summary_noimg;
if(img.length>=1) {
imgtag = '';
summ = summary_img;
}
var summary = imgtag + '
div.innerHTML = summary;
}
//]]>
Description:
var thumbnail_mode = "float", (we can decide whether the location of the thumbnail in the (float) left, or if not, please replace the (no-float)
summary_noimg = 250; (Define how many characters will be displayed in the post without a picture / thumbnail)
summary_img = 250; (Define how many characters will be displayed in the post with the picture / thumbnail)
img_thumb_height = 120; (Thumbnail 'height in pixels)
img_thumb_width = 120; (Thumbnail 'width in pixels)
0 comments:
Post a Comment