Add new entries to the Help page - Thêm mục mới vào trang Trợ giúp

PVS

Super Moderator
Thành viên BQT
Tham gia
28/02/2015
Bài viết
16,830
Được Like
12,698
Add new entries to the Help page - Thêm mục mới vào trang Trợ giúp

Trong trường hợp này tôi thêm một liên kết đến một trang gọi là "staff" và đặt nó sau "Trophies".
Ngoài ra, tôi cũng đang làm cho các liên kết chỉ hiển thị cho các thành viên đăng nhập và các quyền liên quan đã được đặt ra cho các nhóm người sử dụng vì vậy ngay cả bằng cách duyệt trực tiếp vào URL, khách vẫn sẽ không thể truy cập vào trang.
Cũng lưu ý rằng bạn sẽ cần phải tạo ra hai phrase: cta_staffcta_staff_description

Vào template help_index tìm:
Mã:
<dl>
<dt><a href="{xen:link help/trophies}">{xen:phrase trophies}</a></dt>
<dd>{xen:phrase you_can_earn_trophies_by_carrying_out_different_actions}</dd>
</dl>

<xen:if is="{$tosUrl}">

Thay bằng:
Mã:
<dl>
<dt><a href="{xen:link help/trophies}">{xen:phrase trophies}</a></dt>
<dd>{xen:phrase you_can_earn_trophies_by_carrying_out_different_actions}</dd>
</dl>

<xen:if is="{$visitor.user_id}">
<dl>
<dt><a href="{xen:link pages/staff}">{xen:phrase cta_staff}</a></dt>
<dd>{xen:phrase cta_staff_description}</dd>
</dl>
</xen:if>

<xen:if is="{$tosUrl}">

Trong template help_wrapper tìm:
Mã:
<ul>
<li><a href="{xen:link help/smilies}" class="{xen:if "{$selected} == 'smilies'", 'secondaryContent', 'primaryContent'}">{xen:phrase smilies}</a></li>
<li><a href="{xen:link help/bb-codes}" class="{xen:if "{$selected} == 'bbCodes'", 'secondaryContent', 'primaryContent'}">{xen:phrase bb_codes}</a></li>
<li><a href="{xen:link help/trophies}" class="{xen:if "{$selected} == 'trophies'", 'secondaryContent', 'primaryContent'}">{xen:phrase trophies}</a></li>
</ul>

Thay bằng:
Mã:
<ul>
<li><a href="{xen:link help/smilies}" class="{xen:if "{$selected} == 'smilies'", 'secondaryContent', 'primaryContent'}">{xen:phrase smilies}</a></li>
<li><a href="{xen:link help/bb-codes}" class="{xen:if "{$selected} == 'bbCodes'", 'secondaryContent', 'primaryContent'}">{xen:phrase bb_codes}</a></li>
<li><a href="{xen:link help/trophies}" class="{xen:if "{$selected} == 'trophies'", 'secondaryContent', 'primaryContent'}">{xen:phrase trophies}</a></li>
<xen:if is="{$visitor.user_id}">
<li><a href="{xen:link pages/staff}" class="primaryContent">{xen:phrase cta_staff}</a></li>
</xen:if>
</ul>

Để thêm các liên kết vào trình đơn thả xuống và thanh điều hướng, chỉnh sửa template navigation như sau.

Tìm:
Mã:
<ul class="secondaryContent blockLinksList">
<xen:hook name="navigation_tabs_help">
<li><a href="{xen:link help/smilies}">{xen:phrase smilies}</a></li>
<li><a href="{xen:link help/bb-codes}">{xen:phrase bb_codes}</a></li>
<li><a href="{xen:link help/trophies}">{xen:phrase trophies}</a></li>
</xen:hook>
</ul>

Thay bằng:
Mã:
<ul class="secondaryContent blockLinksList">
<xen:hook name="navigation_tabs_help">
<li><a href="{xen:link help/smilies}">{xen:phrase smilies}</a></li>
<li><a href="{xen:link help/bb-codes}">{xen:phrase bb_codes}</a></li>
<li><a href="{xen:link help/trophies}">{xen:phrase trophies}</a></li>
<xen:if is="{$visitor.user_id}">
<li><a href="{xen:link pages/staff}">{xen:phrase cta_staff}</a></li>
</xen:if>
</xen:hook>
</ul>

Khi đăng nhập, trang Trợ giúp bây giờ trông như thế này:

logged_in.jpg

Và như thế này khi đăng xuất:

logged_out.jpg

Chúc các bạn thành công.


Nguồn: xenforo.com​
 

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

XenForo 1 XenForo 2
Translate by PVS

Dịch vụ XenForo của VNXF

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