Hướng dẫn fix lỗi tiêu đề JohnCMS

Admin

AdminAdmin is verified member.

Well-Known Member
Staff member
Administrator
Cái này nhiều bạn làm quá vấn đề lên bằng cách thay [red]'ệ' => 'ễ',[/red] chẳng hạn. Nhưng bài này mình sẽ hướng dẫn rất ngắn gọn thôi.
Mở forum/index.php tìm:
PHP:
if (empty($id)) {
    $textl = '' . $lng['forum'] . '';
} else {
    $req = mysql_query("SELECT `text` FROM `forum` WHERE `id`= '" . $id . "'");
    $res = mysql_fetch_assoc($req);
    $hdr = strtr($res['text'], array(
        '"' => '',
        '&' => '',
        '<' => '',
        '>' => '',
        ''' => ''
    ));
    $hdr = mb_substr($hdr, 0, 30);
    $hdr = functions::checkout($hdr);
    $textl = mb_strlen($res['text']) > 30 ? $hdr . '...' : $hdr;
}
Thay tất cả thành:
PHP:
if (empty($id)) {
    $textl = '' . $lng['forum'] . '';
} else {
$req = mysql_query("SELECT `text` FROM `forum` WHERE `id`= '" . $id . "'");
$res = mysql_fetch_assoc($req);
$textl = ''.$res['text'].' - tuoitreit.vn';
}
Vậy là xong
 

Facebook Comments

Similar threads

Admin
Replies
0
Views
9K
AdminAdmin is verified member.
Admin
Admin
Replies
0
Views
8K
AdminAdmin is verified member.
Admin
Admin
Replies
0
Views
6K
AdminAdmin is verified member.
Admin
Admin
Replies
0
Views
1K
AdminAdmin is verified member.
Admin
Admin
Replies
0
Views
2K
AdminAdmin is verified member.
Admin
Admin
Replies
0
Views
1K
AdminAdmin is verified member.
Admin
Back
Top