+ Viết Mới + Trả lời

ßÿ•Š†σçk²¹°

[Code] Tạo chuyên mục con dạng trình đơn trổ xuống


 
Chia Sẽ:
ßÿ•Š†σçk²¹°19/08/2012


Demo: Xem chuyên mục của forum
Hướng dẫn:
Bước 1: ACP >> Display >> Homepage >> Structure and hierarchy:
Sub-level links on index : Có

Bước 2: ACP >> Display >> Templates >> Ganeral >> Index_box:
Tìm:
Code:
{catrow.forumrow.L_LINKS}{catrow.forumrow.LINKS}

và thay bằng
Code:
<select style="display:none" onchange="location = this.options[this.selectedIndex].value;">
  <option value="{catrow.forumrow.U_VIEWFORUM}">Các Diễn Đàn Con</option>
</select>
<span style="display:none" class="subforumFMvi">{catrow.forumrow.L_LINKS}{catrow.forumrow.LINKS}</span>

Bước 3: Thêm vào cuối Index_box
Code:
<script type="text/javascript">
$(".subforumFMvi a").each(function () {
  $(this).replaceWith('<option value="' + $(this).attr("href") + '">|-- ' + $(this).text() + '</option>');
});
$(".subforumFMvi option").each(function () {
  $(this).appendTo($(this).parent().prev())
});
$(".subforumFMvi").each(function () {
  if ($(this).text() == "") {
      $(this).prev().remove();
      $(this).remove();
  } else {
      $(this).prev().show()
  }
});
</script>

Tài sản - ßÿ•Š†σçk²¹°








Về đầu trang

 
Copyright © 2014 All Rights Reserved. - Skin by : Quý ròm
Free forum | ©phpBB | Free forum support | Báo cáo lạm dụng | Thảo luận mới nhất
Tài khoản:

Mật khẩu:

Ghi nhớ?