Tuesday, May 22, 2012

[Tutorial] Cute Comment Box

Assalammualaikum :) Some people ask me, cemana nak buat comment box selepas entry tu kat dalam blogskin template. Because in my Main Blog, saya gunakan blogskin template *created and own by me* yang mana comment box appeared selepas entry. Haihh. Membebel panjang pun tak guna kalau tak paham. So, camnie contohnya :

1. Pegi Settings > Comment > Tick embedded below the post. Takde lagi pop up window.

2. Next, pegi edit template korang and search code nie :

3. Copy & paste code bawah ini sebelum </style>
/* Comments
----------------------------------------------- */
#comments h4 {margin:1.8em 0; font-size:10px; text-transform:uppercase; color: #aaaaaa; line-height:10px; border-bottom: 1px dashed #dedede; background: ; font-weight:normal;}
#comments h4 strong {font-size:8pt tahoma;}
#comments-block {background: ; font:normal 8pt arial; line-height:1.2em; padding:4px;}
#comments-block dt { margin:.5em 0;}
#comments-block dd { margin:.25em 0 0;}
#comments-block dd.comment-timestamp {margin:-.25em 0 2em; font:5pt tahoma; text-align:right; text-transform:normal; letter-spacing:.0em;}
#comments-block dd p {margin:0 0 .75em; padding:4px; background:#fff1f3; border:1px solid #dedede; border-radius:2px;}
.deleted-comment { font-style:italic; color:gray;}
.paging-control-container { float: right; margin: 0px 0px 0px 0px; font-size: 80%;}
.unneeded-paging-control { visibility: hidden;}

4. Then, cari code ini <$BlogItemBody$>

5. Gantikan code <$BlogItemBody$> dengan code di bawah ni :

<BlogItemCommentsEnabled><a href="<$BlogItemCommentCreate$>"
<$BlogItemCommentFormOnClick$>> <$BlogItemCommentCount$>
comment (s) </a> | <a href="<$BlogItemCommentCreate$>" <$BlogItemCommentFormOnClick$>>Jom comment (s) </a>
<div style="text-align:right;" ">
<!-- Begin #comments -->
<div id="comments">
<BlogItemCommentsEnabled><a name="comments"></a>
<dl id="comments-block">
<dt class="comment-poster" id="<$BlogCommentAnchorName$>"><a name="<$BlogCommentAnchorName$>"></a>
<dd class="comment-body">
<dd class="comment-timestamp"><a href="<$BlogCommentPermalinkURL$>" title="comment permalink"><$BlogCommentDateTime$></a>
<p class="comment-timestamp">
<p class="comment-timestamp">
<!-- End #comments -->

6. Kalau ada dua <$BlogItemBody$> gantikan dua-2 sekali.

No comments:

Post a Comment

Thanks for comment. Come again! ^_^