Hướng dẫn tạo cảnh báo ngay tại bài viết cho VBB 4.x.x

  • Thread starter Thread starter AdminAdmin is verified member.
  • Start date Start date
Admin

AdminAdmin is verified member.

Well-Known Member
Staff member
Administrator
Bản gốc là mod comment nhanh đó mà mình chỉ edit lại chút thôi
Demo
071b07e7e199820a3c794a6931e8e6d5_36031090.1.png

fed218a4cc23b77ddec8a6adaab97c06_36031092.2.png

b4f9157fa4e6ac56a4339ddf02d09d82_36031093.3.png

=====================
Ai có cài mod Comment For Each Post thì khỏi cài nữa nhé. edit thôi
ko thì thích thì cứ cài lại!
Cài Đặt:
1. download đính kèm về giải nén upload file lên đúng thư mục trên hosting nhé, file .php up ngang hàng admincp
2. import file xml
3. setting
Comment For Each Post:
Chú ý:
- gõ những group không được quyền sử dụng vào
Usergroups NOT able to post comment (comma separated ID list)
- Enable auto insert template ?: tốt nhất là no. tự chèn cho hợp lý
4. Vào templeate postblist hay posblist_galacy tùy theo style bạn sử dụng!
Tìm:
note.png
{vb:raw post.message}​

Chèn:
note.png
<!-- Cảnh báo -->
{vb:raw post_comment}
<!-- / Cảnh báo -->​

Edit tem
1. vào changuondyu_comment
Thay toàn bộ code trong đó bằng code sau
PHP:
<br/><br/>
    <div style="margin-left: 0px; padding: 4px;" align="left">
        <div id="comment_{vb:raw post.postid}">{vb:raw comment_page}</div>
        <div>
            <vb:if condition="$can_comment">
                <img src="/images/warning.png" border="0" title="Viết  cảnh báo cho bài viết này"  onclick="document.getElementById('form_comment_{vb  :raw  post.postid}').style.display='inline';">
<div  style="border-bottom: 1px dashed #0099FF;"></div>
            </vb:if>
            &nbsp;<span id="comment_progress_{vb:raw post.postid}"></span>
        </div><br/>
        <vb:if condition="$can_comment">
            {vb:raw comment_form}
        </vb:if>
    </div>

2. changuondyu_comment_bit cũng thay toàn bộ code trong đó bằng code sau
PHP:
<div id="commentbit_{vb:raw comment.commentid}">
    
<div style="margin: 5px 5px;"> 
<div style="padding-left: 0px; padding-right: 0px;"> 
<div style=" -moz-border-radius-bottomleft:5px;  -moz-border-radius-bottomright:5px; -moz-border-radius-topleft:5px;  -moz-border-radius-topright:5px; background:#fff2f4 none repeat scroll 0  0; border:1px solid #be0000; margin:5px 10px 0; text-align:justify;  "> 
<div style="padding: 0pt 5px; background: #be0000 none repeat scroll  0% 0%; -moz-background-clip: border; -moz-background-origin: padding;  -moz-background-inline-policy: continuous;  -moz-border-radius-topleft:6px; -moz-border-radius-topright:6px; "> 
<font color="#fff2f4"> <b><em>CẢNH BÁO</em></b> </font> 
</div> 
<table width="100%" border="0"> 
<tbody> 
 <tr> 
  <td width="5%"><img alt="" src="../images/warningpb.png" border="0"/> </td> 
  
  
  <td width="90%"><a href="member.php?u={vb:raw  comment.userid}"><b>{vb:raw  comment.musername}</b></a> - <span  class="smallfont">{vb:raw  comment.datetime}</span><br/>{vb:raw  comment.message}</td> 
  <td width="5%">
  <vb:if condition="$comment['can_manage']">
                    <span style="float: right; cursor: pointer;">
                        <a onclick="delcomment({vb:raw  comment.commentid},{vb:raw comment.postid});"><img  src="images/del.png" title="Xóa cảnh báo này" border="0"></a>
                    </span>
                </vb:if>
  </td> 
 </tr> 
</tbody> 
</table>
</div> 
</div> 
</div>
</div>

3. changuondyu_comment_form thay tất cả bằng code sau
PHP:
<div id="form_comment_{vb:raw post.postid}" style="display: none;">
    <textarea style="width: 600px;" class="bginput" rows="5" id="pmessage_{vb:raw post.postid}"></textarea>
    <div><br/>
        <input type="button" class="button" value="{vb:rawphrase  chang_post_comment}" onclick="post_comment({vb:raw post.postid},{vb:raw  post.threadid});" />
        &nbsp;<input type="button" class="button"  value="{vb:rawphrase chang_close}"  onclick="document.getElementById('form_comment_{vb  :raw  post.postid}').style.display='none';" />
    </div>
</div>

Thanks cái nếu dùng nhé!
Download
warring.zip
 

Facebook Comments

Similar threads

Admin
Replies
0
Views
1K
AdminAdmin is verified member.
Admin
Admin
Replies
0
Views
1K
AdminAdmin is verified member.
Admin
Admin
Replies
2
Views
3K
thahtrung06
T
Admin
Replies
0
Views
10K
AdminAdmin is verified member.
Admin
Admin
Replies
0
Views
10K
AdminAdmin is verified member.
Admin
Back
Top