Như tiêu đề , mình muốn làm 1 cái nút "Khóa" cho topic bị khóa thay cho 2 nút "Trả lời bài viết" và "Tạo chủ đề mới"
[Hỏi đáp] Button "Khóa" trong topic
31.05.16 18:411
08.06.16 14:052
Đợi mãi chẳng có ai reply
08.06.16 18:133
Dùng css nhé. Vào viewtopic_body tìm
Thay lại thành
Thêm css
Ở trong view có 2 dòng giống vậy cho nên thay cả 2 cái nhé. Lưu ý đây là lấy từ view gốc, do đó nếu bạn chỉnh sửa view có thể nó sẽ không hoạt động.
- Code:
<!-- BEGIN switch_user_authpost -->
<a href="{U_POST_NEW_TOPIC}" rel="nofollow"><img src="{POST_IMG}" class="{POST_IMG_CLASS}" alt="{L_POST_NEW_TOPIC}" /></a>
<!-- END switch_user_authpost -->
<!-- BEGIN switch_user_authreply -->
<a href="{U_POST_REPLY_TOPIC}"><img src="{REPLY_IMG}" class="i_reply" alt="{L_POST_REPLY_TOPIC}" /></a>
<!-- END switch_user_authreply -->
Thay lại thành
- Code:
<!-- BEGIN switch_user_authreply -->
<a check="{L_POST_REPLY_TOPIC}" href="{U_POST_REPLY_TOPIC}"><img src="{REPLY_IMG}" class="i_reply" alt="{L_POST_REPLY_TOPIC}" /></a>
<!-- END switch_user_authreply -->
<!-- BEGIN switch_user_authpost -->
<a href="{U_POST_NEW_TOPIC}" rel="nofollow"><img src="{POST_IMG}" class="{POST_IMG_CLASS}" alt="{L_POST_NEW_TOPIC}" /></a>
<!-- END switch_user_authpost -->
Thêm css
- Code:
.buttons a[check*="khóa"] + a[href$="newtopic"] {display: none}
Ở trong view có 2 dòng giống vậy cho nên thay cả 2 cái nhé. Lưu ý đây là lấy từ view gốc, do đó nếu bạn chỉnh sửa view có thể nó sẽ không hoạt động.
08.06.16 18:204
markai30 wrote:Dùng css nhé. Vào viewtopic_body tìm
- Code:
<!-- BEGIN switch_user_authpost -->
<a href="{U_POST_NEW_TOPIC}" rel="nofollow"><img src="{POST_IMG}" class="{POST_IMG_CLASS}" alt="{L_POST_NEW_TOPIC}" /></a>
<!-- END switch_user_authpost -->
<!-- BEGIN switch_user_authreply -->
<a href="{U_POST_REPLY_TOPIC}"><img src="{REPLY_IMG}" class="i_reply" alt="{L_POST_REPLY_TOPIC}" /></a>
<!-- END switch_user_authreply -->
Thay lại thành
- Code:
<!-- BEGIN switch_user_authreply -->
<a check="{L_POST_REPLY_TOPIC}" href="{U_POST_REPLY_TOPIC}"><img src="{REPLY_IMG}" class="i_reply" alt="{L_POST_REPLY_TOPIC}" /></a>
<!-- END switch_user_authreply -->
<!-- BEGIN switch_user_authpost -->
<a href="{U_POST_NEW_TOPIC}" rel="nofollow"><img src="{POST_IMG}" class="{POST_IMG_CLASS}" alt="{L_POST_NEW_TOPIC}" /></a>
<!-- END switch_user_authpost -->
Thêm css
- Code:
.buttons a[check*="khóa"] + a[href$="newtopic"] {display: none}
Ở trong view có 2 dòng giống vậy cho nên thay cả 2 cái nhé. Lưu ý đây là lấy từ view gốc, do đó nếu bạn chỉnh sửa view có thể nó sẽ không hoạt động.
Ngại gì ko click !