Tutorial Cara Buat Auto Readmore Di setiap Post

click to zoom

Hari ini koz nak berkongsi dengan korang cara-cara nak set button readmore didalam blog korang secara auto,sebagai contoh korang leh tengok pada setiap post blog koz ini...

okey langkah-langkahnya seperti berikut:-

Langkah 1 

Log in blog > Dashboard> Layout>Edit HTML. Dan kick pada kotak Expand Widget Templates...

Langkah 2
Tekan Ctrl+ F pada keyboard . Seterusnya, copy paste code


</head>
pada ruangan Find dan tekan Enter...

Langkah 3
Kemudian copy code di bawah dan paste sebelum code



</head>

Copy code di bawah ini
<script type='text/javascript'>

var thumbnail_mode = "float" ;

summary_noimg = 350;

summary_img = 450;

img_thumb_height = 140;

img_thumb_width = 140;

</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 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>

 Langkah 4

Tekan Ctrl+ F pada keyboard kemudian copy paste code di bawah pada ruang Find dan tekan Enter.


<data:post.body/>


Langkah 5

Copy dan paste code di bawah (gantikan) pada code tadi (Langkah 4)
<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'><a expr:href='data:post.url'><img src='http://img709.imageshack.us/img709/7056/readmorez.png'/></a></span>
</b:if>
<b:if cond='data:blog.pageType == "item"'><data:post.body/></b:if>
Kemudian save dan tengoklah hasilnya...
camat mencuba...
Ranking: 5

Comments:50

05 June, 2010 03:28

tak paham lah.. dr langkah 2 sampai 5 i tak paham.. i tau nak carik code gune ctrl+f tu tapi nak carik code ape dan nak paste kan code yg awk kasi tu kat mane?

08 June, 2010 18:10

????????????????????????

09 June, 2010 12:18

koz,
nk kne copy code mne??

09 June, 2010 13:21

@♥ifa tasya♥Copy code yang panjang tu seblum code head^^

09 June, 2010 15:37

mahu try,tapi takot mengganggu pembacaan blogger lain...huhu...btw nice en3..:)

16 June, 2010 17:18

saya x faham laa 4 and 5.. can anybody help?... :'(

16 June, 2010 17:36

@Ti Anne Mohd Yassinmaap ade kerosakkan code ...skrg dh okey^^

18 June, 2010 04:19

sy dah buat..jd...best sbb dia otometik..tp klu nak tukar read more tu jd bentuk lain cmne pulak..tq..

23 June, 2010 11:40

nak tanye, camne nak buang kotak tepi yg mengelilingi icon tu ek. reply me asap pls..

23 June, 2010 12:06

nadiah daud@^^kotak tu ada di sebabkan bukan mslh skrip yang koz kasi tpi mmg setting templet nadiah daud macam tu

23 June, 2010 12:08

alaaa... x leh buang ke..x cantek laa ade bende tuh.. huhu...

23 June, 2010 12:53

nadiah daud @ nak buang boleh tpi kne edit la bhgian HTML...koz x tau kat part mane code bingkai tu...sbb lain templet lain codenya...

sangat berguna..tq dak nakal

28 July, 2010 22:34

suka..suka..suka..
berjaya!! penerangan budak nalal memang best!

28 July, 2010 23:15

koz, ade masalah la koz, kuar bende ni

Read more: Tutorial...(Auto Readmore Di setiap Post) | .:Budak Nakal Blogspot:. Under Creative Commons License: Attribution

kat mane nak buang ea??da cari xjumpe pulak

28 July, 2010 23:32

yezz!!da dpt!:)) thanx koz, nati ajar cmnr nak kecikkan banner koz 2 plak ea

04 August, 2010 06:41

auto readmore memang akan effect kat page gak ea ? de care tak nak buang readmore kat page ?


cube tengok page saye .
coyotitoAIMD

06 August, 2010 18:45

yeah2..dah dapat TQ En KOz :)

11 August, 2010 14:19

x phm!! x de yg mudah cket ker?

22 August, 2010 08:29

arigatou..
dah berjaya buat..hehe

25 September, 2010 15:40

waa..da lme cri cre nk pasg widget 'Read More' ni. tp sume tak jadi.
thanx sgt2 kt Kox!
hihihi.
akhirnye..terharu2..:b:

01 October, 2010 18:14

koz,cmne kalo nk buang readmore lak ek?

06 October, 2010 23:57

he3 tys..sgt berguna...dh jadi...t.q! ~_^*

11 October, 2010 22:54

koz. kenapa daus tak jumpe .. dah tekan ctrl + F tapi tak jumpe

21 October, 2010 07:06

tv ye?best...nak tnye camne nk wat box untuk read moer yang lain?hehe

20 November, 2010 10:12

Samasa blogspot dan wordpress memang dah ada sedia terbina readmore menu. Gunajer :-) Kalau guna kod mesti ada kemahiran html kod. Kalau newbie digalakkan guna menu readmore

03 December, 2010 15:36

terima kasih , Dinaz baru pelajarinya dan berjaya...tq juga pada pd NurulChumel yg perkenalkan Dinaz ttg tutorial ni..

http://nurulchumel.blogspot.com/2010/10/tutorial-page.html

04 December, 2010 17:36

thanks...dh leh wat tp cne klu nk tuka design button 2...??

05 December, 2010 23:32

thnx...bgos la tutorial ny...sy dh lama dri toturial nk wt bnda ny tp asyik xjdi jerk...errr, tp an xde ke cara nk tukar kaler tu..pelik la, telmpate tema purple tp read more tu kaler ijau..buruk sehh, cne ea nk tkar??

12 January, 2011 15:58

tak menjadi la
serius tk jd?
plz help me .. blh tlg wt kn tk?

25 May, 2011 06:40

thanks...nice tutorial

08 June, 2011 01:21

kat Jia punye html takde pun :f:

10 July, 2011 19:12

salam..knpe kat atas blog tu ade Read more budak nakal sume2 tu?nak buang boleh?

31 July, 2011 10:35

MANTAP! Dah berjaya.. Terima kasih Budak Nakal yang baik hati..! Ahaks! XD

24 September, 2011 16:53

salam...mcm mana akak nak buang budak nakal bla.... kat atas page akak???? huhuhu

15 October, 2011 10:39

Akk nak minta tlg buatkan tutorial nak refer sesuatu pada post2 yng lepas contohnya ,nak lihat resepi (klik Disini) macammana nak buat ye...tak yah lah nak copy balik..

16 October, 2011 18:26

salam..nk tnye,,
sye pnye icon readmore tu ad 3 dkt every post
mcm nth bole ad 3 tu.
bole tlg x mcm mne nk buang icons tu ?
sbb klo sye gne auto readmore, pages kt blog sye x bole bce fully..
hrp bole tlg dak nakal

09 December, 2011 20:13

tenx....
da ley da... tp klu nk tuka box read more tu jjuz jd tulisan je or kaler lain mcm mane pulak ye?

22 September, 2012 02:24

jadi.. tp sarah tukar icon read more tu.

22 September, 2012 03:23

macam mana nie... read more ada kat pages jugak.. susah la, dah la xboleh bukak read morenya.

23 September, 2012 10:16

Maisarah Azmi @ folow sebaik2nya^^ pasti ok...kalau x jadi kemungkinan html anda hadapi masalah...

Anonymous
22 December, 2012 22:52

I all the time used to study piece of writing in news papers but now as I am a user of net
so from now I am using net for content, thanks to web.
Feel free to visit my weblog - acne cure

Anonymous
09 February, 2013 01:09

You might also have to rest your tendon for a specific time period additionally to wearing shoe lifts all through the time your tendon is healing

http://www.sporelab.com/forums/profile.php?mode=viewprofile&u=22113&sid=bcded4de9b7ac21ac69b428e3187e631

Anonymous
22 April, 2013 07:42

Write more, thats all I have to say. Literally, it seems as
though you relied on the video to make your point.

You obviously know what youre talking about, why
throw away your intelligence on just posting videos to your site when you could
be giving us something informative to read?

Also visit my blog :: germany

Anonymous
21 May, 2013 22:48

I loved as much as you will receive carried out right here.
The sketch is attractive, your authored material stylish.
nonetheless, you command get bought an impatience over that you wish be delivering the
following. unwell unquestionably come more formerly again as exactly the same nearly very often inside
case you shield this increase.

My web-site :: vakantiewoningen frankrijk huren

Post a Comment

Komehlah dan klik G+ di atas sekali okey^^

 
Google PageRank Checker Powered by  MyPagerank.Net