Ta dùng Notepade++ mở file output.php trong thư mục http://joomquery.com/libraries/joomla/filter/output.php
Nhớ chuyển format lại thành UTF-8 without BOM
Tìm function: stringURLSafe
ta thay toàn bộ function này bằng function mới có nội dung dưới đây:
Ta dùng Notepade++ mở file output.php trong thư mục http://joomquery.com/libraries/joomla/filter/output.php
Nhớ chuyển format lại thành UTF-8 without BOM
Tìm function: stringURLSafe
ta thay toàn bộ function này bằng function mới có nội dung dưới đây:
Code:
public static function stringURLSafe($string) { $str = str_replace('-', ' ', $string); $utf8characters = 'à|a, ả|a, ã|a, á|a, ạ|a, ă|a, ằ|a, ẳ|a, ẵ|a, ắ|a, ặ|a, â|a, ầ|a, ẩ|a, ẫ|a, ấ|a, ậ|a, đ|d, è|e, ẻ|e, ẽ|e, é|e, ẹ|e, ê|e, ề|e, ể|e, ễ|e, ế|e, ệ|e, ì|i, ỉ|i, ĩ|i, í|i, ị|i, ò|o, ỏ|o, õ|o, ó|o, ọ|o, ô|o, ồ|o, ổ|o, ỗ|o, ố|o, ộ|o, ơ|o, ờ|o, ở|o, ỡ|o, ớ|o, ợ|o, ù|u, ủ|u, ũ|u, ú|u, ụ|u, ư|u, ừ|u, ử|u, ữ|u, ứ|u, ự|u, ỳ|y, ỷ|y, ỹ|y, ý|y, ỵ|y, À|A, Ả|A, Ã|A, Á|A, Ạ|A, Ă|A, Ằ|A, Ẳ|A, Ẵ|A, Ắ|A, Ặ|A, Â|A, Ầ|A, Ẩ|A, Ẫ|A, Ấ|A, Ậ|A, Đ|D, È|E, Ẻ|E, Ẽ|E, É|E, Ẹ|E, Ê|E, Ề|E, Ể|E, Ễ|E, Ế|E, Ệ|E, Ì|I, Ỉ|I, Ĩ|I, Í|I, Ị|I, Ò|O, Ỏ|O, Õ|O, Ó|O, Ọ|O, Ô|O, Ồ|O, Ổ|O, Ỗ|O, Ố|O, Ộ|O, Ơ|O, Ờ|O, Ở|O, Ỡ|O, Ớ|O, Ợ|O, Ù|U, Ủ|U, Ũ|U, Ú|U, Ụ|U, Ư|U, Ừ|U, Ử|U, Ữ|U, Ứ|U, Ự|U, Ỳ|Y, Ỷ|Y, Ỹ|Y, Ý|Y, Ỵ|Y, "|, &|'; $replacements = array(); $items = explode(',', $utf8characters); foreach ($items as $item) { @list($src, $dst) = explode('|', trim($item)); $replacements[trim($src)] = trim($dst); } $str = trim(strtr($str, $replacements)); //$str = strtr($str, $trans); // remove any '-' from the string since they will be used as concatenaters $lang = JFactory::getLanguage(); $str = $lang->transliterate($str); // Trim white spaces at beginning and end of alias and make lowercase $str = trim(JString::strtolower($str)); // Remove any duplicate whitespace, and ensure all characters are alphanumeric $str = preg_replace('/(\s|[^A-Za-z0-9\-])+/', '-', $str); // Trim dashes at beginning and end of alias $str = trim($str, '-'); return $str; } Lưu lại và kiểm tra nhé
Chúc các bạn thành công