Oº°‘¨ [C]hia [S]ẻ [O]nline ¨‘°ºO
♥️Chào Mừng Các Bạn Ghé Thăm Forum Chia Sẻ Online♥️
Rất mong các bạn đăng ký làm thành viên để cùng
nhau chia sẻ mọi nỗi buồn vui
Chúc các bạn có những phút thư giãn vui vẻ
♥️Welcome to forum Chia Sẻ Online♥️
Oº°‘¨ [C]hia [S]ẻ [O]nline ¨‘°ºO
♥️Chào Mừng Các Bạn Ghé Thăm Forum Chia Sẻ Online♥️
Rất mong các bạn đăng ký làm thành viên để cùng
nhau chia sẻ mọi nỗi buồn vui
Chúc các bạn có những phút thư giãn vui vẻ
♥️Welcome to forum Chia Sẻ Online♥️
Welcome Guest, is this your first visit? Register
All times are GMT. The time now is 07:28 AM.

You are not connected. Please login or register

[Codes] Thu gọn bài viết cho mọi phiên bản

3 posters

Go down  Thông điệp [Trang 1 trong tổng số 1 trang]

Admin

Admin
Administrators
Administrators

[Codes] Thu gọn bài viết cho mọi phiên bản Flag_r10Chức năng:
  • Rút gọn những bài viết dài hơn 350px.
  • Hiệu ứng trượt khi thu gọn bài viết.
  • Có thể Bật/Tắt dễ dàng.


Hướng dẫn cho phpBB3

Bước 1: Thêm vào CSS
ACP - Display - Pictures and Colors - Colors - CSS Stylesheet:

Code:
/* Thu gọn bài viết - www.FMvi.org */
.baivietdai{overflow:hidden}
.thugon span:hover{text-shadow:1px 1px 1px #000;cursor:pointer}
.thugon{background-color:#F6FF9D;border:3px double #0668AD;clear:both;margin:0;padding:2px 10px}
.viewfull{background:url(//ssl.gstatic.com/ui/v1/zippy/arrow_down.png) no-repeat scroll 3px 7px transparent;padding:0 15px}
.viewhide{display:none;background:url(//ssl.gstatic.com/ui/v1/icons/mail/arrow_up.png) no-repeat scroll 3px 7px transparent;padding:0 15px}
.fullOff{background:url(http://i48.servimg.com/u/f48/16/58/89/73/power_11.png) no-repeat scroll 0 2px transparent;margin-top:-2px;padding:2px 5px 2px 20px}
.fullOn{display:none;background:url(http://i48.servimg.com/u/f48/16/58/89/73/power_10.png) no-repeat scroll 0 2px transparent;margin-top:-2px;padding:2px 5px 2px 20px}

Bước 2: Thêm vào javascript
ACP - Modules - HTML & JAVASCRIPT - Javascript codes management
Add a Javascript Code
  • Title * : Thu gọn bài viết dài
  • Placement : In the topics
  • Javascript Code * :
    Code:
    var CopyrightNoticeEn = 'Copyright ©  by FmVi. All Rights Reserved. Use, modification, and/or distribution of this script is not allowed without direct permission from baivong (gialangsangai2000@yahoo.com). This entire copyright notice must remain in the original, copied, or modified script';
    var CopyrightNoticeVi = 'Bản quyền © FmVi. Giữ toàn quyền. Việc sử dụng, sửa đổi , và / hoặc phân phối mã này mà không được phép trực tiếp từ baivong (gialangsangai2000@yahoo.com) là không được phép. Toàn bộ thông báo bản quyền này phải được giữ nguyên khi sao chép, hoặc sửa đổi';
    $(function () {
       $(".postbody .content").each(function () {
          if ($(this).height() >= 350) {
             $(this).after('<p class="thugon"><span class="viewfull">Xem toàn bộ</span><span class="viewhide">Thu gọn</span><span class="fullOff" style="float:right">Tắt chức năng thu gọn</span><span class="fullOn" style="float:right">Bật chức năng thu gọn</span></p>');
             $(this).addClass("baivietdai");
             $(".baivietdai").height(315);
          }
       });
       if (my_getcookie("thugonbaiviet") == "yes") {
          $(".fullOn, .viewhide").show();
          $(".fullOff, .viewfull").hide();
          $(".baivietdai").height("100%");
       }
       $(".viewfull").click(function () {
          $(this).parent().prev().height("100%");
          $(this).hide().next().show();
       });
       $(".viewhide").click(function () {
          $(this).parent().prev().animate({
             height: "315px"
          }, 1000);
          $(this).hide().prev().show();
       });
       $(".fullOff").click(function () {
          my_setcookie("thugonbaiviet", "yes", true);
          $(".baivietdai").height("100%");
          $(".fullOn, .viewhide").show();
          $(".fullOff, .viewfull").hide();
       });
       $(".fullOn").click(function () {
          my_setcookie("thugonbaiviet", "no", true);
          $(".baivietdai").animate({
             height: "315px"
          }, 1000);
          $(".fullOn, .viewhide").hide();
          $(".fullOff, .viewfull").show();
       });
    });





Hướng dẫn cho punBB, Invision

Tương tự phpBB3, ở bước 2, tìm:
Code:
$(".postbody .content")
Thay bằng:
Code:
$(".postbody .post-entry")




Hướng dẫn cho phpBB2

Tương tự phpBB3, ở bước 2, tìm:
Code:
$(".postbody .content")
Thay bằng:
Code:
$(".postbody").find("div:first")

Viết bởi baivong - www.fmvi.org

https://chiaseonline.forumvi.com/

trantin27

trantin27
Thành Viên
Thành Viên

Bị lỗi rồi Trà My ơi !
Xem nè: http://tpcaolanh.us.to/t41-topic#46
click vào xem toàn bộ nó ra 2 cái lun

http://tpcaolanh.us.to/

Admin

Admin
Administrators
Administrators

[Codes] Thu gọn bài viết cho mọi phiên bản Flag_r10
trantin27 đã viết:Bị lỗi rồi Trà My ơi !
Xem nè: http://tpcaolanh.us.to/t41-topic#46
click vào xem toàn bộ nó ra 2 cái lun
anh làm bước này chưa nhỉ ?


Hướng dẫn cho phpBB2

Tương tự phpBB3, ở bước 2, tìm:
Code:
$(".postbody .content")
Thay bằng:
Code:
$(".postbody").find("div:first")

https://chiaseonline.forumvi.com/

trantin27

trantin27
Thành Viên
Thành Viên

Anh làm rùi em ơi
code js nè
Code:

var CopyrightNoticeEn = 'Copyright ©  by FmVi. All Rights Reserved. Use, modification, and/or distribution of this script is not allowed without direct permission from baivong (gialangsangai2000@yahoo.com). This entire copyright notice must remain in the original, copied, or modified script';
    var CopyrightNoticeVi = 'Bản quyền © FmVi. Giữ toàn quyền. Việc sử dụng, sửa đổi , và / hoặc phân phối mã này mà không được phép trực tiếp từ baivong (gialangsangai2000@yahoo.com) là không được phép. Toàn bộ thông báo bản quyền này phải được giữ nguyên khi sao chép, hoặc sửa đổi';
    $(function () {
          $(".postbody").find("div:first").each(function () {
          if ($(this).height() >= 350) {
            $(this).after('<p class="thugon"><span class="viewfull">Xem toàn bộ</span><span class="viewhide">Thu gọn</span><span class="fullOff" style="float:right">Tắt chức năng thu gọn</span><span class="fullOn" style="float:right">Bật chức năng thu gọn</span></p>');
            $(this).addClass("baivietdai");
            $(".baivietdai").height(315);
          }
      });
      if (my_getcookie("thugonbaiviet") == "yes") {
          $(".fullOn, .viewhide").show();
          $(".fullOff, .viewfull").hide();
          $(".baivietdai").height("100%");
      }
      $(".viewfull").click(function () {
          $(this).parent().prev().height("100%");
          $(this).hide().next().show();
      });
      $(".viewhide").click(function () {
          $(this).parent().prev().animate({
            height: "315px"
          }, 1000);
          $(this).hide().prev().show();
      });
      $(".fullOff").click(function () {
          my_setcookie("thugonbaiviet", "yes", true);
          $(".baivietdai").height("100%");
          $(".fullOn, .viewhide").show();
          $(".fullOff, .viewfull").hide();
      });
      $(".fullOn").click(function () {
          my_setcookie("thugonbaiviet", "no", true);
          $(".baivietdai").animate({
            height: "315px"
          }, 1000);
          $(".fullOn, .viewhide").hide();
          $(".fullOff, .viewfull").show();
      });
    });

http://tpcaolanh.us.to/

trantin27

trantin27
Thành Viên
Thành Viên

Hi. anh hiểu rùi
Là do cái ảnh dài wá nên nó mở thêm 1 cái thu gọn nữa đó

http://tpcaolanh.us.to/

Iwillnotlove

Iwillnotlove
Moderator
Moderator

thank

Sponsored content



Về Đầu Trang  Thông điệp [Trang 1 trong tổng số 1 trang]

Permissions in this forum:
Bạn không có quyền trả lời bài viết