Tạo nhóm các chuyên mục con trong một dropdown-menu theo phong cách Xenforo.
ACP >> Display >> Homepage >> Structure and hierarchy >> Hierarchy:
Sub-level links on index :
YesACP >> Display >> Templates >> QLTT >> Index_box:
Tìm:
- Code:
{catrow.forumrow.L_LINKS}{catrow.forumrow.LINKS}
<strong>{forumrow.L_SUBFORUM_STR}</strong> {forumrow.SUBFORUMS}
Thay bằng:
- Code:
<span class="sub4r stat4r">{catrow.forumrow.LINKS}</span>
Đặt ở cuối
index_box - Code:
<script type="text/javascript">
//<![CDATA[
/* subForum by Zzbaivong - devs.forumvi.com */
$(".sub4r.stat4r").each(function() {
var sub = $(this);
if (!sub.is(":empty")) {
sub.contents().filter(function() {
return this.nodeType === 3;
}).remove().end().filter("a").wrap("<li></li>");
sub.wrapInner('<ul class="subLink"></ul>').append("Diễn đàn con: <strong>" + sub.find("a").length + "</strong>");
}
});
//]]>
</script>
ACP >> Display >> Pictures and Colors >> CSS Stylesheet:
Thêm vào
CSS:
- Code:
/* subForum by Zzbaivong - devs.forumvi.com */
.pun table .tcl{overflow:auto}
.stat4r{color:#888;font-size:12px;padding-right:10px}
.stat4r > strong{color:#333}
.sub4r.stat4r{position:relative}
.subLink{padding:0!important;position:absolute;display:none;left:0;list-style:none;background:#FFF;top:13px;z-index:30;min-width:97px;border:2px solid #666}
.sub4r.stat4r:hover .subLink{display:block}
.stat4r .subLink + strong{padding-right:15px;background:url(//i56.servimg.com/u/f56/18/59/49/93/arrow_10.png) no-repeat right center transparent}
.subLink li a{white-space:nowrap;height:20px;line-height:20px;display:block;padding:0 7px}
.subLink li a:hover{background:#f2f2f2}
Zzbaivong
Tags: #mod #template #xenforo #sub-forum