Skip to content

DorewSite 0.2.0-RC2

Compare
Choose a tag to compare
@dorew-site dorew-site released this 12 Jul 01:45
· 15 commits to main since this release
d030c2c

Thông tin cập nhật:

  • Thay đổi driver cơ sở dữ liệu
  • Sửa lỗi backup template
  • Thêm bật/tắt thông báo cập nhật phiên bản mới

Hướng dẫn cài đặt:

  1. Backup template hiện tại -> Tải về nơi lưu trữ
  2. Tải phiên bản 0.2.0-RC2 từ Github
  3. Cấu hình db từ các thông tin có sẵn
  • Đăng nhập -> Cài đặt -> Cấu hình tệp mặc định
  • Sao lưu -> Tải lên template đã backup

Sửa lỗi font tiếng Việt khi sử dụng Vista Panel - iFastnet hosting:

  • Dùng FTP Manager, mở tệp /libs/TwigFunctions.php, tìm function __construct(), chúng có nội dung tương tư như sau:
public function __construct()
    {
        global $db_host, $db_user, $db_pass, $db_name, $default_login;
        $this->core_cookie = $default_login;
        $this->db = new mysqli($db_host, $db_user, $db_pass, $db_name);
        $this->conn = mysqli_connect($db_host, $db_user, $db_pass, $db_name);
        if (empty($this->db) || empty($this->conn)) {
            //throw new Exception('Connect database failed');
            header('Location: /cms');
            exit();
        }
    }

Thêm đoạn sau vào nó:

if (!empty($this->conn)) {
    mysqli_set_charset($this->conn, 'UTF8');
}

Tham khảo thêm:

public function __construct()
    {
        global $db_host, $db_user, $db_pass, $db_name, $default_login;
        $this->core_cookie = $default_login;
        $this->db = new mysqli($db_host, $db_user, $db_pass, $db_name);
        $this->conn = mysqli_connect($db_host, $db_user, $db_pass, $db_name);
        if (empty($this->db) || empty($this->conn)) {
            //throw new Exception('Connect database failed');
            header('Location: /cms');
            exit();
        }
        if (!empty($this->conn)) {
            mysqli_set_charset($this->conn, 'UTF8');
        }
    }