Information - Thông tin 1.2

PVS

Super Moderator
Thành viên BQT
Code hoặc hướng dẫn này được sử dụng trên phiên bản Xenforo cũ đã quá hạn sử dụng. Bạn hãy click để tìm bản mới hơn
Information - Thông tin 1.2
Mô tả:
Tạo ra một tab menu hệ thống thông tin.

pic001.jpg

Tab Information
Tính năng:
  • Tab nổi bật khi lựa chọn.
  • Tab có nút Quick Links thả xuống.
  • Các mục menu được hiển thị trong thanh sub-menu.
  • Breadcrumb cho thấy đường dẫn hiện tại.
  • Khả năng để thêm sub-menu.
  • Template hệ thống đơn giản.
Cài đặt:
  1. Download information_v1.2.zip ở đính kèm và giải nén ra.
  2. Upload folder "library" lên host ngang hàng file index.php.
  3. Vào Admin Control Panel, đến trang "Install Add-on".
  4. Upload file addon-Information_v1.2.xml.
  5. Click vào nút Install Add-on.
Làm thế nào để thêm các liên kết bổ sung:
Chỉnh sửa template andy_information.
Chỉnh sửa template andy_information_quick_links.

Làm thế nào để thêm tùy chọn sub-menu:
1. Chỉnh sửa file library/Andy/Information/Information.php và thêm mã "public function actionExample()".
Mã:
<?php

class Andy_Information_ControllerPublic_Information extends XenForo_ControllerPublic_Abstract
{
    public function actionIndex()
    {
        // send to template
        return $this->responseView('Andy_Information_ViewPublic_Information', 'andy_information');
    }

    public function actionExample()
    {
        // send to template
        return $this->responseView('Andy_Information_ViewPublic_Information', 'andy_example');
    }
}

2. Mã actionExample sẽ là liên kết được gọi như thế này:
Mã:
http://www.site.com/information/example/

3. Bạn cũng sẽ cần phải tạo ra template andy_example.
Chúc các bạn thành công.


Nguồn: xenforo.com​
 
Back
Top