[Hỏi đáp] Chuyển trang nhưng vẫn hiện bài viết đầu tiên

  Bài viết hay nhất1
Hỏi: Mình muốn bài viết ở trang 1 sẽ hiễn thị ở tất cả các trang tiếp theo..! và có chức năng thu gọn giống như hình.. thank các bác nhìu
https://i.imgur.com/ejFBGTI.jpg

Đáp: #2811#2815
  Bài viết hay nhất2
ACP >> QLTT >> Messages and e-mails >> Cấu hình diễn đàn >> Always show the first post in the topics :
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
  Bài viết hay nhất3
anhoang_qn wrote:ACP >> QLTT >> Messages and e-mails >> Cấu hình diễn đàn >> Always show the first post in the topics :
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
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à -_-
  Bài viết hay nhất4
Bước 1: Temp viewtopic_body, tìm thẻ div có class là post
Code:
<div class="post post--{postrow.displayed.U_POST_ID}"{postrow.displayed.THANK_BGCOLOR} style="{postrow.displayed.DISPLAYABLE_STATE}">
sửa thành:
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
  Bài viết hay nhất5
thank các bạn vì ko thấy nut thank
  Bài viết hay nhất6
@tommy_phan : Cái +1 là thích đó
  Bài viết hay nhất7
You cannot reply to topics in this forum