Notice in each box : hiện 1 bảng nội quy khác nhau ở các box forum xenForo

nttruong

MasterCorporal
Tham gia
25/02/2015
Bài viết
368
Được Like
614
Đại khái là như hình dưới:

540d97a7853d0.jpg


Nguồn: https://xenforo.com/community/resources/notice-in-each-box.835/


This small edit template. It is userful. You dont need create each thread rules in each box.
begin: Create a new template with your name
In this example i used: thong_bao
paste this code in template:

Mã:
<xen:if is="{$forum.node_id} ==35">
<div id="notice-3" class="section sectionMain noticeHolder info">
<div class="noticeUserBlock">
<div class="avatarHolder">
<a href="members/admin.1/" class="avatar Av1s Tooltip" data-avatarhtml="true"><img src="data/avatars/s/0/1.jpg?1329137617" width="48" height="48" alt="admin"></a>
</div>
</div>
<div class="noticeContent">
<h3 class="noticeTitle">Quy định khi đăng bài viết trong Box Phim</h3>
<div><p style="color: green">1. Bài đăng phải được phân loại theo từng mục</p>
<p style="color: darkred">2. Không đăng những bộ phim, video đồi trụy</p>
<p style="color: green">3. Bài viết sao chép dù 01 phần cũng phải ghi nguồn gốc rõ ràng.</p>
<p style="color: darkred">4. Khi chia sẻ nên có hình ảnh và demo giới thiệu.</p>
<p style="color: green">5. Đính kèm lên diễn đàn, hoặc Mediafire.com ... và những trang download free nhanh khác.
</p><p style="color: red; font-style: italic">=&gt; (Nghiêm cấm hình thức đăng bài viết spam, quảng cáo).</p></div>
<div class="afterContent"></div>
</div>
</div>
</xen:if>

attention:

Mã:
<xen:if is="{$forum.node_id} ==35">
"35" is your id forum
add code extra.css


Mã:
/* --- xfr_bn_notice_holder.css --- */
.noticeHolder
{
min-height: 50px;
}
.noticeHolder.info
{
background-color: rgb(255, 255, 255);
}
.noticeHolder.warning
{
background-color: #f8f8f8;
border: 1px solid #e7e7e7;
}
.noticeHolder.important
{
background-color: #ffeae5;
border: 1px solid #f9c5b0;
}
.noticeHolder.info, .noticeHolder.warning, .noticeHolder.important
{
padding: 10px !important;
margin-bottom: 10px !important;
}
.noticeHolder .noticeUserBlock
{
background: rgb(237, 237, 237) url('styles/baisik/xenforo/gradients/tab-selected-light.png') repeat-x bottom;
border: 1px solid rgb(237, 237, 237);
border-radius: 5px; -webkit-border-radius: 5px; -moz-border-radius: 5px; -khtml-border-radius: 5px;
float: left;
width: 48px;
position: relative;
}
.noticeHolder .noticeUserBlock .avatar img {
height: 32px;
width: 32px;
}
.noticeHolder .noticeUserBlock div.avatarHolder
{
background-color: rgb(250, 250, 250);
padding: 5px;
border-radius: 4px; -webkit-border-radius: 4px; -moz-border-radius: 4px; -khtml-border-radius: 4px;
height: 38px;
}
.noticeHolder .noticeUserBlock div.avatarHolder a
{
display: block;
}
.noticeHolder .noticeContent
{
margin-left: 60px;
}
.noticeHolder .noticeContent h3.noticeTitle
{
font-weight: bold;
font-size: 12pt;
margin-bottom: 5px;
border-bottom: 1px solid rgb(237, 237, 237);
}
.noticeHolder .noticeContent .NoticeControls
{
float: right;
font-size: 11px;
}
.noticeHolder .noticeContent .NoticeControls .item
{
margin-left: 10px;
}
.noticeHolder .noticeContent .afterContent
{
clear: both;
}
/* --- xfr_bn_notice_holder_extra.css --- */
.noticeHolder.warning .noticeUserBlock
{
border-color: #e7e7e7;
}
.noticeHolder.warning .noticeUserBlock div.avatarHolder
{
background-color: #f8f8f8;
}
.noticeHolder.warning .noticeUserBlock .avatar img {
border-color: #e7e7e7;
}
.noticeHolder.important .noticeUserBlock
{
border-color: #f9c5b0;
}
.noticeHolder.important .noticeUserBlock div.avatarHolder
{
background-color: #ffeae5;
}
.noticeHolder.important .noticeUserBlock .avatar img {
border-color: #f9c5b0;
}
.noticeHolder.warning .noticeContent h3.noticeTitle
{
border-color: #e7e7e7;
}
.noticeHolder.important .noticeContent h3.noticeTitle
{
border-color: #f9c5b0;
}.noticeHolder.warning .noticeUserBlock
{
border-color: #e7e7e7;
}
.noticeHolder.warning .noticeUserBlock div.avatarHolder
{
background-color: #f8f8f8;
}
.noticeHolder.warning .noticeUserBlock .avatar img {
border-color: #e7e7e7;
}
.noticeHolder.important .noticeUserBlock
{
border-color: #f9c5b0;
}
.noticeHolder.important .noticeUserBlock div.avatarHolder
{
background-color: #ffeae5;
}
.noticeHolder.important .noticeUserBlock .avatar img {
border-color: #f9c5b0;
}
.noticeHolder.warning .noticeContent h3.noticeTitle
{
border-color: #e7e7e7;
}
.noticeHolder.important .noticeContent h3.noticeTitle
{
border-color: #f9c5b0;
}
/* CSS returned from cache. */
search template: thread_list
find code


Mã:
<xen:require css="discussion_list.css" />
<xen:require js="js/xenforo/discussion_list.js" />
add below


Mã:
<xen:include template="thong_bao" />
 
  • Like
Reactions: THB

THB

Founder
Thành viên BQT
Tham gia
25/02/2015
Bài viết
6,643
Được Like
3,928
đọc thì dễ. làm mới khó.


ytuonglamgiau.vn-tao_noi_quy_khac.JPG

 

Hướng dẫn sử dụng

XenForo 1 XenForo 2
Translate by PVS

Dịch vụ XenForo của VNXF

Mobile/Zalo: 0906081284

Telegram: anhanhxf

Chỉ nhận web nội dung lành mạnh

Nhà Tài Trợ

Mút Xốp Không Gian
Mút Sofa Không Gian
Top Bottom