[Hỏi đáp] Chuyển trang nhưng vẫn hiện bài viết đầu tiên
18.04.14 11:341
18.04.14 11:362
ACP >> QLTT >> Messages and e-mails >> Cấu hình diễn đàn >> Always show the first post in the topics : Có
thu gọn : https://devs.forumvi.com/t220-code-thu-gon-bai-viet
Lưu ý - không hỏi 2 vấn đề trong 1 topic - tái phạm lần nữa sẽ vào sọt
thu gọn : https://devs.forumvi.com/t220-code-thu-gon-bai-viet
Lưu ý - không hỏi 2 vấn đề trong 1 topic - tái phạm lần nữa sẽ vào sọt
18.04.14 12:543
ko code mình muốn là qua trang khác nó thu gọn bài ở trang 1 còn bài bạn đưa là nó thu gọn trang 1 mà -_-anhoang_qn wrote:ACP >> QLTT >> Messages and e-mails >> Cấu hình diễn đàn >> Always show the first post in the topics : Có
thu gọn : https://devs.forumvi.com/t220-code-thu-gon-bai-viet
Lưu ý - không hỏi 2 vấn đề trong 1 topic - tái phạm lần nữa sẽ vào sọt
18.04.14 14:384
Bước 1: Temp viewtopic_body, tìm thẻ div có class là post
Thêm vào cuối viewtopic_body
Bước 2: Thêm vào CSS
Hoặc xem code tương tự Ẩn bài viết đầu tiên khi qua trang cho PunBB của @ligerv
- Code:
<div class="post post--{postrow.displayed.U_POST_ID}"{postrow.displayed.THANK_BGCOLOR} style="{postrow.displayed.DISPLAYABLE_STATE}">
- Code:
<div class="post post--{postrow.displayed.U_POST_ID}<!-- BEGIN first_post_br --> first-post<!-- END first_post_br -->"{postrow.displayed.THANK_BGCOLOR} style="{postrow.displayed.DISPLAYABLE_STATE}">
Thêm vào cuối viewtopic_body
- Code:
<script type="text/javascript">
//<![CDATA[
500 <= $(".post.first-post .post-entry").height() && ($(".post.first-post .post-entry").css({
height: 300,
overflow: "hidden"
}).after('<div class="viewfullpost">--- Xem chi tiết ---</div>'), $(".viewfullpost").click(function () {
var a = $(this);
a.hide().prev().height("100%");
$("body, html").animate({
scrollTop: a.closest(".post").offset().top
})
}));
//]]>
</script>
Bước 2: Thêm vào CSS
- Code:
.post.first-post .entry-content > div > div > strong:first-child,.post.first-post .entry-content > div > div > strong:first-child + br,.post.first-post .entry-content > div > div > strong:first-child + br + br{display:none}
.viewfullpost{background:#faffbe;height:22px;text-align:center;line-height:22px;font-size:12px;color:#777;cursor:pointer}
Hoặc xem code tương tự Ẩn bài viết đầu tiên khi qua trang cho PunBB của @ligerv
Zzbaivong
18.04.14 15:235
thank các bạn vì ko thấy nut thank
18.04.14 15:286
@tommy_phan : Cái +1 là thích đó