- The easiest way to have non-accent URLs for Vietnamese titles.
- Supports both XenForo 1 and XenForo 2.
- Open source https://github.com/xfrocks/VietnameseFriendlyLink
- Works everywhere (forums, threads, etc.), with minimal conflict.
Edit file Route.php:
Tìm
Code:
$string = strval($string);
Thêm bên dưới:
Code:
//Url khong dau
$hacobi1102 = array(
"a" => "Á|À|Ả|Ã|Ạ|Ă|Ắ|Ặ|Ằ|Ẳ|Ẵ|Â|Ấ|Ầ|Ẩ|Ẫ|Ậ|á|à|ả|ã|ạ|ă|ắ|ặ|ằ|ẳ|ẵ|â|ấ|ầ|ẩ|ẫ|ậ",
"d" => "Đ|đ",
"e" => "É|È|Ẻ|Ẽ|Ẹ|Ê|Ế|Ề|Ể|Ễ|Ệ|é|è|ẻ|ẽ|ẹ|ê|ế|ề|ể|ễ|ệ",
"i" => "Í|Ì|Ỉ|Ĩ|Ị|í|ì|ỉ|ĩ|ị",
"o" => "Ó|Ò|Ỏ|Õ|Ọ|Ô|Ố|Ồ|Ổ|Ỗ|Ộ|Ơ|Ớ|Ờ|Ở|Ỡ|Ợ|ó|ò|ỏ|õ|ọ|ô|ố|ồ|ổ|ỗ|ộ|ơ|ớ|ờ|ở|ỡ|ợ",
"u" => "Ú|Ù|Ủ|Ũ|Ụ|Ư|Ứ|Ừ|Ử|Ữ|Ự|ú|ù|ủ|ũ|ụ|ư|ứ|ừ|ử|ữ|ự",
"y" => "Ý|Ỳ|Ỷ|Ỹ|Ỵ|ý|ỳ|ỷ|ỹ|ỵ",
);
foreach($hacobi1102 as $replace => $search){
$string = preg_replace("/($search)/i", $replace, $string);
}
$string = str_replace(" ", "-", $string);
//end khong dau