Tutorial Cara Buat Hide/Show Shoutbox

19 comments

click to zoom 


Hai all..bersua kembali ke tutorial yang berikutnya...
koz pasti kebanyakan korang mesti tertanya-tanya macam mana nak buat shoutbox macam koz nyer blog inikan...ok...lau korang nak tahu cara nak buat mari koz ajarkan...langkah-langkahnya senang jek...
sebelum mulakan pastikan korang dah ada shoutbox sendiri(kalau yang tak ada itu boleh dapatkan di sini Shoutbox )

Langkah 1

Log in blog >Layout> Page Elements>Add a Gadget>HTML/JavaScript 


Langkah 2


Korang copy dan paste code di bawah:-

<style type="text/css">
#gb{
position:fixed;
top:50px;
z-index:+1000;
}
* html #gb{position:relative;}

.gbtab{
height:150px;
width:100px;
float:left;
cursor:pointer;
background:url('http://img686.imageshack.us/img686/686/shoutbox.png') no-repeat;
}
.gbcontent{
float:left;
border:2px solid #666666;
background:#F5F5F5;
padding:10px;
}
</style>

<script type="text/javascript">
function showHideGB(){
var gb = document.getElementById("gb");
var w = gb.offsetWidth;
gb.opened ? moveGB(0, 100-w) : moveGB(80-w, 0);
gb.opened = !gb.opened;
}
function moveGB(x0, xf){
var gb = document.getElementById("gb");
var dx = Math.abs(x0-xf) > 10 ? 5 : 1;
var dir = xf>x0 ? 1 : -1;
var x = x0 + dx * dir;
gb.style.right = x.toString() + "px";
if(x0!=xf){setTimeout("moveGB("+x+", "+xf+")", 10);}
}
</script>
<div id="gb">
<div class="gbtab" onclick="showHideGB()"> </div>
<div class="gbcontent">

MASUKKAN CODE SHOUTBOX KORANG DEKAT SINI

<div style="text-align:right">
<a href="javascript:showHideGB()">
[close]
</a>
</div>
</div>
</div>
<script type="text/javascript">
var gb = document.getElementById("gb");
gb.style.right = (100-gb.offsetWidth).toString() + "px";
</script>
Langkah 3

Kemudian korang masukkan code shoutbox korang pada perkataan 
" MASUKKAN CODE SHOUTBOX KORANG DEKAT SINI"

dah masukkan save dan tengoklah hasilnya...
camat mencuba :D

Tutorial Cara Buat Auto Readmore Di setiap Post

50 comments

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

Tutorial Cara Memasang emoticon pada bahagian comment

37 comments

click to zoom

Hai all...hari ni koz nak berkongsi dengan korank cara nak taruk smile kat comment blog korang...

kalau nak tahu,ikut langkah-langkah seperti di bawah:-


apa-apa hal korang Save script template sebagai backup.


Langkah 1

Log in blog > Dashboard > Layout > Edit HTML. Seterusnya, klik pada kotak Expand Widget Templates...


Langkah 2

Dengan menggunakan keyboard, tekan kekunci Ctrl+ F dan taip atau paste code
</body>
pada ruang Find. Dan tekan kekunci Enter...


Langkah 3

Salin code di bawah dan paste diatas atau sebelum code
</body>

Salin code ini
<script src='http://sites.google.com/site/javascript10/emoticon.js' type='text/javascript'/>

Langkah 4

Lagi sekali dengan menggunakan keyboard, tekan kekunci Ctrl+ F dan taip atau paste code
<b:if cond='data:post.embedCommentForm'>

pada ruang Find. Seterusnya tekan kekunci Enter...


Langkah 5

Salin code di bawah dan paste di atas atau sebelum code
<b:if cond='data:post.embedCommentForm'>

Paste code ini

<b>
<img src='http://3.bp.blogspot.com/__hqk0jmhlcE/Sz8OxkDP6II/AAAAAAAAAMs/CovYIf-LL_8/s200/20x20-waaaht.png'/>:a:
<img src='http://3.bp.blogspot.com/__hqk0jmhlcE/Sz8OxVdg0cI/AAAAAAAAAMk/UwJaTZCOHis/s200/20x20-too_sad.png'/>:b:
<img src='http://3.bp.blogspot.com/__hqk0jmhlcE/Sz8OxKitqGI/AAAAAAAAAMc/zWMNKjSqTQ4/s200/20x20-look_down.png'/>:c:
<img src='http://1.bp.blogspot.com/__hqk0jmhlcE/Sz8OwwZk9hI/AAAAAAAAAMU/lhb3vISf1TU/s200/20x20-hell_boy.png'/>:d:
<img src='http://2.bp.blogspot.com/__hqk0jmhlcE/Sz8OwpXmMwI/AAAAAAAAAMM/vprwfWxg7co/s200/20x20-feel_good.png'/>:e:
<img src='http://3.bp.blogspot.com/__hqk0jmhlcE/Sz8OmUvk0mI/AAAAAAAAAME/5cECKglnxs8/s200/20x20-extreme_sexy_girl.png'/>:f:
<img src='http://2.bp.blogspot.com/__hqk0jmhlcE/Sz8OmYyjBFI/AAAAAAAAAL8/1Ry44V2xRHI/s200/20x20-confuse.png'/>:g:
<img src='http://2.bp.blogspot.com/__hqk0jmhlcE/Sz8OmCyE65I/AAAAAAAAAL0/a59volhDjcA/s200/20x20-confident.png'/>:h:
<img src='http://4.bp.blogspot.com/__hqk0jmhlcE/Sz8OlmucmDI/AAAAAAAAALs/vp1IhT2YVpI/s200/20x20-cold.png'/>:i:
<img src='http://4.bp.blogspot.com/__hqk0jmhlcE/Sz8OlZBZzmI/AAAAAAAAALk/YCaSAfqbHAc/s200/20x20-choler.png'/>:j:
<img src='http://2.bp.blogspot.com/__hqk0jmhlcE/Sz8OYKZsCeI/AAAAAAAAALc/R9KzwNpH1nU/s200/20x20-boss.png'/>:k:
<img src='http://2.bp.blogspot.com/__hqk0jmhlcE/Sz8OXjpmf_I/AAAAAAAAALU/MAglXLF-xHY/s200/20x20-big_smile.png'/>:l:
<img src='http://3.bp.blogspot.com/__hqk0jmhlcE/Sz8OXMmdPbI/AAAAAAAAALM/WyX3vQgP5Fg/s200/20x20-beauty.png'/>:m:
<img src='http://1.bp.blogspot.com/__hqk0jmhlcE/Sz8OW3v8h5I/AAAAAAAAALE/tfJS1mBT1co/s200/20x20-beat_brick.png'/>:n:
<img src='http://4.bp.blogspot.com/__hqk0jmhlcE/Sz8OWuw8zTI/AAAAAAAAAK8/SWacR_b15wo/s200/20x20-bad_smelly.png'/>:o:
<img src='http://1.bp.blogspot.com/__hqk0jmhlcE/Sz8OFtJNI7I/AAAAAAAAAK0/TBrJQJCUM6M/s200/20x20-angry.png'/>:p:
<img src='http://3.bp.blogspot.com/__hqk0jmhlcE/Sz8OE1lGnuI/AAAAAAAAAKs/uDrHlsxfAg0/s200/20x20-amazed.png'/>:q:
<img src='http://4.bp.blogspot.com/__hqk0jmhlcE/Sz8OEjM4SpI/AAAAAAAAAKk/2wYzAA6aSh4/s200/20x20-ah.png'/>:r:
<img src='http://4.bp.blogspot.com/__hqk0jmhlcE/Sz8OEVMt2FI/AAAAAAAAAKc/Ers8-nzWOMs/s200/20x20-after_boom.png'/>:s:
<img src='http://2.bp.blogspot.com/__hqk0jmhlcE/Sz8ODuF2DsI/AAAAAAAAAKU/Zjy0uQGhHZU/s200/20x20-adore.png'/>:t:
</b>


Sesudah itu save dan lihatlah hasilnya...

camat mencuba
 
Google PageRank Checker Powered by  MyPagerank.Net