Follo Molo (Become My Stalker And Ask Me To Stalk Back....I prefer a Yandere...)

Bored?You can play around with these line of colours for a while.....it is 100times better than PS4...because I dont have one....

16 Ogos 2010

Blog Tutorial:Papar dan Sembunyikan Komen





1.Login ke blogger dashboard--> layout- -> Edit HTML

2.Klik "Expand Widget Templates".

Letakkan kod ni sebelum kod </head>

<script language="javascript">
function toggle() {
var ele = document.getElementById("toggleText");
var text = document.getElementById("displayText");
if(ele.style.display == "block") {
ele.style.display = "none";
text.innerHTML = "Show Comments";
}
else {
ele.style.display = "block";
text.innerHTML = "Hide Comments";
}
}
</script>

Ok,lepas tu korang cari kod yang macam ni kat dalam template korang

<dl expr:class='data:post.avatarIndentClass' id='comments-block'>

<b:loop values='data:post.comments' var='comment'>
<dt expr:class='&quot;comment-author &quot; + data:comment.authorClass' expr:id='data:comment.anchorName'>
<b:if cond='data:comment.favicon'>
<img expr:src='data:comment.favicon' height='16px' style='margin-bottom:-2px;' width='16px'/>
</b:if>
<a expr:name='data:comment.anchorName'/>
<b:if cond='data:blog.enabledCommentProfileImages'>
<data:comment.authorAvatarImage/>
</b:if>
<b:if cond='data:comment.authorUrl'>
<a expr:href='data:comment.authorUrl' rel='nofollow'><data:comment.author/></a>
<b:else/>
<data:comment.author/>
</b:if>
<data:commentPostedByMsg/>
</dt>
<dd class='comment-body'>
<b:if cond='data:comment.isDeleted'>
<span class='deleted-comment'><data:comment.body/></span>
<b:else/>
<p><data:comment.body/></p>
</b:if>
</dd>
<dd class='comment-footer'>
<span class='comment-timestamp'>
<a expr:href='data:comment.url' title='comment permalink'>
<data:comment.timestamp/>
</a>
<b:include data='comment' name='commentDeleteIcon'/>
</span>
</dd>
</b:loop>

</dl>

Ok,kat atas/sebelum kod kaler ungu tu,korang letakkan kod ni
<a href='javascript:toggle();' id='displayText'>Show/Hide Comments</a>

<div id='toggleText' style='display: none;'>

Dan kat bawah/selepas kod kaler merah,korang letakkan kod ni
</div>

Save template dah siap.


Nota Tapak Kaki:
Sesetengah kod pada komen mungkin berbeza sebab mungkin korang ada buat modifikasi ke,jadi yang penting,korang lihat pada kod yang kaler ungu dan merah tu

2 ulasan

Nota: Hanya ahli blog ini sahaja yang boleh mencatat ulasan.

At the post page,this banner can be spin around ;)