[Javascript] Bài viết đôi cho topic cho phpbb2 và phpbb3

Xem chủ đề cũ hơn Xem chủ đề mới hơn Go down

Yêu thích [Javascript] Bài viết đôi cho topic cho phpbb2 và phpbb3

Bài gửi by HelpsFMvi Tue Mar 15, 2016 7:27 pm


[postbg=https://i.imgur.com/EHp45H1.png]

Demo:

[You must be registered and logged in to see this link.]

Hướng dẫn:

Tạo một trang javascript mới (ACP >> Modules >> Javascript codes management >> Creat a new javascript:

+ Title: duoble posts
+ Placement: In the topics
PHPBB2:

Code:
$(function() {
  var c = "", a, d = 0, b = 0;
  $("tr.post").each(function() {
    var e = $("> td:first span.name", this).text();
    e != c ? (d++, b++, a = $(this), b % 2 != d % 2 && $("> td", a).add($("> td", a.next())).toggleClass("row1 row2"), c = e) : (b++, $(a).find("div.signature_div").remove(), $("> td:last", a).append($("> td:last > table ", this).addClass("doublepost").attr("id", $(this).attr("id").replace(/^p([0-9]+)$/, "$1"))), $(this).next().remove(), $(this).remove())
  });
  var f = location.hash;
  location.hash = "";
  location.hash = f
});

PHPBB3:

Code:
$(function() {
  var c = "", a, d = 0, b = 0;
  $("div.post").each(function() {
    var e = $(".postprofile dt", this).text();
    e != c ? (d++, b++, a = $(this), b % 2 != d % 2 && a.toggleClass("row1 row2"), c = e) : (b++, $(a).find("div.signature_div").remove(), $("div.postbody", a).append($("div.postbody", this).attr("class", "doublepost").attr("id", $(this).attr("id").replace(/^p([0-9]+)$/, "$1"))), $(this).remove())
  });
  var f = location.hash;
  location.hash = "";
  location.hash = f
});

Các phiên bản khác sẽ update sau ! THÂN
[You must be registered and logged in to see this link.]

HelpsFMvi
HelpsFMvi
Ban Quản Trị FMvi
Ban Quản Trị FMvi


Số bài : 104
HelpsPoints : 15468
Likes : 33
Ngày tham gia : 10/03/2016
Trạng thái :
Online
Offline

Tuổi : 26
Location : Ninh Thuận
Google Chrome
Phpbb3

[Click để xem tài sản HelpsFMvi]

https://helps.forumvi.com

Về Đầu Trang Go down

Xem chủ đề cũ hơn Xem chủ đề mới hơn Về Đầu Trang

- Similar topics

 
Permissions in this forum:
Bạn không có quyền trả lời bài viết
Free forum | ©phpBB | Free forum support | Báo cáo lạm dụng | Thảo luận mới nhất
Stylish responsive footer | Script Tutorials